public static FSI_Control Main(double angle = 100, double distance = 5, int amr = 0)
        {
            FSI_Control C = new FSI_Control(2, "2particleInteractions", "active Particles");
            //C.SetSaveOptions(dataBasePath: @"D:\BoSSS_databases\2particleInteractions", savePeriod: 1);
            //C.SetSaveOptions(@"/work/scratch/ij83requ/default_bosss_db", 1);
            //C.AlternateDbPaths = new[] { new ValueTuple<string, string>(@"/work/scratch/ij83requ/default_bosss_db", ""), new ValueTuple<string, string>(@"U:\default_bosss_db", "") };
            // Domain
            // =============================
            List <string> boundaryValues = new List <string> {
                "Wall"
            };

            C.SetBoundaries(boundaryValues);
            C.SetGrid(lengthX: 20, lengthY: 20, cellsPerUnitLength: 100, periodicX: false, periodicY: false);
            C.SetAddaptiveMeshRefinement(amr);

            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling = LevelSetHandling.FSI_LieSplittingFullyCoupled;
            C.LevelSetSmoothing            = false;
            C.CutCellQuadratureType        = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.hydrodynamicsConvergenceCriterion = 1e-6;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A             = 1;
            C.PhysicalParameters.mu_A              = 1;
            C.PhysicalParameters.IncludeConvection = false;
            C.IsStationary = true;
            double particleDensity = 1;

            // Particle Properties
            // =============================
            C.fixPosition = true;
            InitializeMotion motion         = new InitializeMotion(C.gravity, particleDensity, false, false, false, 1.5, true);
            double           particleRadius = 0.5;
            double           aspectRatio    = 2;

            C.Particles = new List <Particle> {
                new Particle_Ellipsoid(motion, aspectRatio * particleRadius, particleRadius, new double[] { -distance / 2, 0.0 }, angle, 1),
                new Particle_Ellipsoid(motion, aspectRatio * particleRadius, particleRadius, new double[] { distance / 2, 0.0 }, 180 - angle, 1)
            };

            // misc. solver options
            // =============================
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LinearSolver.SolverCode             = LinearSolverCode.classic_pardiso;

            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(dt: 1e-1, noOfTimesteps: 20);

            return(C);
        }
Esempio n. 2
0
        public static FSI_Control TwoParticleCollision(int k = 2, int amrLevel = 2)
        {
            FSI_Control C = new FSI_Control(k, "activeRod_noBackroundFlow", "active Particles");
            //C.SetSaveOptions(dataBasePath: @"/home/ij83requ/default_bosss_db", savePeriod: 1);

            // Domain
            // =============================
            List <string> boundaryValues = new List <string> {
                "Wall"
            };

            C.SetBoundaries(boundaryValues);
            C.SetGrid(lengthX: 3, lengthY: 3, cellsPerUnitLength: 5, periodicX: false, periodicY: false);
            C.SetAddaptiveMeshRefinement(amrLevel);

            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling = LevelSetHandling.LieSplitting;
            C.LevelSetSmoothing            = false;
            C.CutCellQuadratureType        = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.hydrodynamicsConvergenceCriterion = 1e-4;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A             = 1;
            C.PhysicalParameters.mu_A              = 1;
            C.PhysicalParameters.IncludeConvection = false;
            double particleDensity = 100;

            C.pureDryCollisions = true;

            // Particle Properties
            // =============================
            InitializeMotion motion         = new InitializeMotion(C.gravity, particleDensity, true, false, false);
            double           particleRadius = 0.1;

            C.Particles = new List <Particle> {
                new Particle_Ellipsoid(motion, particleRadius, particleRadius, new double[] { 0, 0.25 }, 0, 0, new double[] { 0, -0.1 }),
                new Particle_Ellipsoid(motion, particleRadius, particleRadius, new double[] { 0, 0 }, 0, 0, new double[] { 0, 0.1 })
            };

            // misc. solver options
            // =============================
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LinearSolver.SolverCode             = LinearSolverCode.classic_pardiso;
            C.LevelSetSmoothing = false;


            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(dt: 1e-2, noOfTimesteps: 100);

            return(C);
        }
        public static FSI_Control TwoParticles(int k = 2, double distance = 3, double angle = 140)
        {
            FSI_Control C = new FSI_Control(degree: k, projectName: "2_active_Rods");

            //C.SetSaveOptions(@"/work/scratch/ij83requ/default_bosss_db", 1);
            C.SetSaveOptions(dataBasePath: @"D:\BoSSS_databases\Channel", savePeriod: 1);

            List <string> boundaryValues = new List <string> {
                "Wall"
            };

            C.SetBoundaries(boundaryValues);
            C.SetGrid(lengthX: 10, lengthY: 10, cellsPerUnitLength: 5, periodicX: false, periodicY: false);
            C.SetAddaptiveMeshRefinement(amrLevel: 3);
            C.hydrodynamicsConvergenceCriterion = 1e-3;
            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A             = 1;
            C.PhysicalParameters.mu_A              = 1;
            C.PhysicalParameters.IncludeConvection = false;
            C.CoefficientOfRestitution             = 1;

            // Particle Properties
            // =============================
            double           particleDensity = 2;
            InitializeMotion motion          = new InitializeMotion(C.gravity, particleDensity, false, false, false, 1);

            C.fixPosition = true;
            C.Particles.Add(new Particle_Ellipsoid(motion, 0.5, 0.25, new double[] { -0.5 - distance / 2, 0 }, startAngl: 30, activeStress: 1));
            C.Particles.Add(new Particle_Ellipsoid(motion, 0.5, 0.25, new double[] { 0.5 + distance / 2, 0 }, startAngl: 180 + angle, activeStress: 1));

            // misc. solver options
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            double dt = 1e-1;

            C.SetTimesteps(dt, 50, false);
            C.AdvancedDiscretizationOptions.PenaltySafety = 4;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.LevelSetSmoothing = false;
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LSunderrelax            = 1.0;
            C.LinearSolver.SolverCode = LinearSolverCode.classic_pardiso;

            // Coupling Properties
            // =============================
            C.CutCellQuadratureType        = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;
            C.Timestepper_LevelSetHandling = LevelSetHandling.FSI_LieSplittingFullyCoupled;
            C.LSunderrelax = 1;
            C.maxIterationsFullyCoupled = 100;


            return(C);
        }
        public static FSI_Control PackedParticles(int k = 2, double particleLength = 0.095, double aspectRatio = 0.5)
        {
            FSI_Control C = new FSI_Control(degree: k, projectName: "2_active_Rods");

            //C.SetSaveOptions(@"/work/scratch/ij83requ/default_bosss_db", 1);
            C.SetSaveOptions(dataBasePath: @"D:\BoSSS_databases\Channel", savePeriod: 1);
            string ID = "ad6c038b-8fb8-4d4d-8bb0-e214856d3061";

            C.RestartInfo = new Tuple <Guid, BoSSS.Foundation.IO.TimestepNumber>(new Guid(ID), -1);
            C.IsRestart   = true;
            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A             = 1;
            C.PhysicalParameters.mu_A              = 1;
            C.PhysicalParameters.IncludeConvection = false;

            // Particle Properties
            // =============================
            double particleDensity = 10;
            double activeStress    = 10;
            double domainLength    = 2.5;

            C.SetGrid(lengthX: domainLength, lengthY: domainLength, cellsPerUnitLength: 35, periodicX: true, periodicY: true);
            C.SetAddaptiveMeshRefinement(0);
            C.hydrodynamicsConvergenceCriterion = 1e-2;
            C.minDistanceThreshold     = 0.015;
            C.CoefficientOfRestitution = 0.5;

            InitializeMotion motion               = new InitializeMotion(C.gravity, particleDensity, false, false, false, 1.5);
            double           leftCorner           = -1.1;
            double           nextParticleDistance = 0.20;
            Random           angle          = new Random();
            Random           insertParticle = new Random();
            int j = 0;

            while (leftCorner + j * nextParticleDistance < domainLength / 2)
            {
                int i = 0;
                while (leftCorner + i * nextParticleDistance < domainLength / 2)
                {
                    double temp_insertParticle = insertParticle.Next(0, 3);
                    temp_insertParticle = temp_insertParticle.MPIBroadcast(0);
                    if (temp_insertParticle != 0)
                    {
                        double temp_angle = angle.Next(0, 360);
                        temp_angle = temp_angle.MPIBroadcast(0);
                        C.Particles.Add(new Particle_Ellipsoid(motion, particleLength, particleLength * aspectRatio, new double[] { leftCorner + i * nextParticleDistance, leftCorner + j * nextParticleDistance }, temp_angle, activeStress, new double[] { 0.05 * Math.Cos(temp_angle * Math.PI / 180), 0.05 * Math.Sin(temp_angle * Math.PI / 180) }));
                    }
                    i += 1;
                }
                j += 1;
            }


            // misc. solver options
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(1e-3, int.MaxValue, true);
            C.AdvancedDiscretizationOptions.PenaltySafety = 4;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.LevelSetSmoothing = false;
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LSunderrelax            = 1.0;
            C.LinearSolver.SolverCode = LinearSolverCode.classic_pardiso;

            // Coupling Properties
            // =============================
            C.CutCellQuadratureType        = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;
            C.Timestepper_LevelSetHandling = LevelSetHandling.FSI_LieSplittingFullyCoupled;
            C.LSunderrelax = 1;
            C.maxIterationsFullyCoupled = 100;


            return(C);
        }
Esempio n. 5
0
        public static FSI_Control ThreeParticleCollision(int k = 2, int amrLevel = 0)
        {
            FSI_Control C = new FSI_Control(k, "activeRod_noBackroundFlow", "active Particles");

            //C.SetSaveOptions(dataBasePath: @"/home/ij83requ/default_bosss_db", savePeriod: 1);
            C.SetSaveOptions(@"D:\BoSSS_databases\wetParticleCollision", 1);
            // Domain
            // =============================
            C.SetGrid(lengthX: 1, lengthY: 1, cellsPerUnitLength: 40, periodicX: true, periodicY: true);
            C.SetAddaptiveMeshRefinement(amrLevel);

            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling = LevelSetHandling.LieSplitting;
            C.LevelSetSmoothing            = false;
            C.CutCellQuadratureType        = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.hydrodynamicsConvergenceCriterion = 1e-4;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A             = 1;
            C.PhysicalParameters.mu_A              = 1e-3;
            C.PhysicalParameters.IncludeConvection = false;
            double particleDensity = 1;

            C.pureDryCollisions = true;

            // Particle Properties
            // =============================
            InitializeMotion motion1        = new InitializeMotion(C.gravity, particleDensity, C.pureDryCollisions, false, false);
            double           particleRadius = 0.1;

            C.Particles = new List <Particle>();
            //for (int i = 0; i < 9; i++) {
            //    for (int j = 0; j < 9; j++) {
            //        C.Particles.Add(new Particle_Sphere(motion1, particleRadius, new double[] { -2 + i * 0.5+0.1*Math.Pow(-1,j), 2 - j * 0.5 }, 0, 0, new double[] { 0.1 * Math.Pow(-1, i), -0.1 * Math.Pow(-1, j) }));
            //    }
            //}
            C.Particles.Add(new Particle_Sphere(motion1, particleRadius, new double[] { 0, 0 }, 0, 0));
            C.Particles.Add(new Particle_Sphere(motion1, particleRadius, new double[] { -0.36, 0 }, 0, 0, new double[] { 1, 0 }));
            //C.Particles.Add(new Particle_Sphere(motion1, particleRadius, new double[] { 0.36, 0 }, 180, 1));

            // misc. solver options
            // =============================
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LinearSolver.SolverCode             = LinearSolverCode.classic_pardiso;
            C.LevelSetSmoothing = false;


            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(dt: 1e-2, noOfTimesteps: 5000);

            return(C);
        }
Esempio n. 6
0
        public static FSI_Control Main(int k = 2, int amrLevel = 2, double aspectRatio = 2, double relaxationFactor = 0.3, bool addaptiveUnderrelaxation = true, double conv = 1e-6)
        {
            FSI_Control C = new FSI_Control(k, "activeRod_noBackroundFlow", "active Particles");

            C.SetSaveOptions(dataBasePath: @"D:\BoSSS_databases\Channel", savePeriod: 1);

            // Domain
            // =============================
            List <string> boundaryValues = new List <string> {
                "Pressure_Outlet_left",
                "Pressure_Outlet_right",
                "Pressure_Outlet_lower",
                "Pressure_Outlet_upper"
            };

            C.SetBoundaries(boundaryValues);
            C.SetGrid(lengthX: 10, lengthY: 10, cellsPerUnitLength: 1, periodicX: false, periodicY: false);
            C.SetAddaptiveMeshRefinement(amrLevel);

            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling = LevelSetHandling.FSI_LieSplittingFullyCoupled;
            C.LevelSetSmoothing            = false;
            C.CutCellQuadratureType        = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.hydrodynamicsConvergenceCriterion = conv;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A             = 1;
            C.PhysicalParameters.mu_A              = 1;
            C.PhysicalParameters.IncludeConvection = false;
            double particleDensity = 1;

            C.gravity = new double[] { 0, 0 };

            // Particle Properties
            // =============================
            C.underrelaxationParam = new ParticleUnderrelaxationParam(C.hydrodynamicsConvergenceCriterion, ParticleUnderrelaxationParam.UnderrelaxationMethod.ProcentualRelaxation, relaxationFactor, addaptiveUnderrelaxation);
            ParticleMotionInit motion         = new ParticleMotionInit(C.gravity, particleDensity, false, false, false, C.underrelaxationParam, 1.5);
            double             particleRadius = 0.5;

            C.Particles = new List <Particle> {
                new Particle_Ellipsoid(motion, aspectRatio * particleRadius, particleRadius, new double[] { 0.0, 0.0 }, 0, 1)
            };

            // misc. solver options
            // =============================
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;


            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(dt: 1e-3, noOfTimesteps: 250000);

            return(C);
        }
Esempio n. 7
0
        public static FSI_Control WetParticleWallCollision(int k = 3, double DensityFactor = 2500, int amrLevel = 4)
        {
            FSI_Control C = new FSI_Control(degree: k, projectName: "wetParticleWallCollision");

            C.SetSaveOptions(@"D:\BoSSS_databases\wetParticleCollision", 1);

            List <string> boundaryValues = new List <string> {
                "Pressure_Outlet_left",
                "Pressure_Outlet_right",
                "Wall_lower",
                "Pressure_Outlet_upper"
            };

            C.SetBoundaries(boundaryValues);
            C.SetGrid(lengthX: 2, lengthY: 2, cellsPerUnitLength: 1, periodicX: false, periodicY: false);
            C.SetAddaptiveMeshRefinement(amrLevel);
            C.hydrodynamicsConvergenceCriterion = 1e-6;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A    = 1;
            C.PhysicalParameters.mu_A     = 1;
            C.PhysicalParameters.Material = true;
            C.gravity = new double[] { 0, -5 };
            double particleDensity = 1 * DensityFactor;

            // Particle Properties
            // =============================
            // Defining particles
            C.Particles            = new List <Particle>();
            C.underrelaxationParam = new ParticleUnderrelaxationParam(convergenceLimit: C.hydrodynamicsConvergenceCriterion, relaxationFactor: 1.0, useAddaptiveUnderrelaxation: true);
            ParticleMotionInit motion = new ParticleMotionInit(C.gravity, particleDensity, false, false, false, C.underrelaxationParam, 1);

            C.Particles.Add(new Particle_Sphere(motion, 0.25, new double[] { 0.0, 0.0 }, 0, 0, new double[] { 0, 0 }));

            // Quadrature rules
            // =============================
            C.CutCellQuadratureType = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;

            // Physical Parameters
            // =============================
            C.PhysicalParameters.IncludeConvection = false;

            // misc. solver options
            // =============================
            C.AdvancedDiscretizationOptions.PenaltySafety = 4;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.LevelSetSmoothing = false;
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LSunderrelax = 1.0;


            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling = LevelSetHandling.LieSplitting;
            C.LSunderrelax = 1;
            C.maxIterationsFullyCoupled = 2000;


            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(dt: 1e-3, noOfTimesteps: 2500);

            // haben fertig...
            // ===============

            return(C);
        }
Esempio n. 8
0
        public static FSI_Control WetParticleWallCollision(double DensityFactor = 400)
        {
            FSI_Control C = new FSI_Control(degree: 3, projectName: "wetParticleWallCollision");

            C.SetSaveOptions(@"D:\BoSSS_databases\wetParticleCollision", 1);
            //C.SetSaveOptions(@"\\hpccluster\hpccluster-scratch\deussen\cluster_db\WetParticleCollision", 1);
            //C.SetSaveOptions(@"/work/scratch/ij83requ/default_bosss_db", 1);

            List <string> boundaryValues = new List <string> {
                "Wall_left",
                "Wall_right",
                "Wall_lower",
                "Pressure_Outlet_upper"
            };

            C.SetBoundaries(boundaryValues);
            C.SetAddaptiveMeshRefinement(4);
            C.SetGrid(lengthX: 5, lengthY: 1, cellsPerUnitLength: 6, periodicX: false, periodicY: false);
            C.hydrodynamicsConvergenceCriterion = 1e-3;
            C.pureDryCollisions = false;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A    = 1;
            C.PhysicalParameters.mu_A     = 1;
            C.PhysicalParameters.Material = true;
            C.gravity = new Vector(0, -10);
            double particleDensity = 1 * DensityFactor;

            // Particle Properties
            // =============================
            // Defining particles
            C.Particles = new List <Particle>();
            InitializeMotion motion = new InitializeMotion(C.gravity, particleDensity, C.pureDryCollisions, false, false, 0);

            C.Particles.Add(new Particle_Sphere(motion, 0.125, new double[] { 0.0, -0.0002 }, 0, 0, new double[] { 0, 0 }));

            // Quadrature rules
            // =============================
            C.CutCellQuadratureType = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;

            // Physical Parameters
            // =============================
            C.PhysicalParameters.IncludeConvection = false;

            // misc. solver options
            // =============================
            C.AdvancedDiscretizationOptions.PenaltySafety = 4;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.LevelSetSmoothing = false;
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LSunderrelax            = 1.0;
            C.LinearSolver.SolverCode = LinearSolverCode.classic_pardiso;


            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling = LevelSetHandling.FSI_LieSplittingFullyCoupled;
            C.LSunderrelax = 1;
            C.maxIterationsFullyCoupled = 2000;


            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(1e-3, 500, false);

            // haben fertig...
            // ===============

            return(C);
        }
Esempio n. 9
0
        public static FSI_Control StokesFlow(int k = 2, int amrLevel = 1)
        {
            FSI_Control C = new FSI_Control(degree: k, projectName: "wetParticleWallCollision");

            C.SetSaveOptions(@"D:\BoSSS_databases\wetParticleCollision", 1);

            List <string> boundaryValues = new List <string> {
                "Wall"
            };

            C.SetBoundaries(boundaryValues);
            C.SetGrid(lengthX: 2, lengthY: 2, cellsPerUnitLength: 12, periodicX: false, periodicY: false);
            C.SetAddaptiveMeshRefinement(amrLevel, true);
            C.hydrodynamicsConvergenceCriterion = 1e-2;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A    = 1;
            C.PhysicalParameters.mu_A     = 1e-2;
            C.PhysicalParameters.Material = true;
            C.gravity = new Vector(0, -0.01);
            // Particle Properties
            // =============================
            double particleDensity = 2;

            C.Particles = new List <Particle>();
            InitializeMotion motion = new InitializeMotion(C.gravity, particleDensity, false, false, false, 0);

            C.Particles.Add(new Particle_Sphere(motion, 0.25, new double[] { 0.0, 0.0 }, -90, 0, new double[] { 0, 0 }));

            // Quadrature rules
            // =============================
            C.CutCellQuadratureType = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;

            // Physical Parameters
            // =============================
            C.PhysicalParameters.IncludeConvection = false;

            // misc. solver options
            // =============================
            C.AdvancedDiscretizationOptions.PenaltySafety = 4;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.LevelSetSmoothing = false;
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LSunderrelax = 1.0;


            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling = LevelSetHandling.FSI_LieSplittingFullyCoupled;
            C.LSunderrelax = 1;
            C.maxIterationsFullyCoupled = 20000;


            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(dt: 1e-3, noOfTimesteps: int.MaxValue);

            // haben fertig...
            // ===============

            return(C);
        }
Esempio n. 10
0
        public static FSI_Control ActiveRod_noWalls(int k = 3)
        {
            FSI_Control C = new FSI_Control(k, "activeRod_noBackroundFlow", "active Particles");

            C.SetSaveOptions(dataBasePath: @"\\hpccluster\hpccluster-scratch\deussen\cluster_db\Channel", savePeriod: 1);

            // Domain
            // =============================
            List <string> boundaryValues = new List <string> {
                "Pressure_Outlet"
            };

            C.SetBoundaries(boundaryValues);
            C.SetGrid(lengthX: 20, lengthY: 8, cellsPerUnitLength: 1, periodicX: false, periodicY: false);
            C.SetAddaptiveMeshRefinement(amrLevel: 6);

            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling      = LevelSetHandling.FSI_LieSplittingFullyCoupled;
            C.maxIterationsFullyCoupled         = 100000;
            C.hydrodynamicsConvergenceCriterion = 1e-1;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A             = 1;
            C.PhysicalParameters.mu_A              = 1;
            C.PhysicalParameters.IncludeConvection = true;
            C.gravity = new double[] { 0, 0 };
            double particleDensity = 1;

            // Particle Properties
            // =============================
            C.underrelaxationParam = new ParticleUnderrelaxationParam(C.hydrodynamicsConvergenceCriterion, ParticleUnderrelaxationParam.UnderrelaxationMethod.ProcentualRelaxation, relaxationFactor: 3.0, useAddaptiveUnderrelaxation: true);
            ParticleMotionInit motion = new ParticleMotionInit(C.gravity, particleDensity, false, false, false, C.underrelaxationParam, 1);

            C.Particles = new List <Particle> {
                new Particle_Ellipsoid(motion, 0.5, 0.05, new double[] { 0.0, 0.0 }, startAngl: 0, activeStress: 1)
            };

            // Quadrature rules
            // =============================
            C.CutCellQuadratureType = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;

            //Initial Values
            // =============================
            //C.InitialValues_Evaluators.Add("Phi", X => phiComplete(X, 0));
            C.InitialValues_Evaluators.Add("VelocityX", X => 0);
            C.InitialValues_Evaluators.Add("VelocityY", X => 0);

            // For restart
            // =============================
            //C.RestartInfo = new Tuple<Guid, TimestepNumber>(new Guid("42c82f3c-bdf1-4531-8472-b65feb713326"), 400);
            //C.GridGuid = new Guid("f1659eb6 -b249-47dc-9384-7ee9452d05df");

            // misc. solver options
            // =============================
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.LevelSetSmoothing = false;
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;

            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(dt: 1e-3, noOfTimesteps: 1000000000);

            return(C);
        }
        public static FSI_Control ActiveRod_noBackroundFlow(int k = 2, int amrLevel = 1, double aspectRatio = 2, double activeStress = 1)
        {
            FSI_Control C = new FSI_Control(k, "activeRod_noBackroundFlow", "active Particles");

            //C.SetSaveOptions(dataBasePath: @"/home/ij83requ/default_bosss_db", savePeriod: 1);
            C.SetSaveOptions(dataBasePath: @"D:\BoSSS_databases\Channel", savePeriod: 1);

            // Domain
            // =============================
            List <string> boundaryValues = new List <string> {
                "Pressure_Outlet_left",
                "Pressure_Outlet_right",
                "Wall_lower",
                "Wall_upper"
            };

            C.SetBoundaries(boundaryValues);
            C.SetGrid(lengthX: 20, lengthY: 1, cellsPerUnitLength: 20, periodicX: false, periodicY: false);
            C.SetAddaptiveMeshRefinement(amrLevel);

            // Coupling Properties
            // =============================
            C.Timestepper_LevelSetHandling = LevelSetHandling.FSI_LieSplittingFullyCoupled;
            C.LevelSetSmoothing            = false;
            C.CutCellQuadratureType        = Foundation.XDG.XQuadFactoryHelper.MomentFittingVariants.Saye;
            C.AdvancedDiscretizationOptions.CellAgglomerationThreshold = 0.2;
            C.hydrodynamicsConvergenceCriterion = 1e-4;

            // Fluid Properties
            // =============================
            C.PhysicalParameters.rho_A             = 1;
            C.PhysicalParameters.mu_A              = 1;
            C.PhysicalParameters.IncludeConvection = false;
            double particleDensity = 10;

            // Particle Properties
            // =============================
            InitializeMotion motion         = new InitializeMotion(C.gravity, particleDensity, false, false, false, 1.5);
            double           particleRadius = 0.1;

            C.Particles = new List <Particle> {
                new Particle_Ellipsoid(motion, aspectRatio * particleRadius, particleRadius, new double[] { 0.0, 0.0 }, 0, activeStress)
            };

            // misc. solver options
            // =============================
            C.NonLinearSolver.MaxSolverIterations = 1000;
            C.NonLinearSolver.MinSolverIterations = 1;
            C.LinearSolver.NoOfMultigridLevels    = 1;
            C.LinearSolver.MaxSolverIterations    = 1000;
            C.LinearSolver.MinSolverIterations    = 1;
            C.LinearSolver.SolverCode             = LinearSolverCode.classic_pardiso;


            // Timestepping
            // =============================
            C.Timestepper_Scheme = IBM_Solver.IBM_Control.TimesteppingScheme.BDF2;
            C.SetTimesteps(dt: 1e-2, noOfTimesteps: int.MaxValue);

            return(C);
        }