Log in Register

Login to your account

Username *
Password *
Remember Me

Create an account

Fields marked with an asterisk (*) are required.
Name *
Username *
Password *
Verify password *
Email *
Verify email *
Captcha *

Defining a new case is a two-step procedure. The simplest way to start is to use a template one of the examples. Copy it to a new folder into /Data directory and put the new geometry.stl file into /geometry subfolder. The stl geometry can be prepared in any CAD software. I recommend OpenSCAD.

Now run ./Microflow -cf Data/your_case -g

Microflow with -g option converts the surface grid to a volumetric one and writes it as geometry.vti file into /geometry subfolder.
Open geometry.vti file in Paraview. You can find in Parawiew's "Properties" window two "Point Data" positions: "MF NodeCoord" and "Node type". The first one is a node coordinates from MF, the second is the node type coded as follows: 0 - a solid node, 1 - a fluid node, 3 - a boundary node. Use "Find data matching various criteria from the current source (v)" tool to extract points you wish to be treated as inlet and outlet surfaces and save them in separate text .csv files. Those files will be linked in thread_params.cfg with MFThreads and boundary conditions. Boundary conditions on all other walls can be applied automatically through case parameters:

DefaultWallNode_BN = "40"; # Default type of node on the wall (40)
DefaultNode_NN = "61"; # Default edge/corner/unrecognized node (61).

You have to specify only unusual boundaries (usually inlet and outlet).
Now modify the content of case_params.cfg file and thread_params.cfg in a text editor and save them.

Run ./Microflow -cf Data/your_case -j nr_CPU_threads

If everything goes right computations will start and subsequent convergence parameters will be printed on a console for consecutive time steps.
The most important parameter is "Sc velocity residue, [-]" - the scaled residues of velocity for subsequent time steps. This parameter controls computations termination and is adjusted in params.cfg file line:

SimmulationTerminationError_Err = "1.0e-6"; # Termination condition - the mean scaled residue of average velocity for subsequent steps.

Another important solution convergence indicator is an "Error mass flow, [%]" - relative error (difference) between inlet and outlet mass flow.
Also, the key parameter that has to be controlled is "Maximal LB velocity, [-]" - the maximal value of velocity in LB units that are observed in the computational node.
This value should not exceed 0.4 - 0.6 for computation stability. Otherwise, the calculations will be divergent.

Finally, when "Sc velocity residue" reaches the setpoint (set 1E-6 or less) computations will stop and final results will be saved in /output subfolder. Open it with Paraview.