利用者:Romanp/GSoC Mantaflow Framework/Docs/Mantaflow setup script
To run a simulation, Mantaflow needs a python setup file.
Mantaflow config file consists of following parts:
- 1. Data declaration
- 2. Flow setup
- 3. Flow solving steps
目次
Data declaration
It is used to define the solver data, such as solver resolution, types of grids that will be used in simulation and their properties. Things that can be done here:
- Create solver given resolution(at least)
- Create grids(velocity,pressure, flags,density):
- MAC grid
- Real grid
- Flag grid
- Vector grid
- Create Mesh types:
- Box, given pMin and pMax
- Cylinder, given radius and center
- Import existing meshes
- Other variables that may be used in scrips(maybe properties added by users)
Flow Setup
Here, domain initialization takes place.
Flow Solving Steps
The main part where simulation takes place Things that can be done here:
- Flow advection
- Adding external forces
- Pressure solve step
- Density Inflow declaration
- Wall Boundaries setup
- Buoyancy setup
Wavelets setup
If wavelet turbulence must be included in the simulation, two solvers(low- and high res) must be created. During the flow solving steps, low-res data must be transferred to high-res grid, and the turbulence should be added afterwards.
Values
Table of all values that can be used for Blender smoke setup, and their corresponding mantaflow configs
Blender var | Manta var |
---|---|
Resolution | solver.resolution |
Time Scale | solver.timestep |
Density | solver.create(RealGrid).scale |
Temp Diff | Not found |
Vorticity | NoiseFlield.valScale |
Dissolve bool | Not found |
Border Collisions . open /collideAll | solvepressure.openBound = Y/N |
Border Collisions . verticallyopen | Not yet present |
High Res bool | Handle in Blender |
HR divisions | resolution for XL grid |
HR method Wavelet | Default in Mantaflow |
HR method FFT | Not Supported |
HR noise strength | NoiseField.valScale |
HR sampling(linear, nearest, full) | Not found |
HR Show high resolution | Handle in Blender |
Groups Flow | Define objects as source in densityInflow.shape |
Groups Collision | Define collision objs with applyToGrid.value=FlagObstacle |
Cache Compression(Light/Heavy) | Handle in Blender |
Cache Save settings(name, frames) | Handle in Blender |
Cache Bake Settings | All there |
Field Weights Gravity | addBuoyancy.gravity |
FW Turbulence | turb.synthesize.scale |
Values present in Mantaflow but not in Blender
- Dimensionality of simulation(can be 2D)
- Pressure accuracy threshhold
- maximum iteration factor
- Noise field settings
- Turbulence Settings
- num of turbulen particles
- RANS enabling
- intensity
- lengthscale
- Octaves number