... | @@ -33,7 +33,7 @@ H = 1.2 # domain height |
... | @@ -33,7 +33,7 @@ H = 1.2 # domain height |
|
|
|
|
|
2. Define the matrix of the grains positions and actually create the grains at these positions
|
|
2. Define the matrix of the grains positions and actually create the grains at these positions
|
|
|
|
|
|
* Setting the initial situation requires to define the initial positions of the grains. In test cases, this is often achieved by defining a [function](https://git.immc.ucl.ac.be/fluidparticles/migflow/blob/oneFluid/testcases/depot-2d/depot.py#L37) in which the positions of the centres are defined. The arguments of the function are related to the grains properties and the grains area geometry defined previously. The physical surfaces defined in your mesh.geo file are used to specify the solid boundaries for the grains. Grain objects are created locally and all the information about the initial conditions of the grains are written in an output file.
|
|
* Setting the initial situation requires to define the initial positions of the grains. In test cases, this is often achieved by defining a [function](https://git.immc.ucl.ac.be/fluidparticles/migflow/blob/oneFluid/testcases/depot-2d/depot.py#L37) in which the positions of the centres are defined. The arguments of the function are related to the grains properties and the grains area geometry defined previously. The physical surfaces defined in your mesh.geo file are used to specify the solid boundaries for the grains. Grain objects are created locally and all the information about the initial conditions of the grains are written in an output file. The argument of the particles structure builder is the dimension of the problem.
|
|
```python
|
|
```python
|
|
def genInitialPosition(filename, r, H, ly, lx, rhop) :
|
|
def genInitialPosition(filename, r, H, ly, lx, rhop) :
|
|
"""Set all the particles centre positions and create the particles objects to add in the computing structure
|
|
"""Set all the particles centre positions and create the particles objects to add in the computing structure
|
... | @@ -72,7 +72,7 @@ p.read_vtk(outputdir,0) |
... | @@ -72,7 +72,7 @@ p.read_vtk(outputdir,0) |
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
3. Create the fluid structure and specify the computational domain (i.e. give the mesh to the fluid class). At this step, all the variables (velocity, pressure...) of the fluid problem and the properties of the fluid are stored in the fluid structure
|
|
3. Create the fluid structure and specify the computational domain (i.e. give the mesh to the fluid class). At this step, all the variables (velocity, pressure...) of the fluid problem and the properties of the fluid are stored in the fluid structure. The arguments for the fluid structure builder are the dimension of the problem, the gravity, the dynamic viscosity and the density of the fluid.
|
|
```python
|
|
```python
|
|
fluid = fluid.FluidProblem(2,g,[nu*rho],[rho])
|
|
fluid = fluid.FluidProblem(2,g,[nu*rho],[rho])
|
|
# Set the mesh geometry for the fluid computation
|
|
# Set the mesh geometry for the fluid computation
|
... | | ... | |