Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • V venturi2d
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Analytics
    • Analytics
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • alyaalya
  • benchmarksbenchmarks
  • venturi2d
  • Wiki
  • Home

Home · Changes

Page history
Create home authored Apr 23, 2020 by Guillaume Houzeaux's avatar Guillaume Houzeaux
Show whitespace changes
Inline Side-by-side
home.md 0 → 100644
View page @ f72bc6e1
<div class="textblock">
This tutorial analyses the Venturi effect on a 2D quadrilateral structured mesh.
* [Steady state flow](case_venturi.html#Steady_state_flow) : description of the problem
* [domain Boundaries](case_venturi.html#Domain_boundaries) : boundaries of the computational domain
* [Convergence of the case](case_venturi.html#Convergence) : numerical and physical convergence of the model
* [Velocity profiles](case_venturi.html#Velocity_profiles) : post-processing of velocities in different venturi sections
* [Input files ](case_venturi.html#Input_files) : detailed description of case input files
* [venturi.dat (case global parameters)](case_venturi.html#venturi_dat)
* [venturi.dom.dat (domain input data)](case_venturi.html#venturi_dom_dat)
* [venturi.geo.dat (mesh data)](case_venturi.html#venturi_geo_dat)
* [venturi.set.dat (set data: groups for post-processing, optional)](case_venturi.html#venturi_set_dat)
* [venturi.fix.dat (boundary conditions data)](case_venturi.html#venturi_fix_dat)
* [venturi.ker.dat (kernel input data)](case_venturi.html#venturi_ker_dat)
* [venturi.nsi.dat (incompressible Navier-Stokes solver parameters)](case_venturi.html#venturi_nsi_dat)
* [venturi.post.alya.dat (alya2pos parameters)](case_venturi.html#venturi_post_alya_dat)
* * *
* * *
# <a class="anchor" id="Steady_state_flow"></a>Steady state flow
![image](uploads/4252e5411aceeccb6ae8d5a98e47483c/image.png)
<center>Solution of the steady state flow</center>
Simulation settings are specified to reach a steady state flow condition.
Velocity and fluid properties give a low Re number for this case.
Integration time interval is set to infinity (1e6), and so is maximum number of timesteps. Alya run can be stopped after a few timesteps because the steady state solution converges very quickly with the specified settings. Otherwise the job will do 1e6 time iterations!
For every time step, time increment is automatically calculated. Only 1 Navier-Stokes iteration is specified to be performed at every time step. The two iterative solvers used by Navier-Stokes solution of Momentum and Continuity, are allowed to do 1000 iterations each unless convergence tolerances are reached (1.0e-12 in both cases).
Venturi length is 6m, half height is 1m and inlet velocity has a parabolic profile with a maximum value in the symmetry plane of 1 m/s.
Density is set to 1 and dynamic viscosity μ equals 1e-2, so that Reynolds number is about 100\. For much higher Reynolds in turbulent regime, the solution may diverge ([as shown in the following animation](http://www.youtube.com/watch?feature=player_detailpage&v=lqJsO7gC02w)), indicating that TURBUL module has to be used with NASTIN module in order to simulate such a case.
* * *
* * *
# <a class="anchor" id="Domain_boundaries"></a>domain Boundaries
Boundary numbers are as follow, inlet is on the left, +X direction is upwards.
![image](uploads/6c7e9e192e6c9b9a0aee8ac94581cdfa/image.png)
* * *
* * *
# <a class="anchor" id="Convergence"></a>Convergence of the case
Next figure shows the convergence plot (alya-all-nsi app) of the simulation after 989 time steps, when convergence criteria is reached. Since the analysis looks for a steady state solution, time integration is a matter of solving strategy, with no physical sense. Alya is doing ‘transient’ all the time.
![image](uploads/a424be8d5c0ee443cc2aeacb92d5d759/image.png)
Further on, the effect of mesh refinement is analyzed looking at the convergence of two variables: the total viscous force acting on the wall and the maximum velocity at the central venturi section. The same case has been calculated with different values of the parameter DIVISION: 0, 1, 2 and 3, which produce mesh sizes of 4200, 16800, 67200 and 268800 elements respectively. The following plots show the convergence of wall viscous force and maximum velocity with mesh refinement.
![image](uploads/5f28d6432ccff8775f43418c0cfc70f0/image.png)
![image](uploads/7f4b90510f579cea9ff823d5176a7702/image.png)
# <a class="anchor" id="Velocity_profiles"></a>Velocity profiles
The following figure shows the velocity profiles of inlet, outlet and minimum venturi section.
![image](uploads/78f793791414adfc9a56b3550d41066c/image.png)
To practice a little bit with this case, you may increase inlet velocity or fluid viscosity in order to increase Re number. With Reynolds two orders of magnitude higher, the flow is not stationary and the simulation diverges at t≃21s ([see venturi case animation](http://www.youtube.com/watch?feature=player_detailpage&v=lqJsO7gC02w)).
* * *
* * *
# <a class="anchor" id="Input_files"></a>Input files
* * *
## <a class="anchor" id="venturi_dat"></a>venturi.dat (case global parameters)
```
$----------------------------------------------------------—
RUN_DATA
ALYA: venturi $ case name
RUN_TYPE: Preliminary, Frequency=1e6 \ $ initial solution, write restart file frequency
No_restart
END_RUN_DATA
$----------------------------------------------------------—
PROBLEM_DATA
TIME_COUPLING: Global, From_critical $ Alya calculates global time step
TIME_INTERVAL= 0.0, 1.0e6 $ infinite integration time domain
NUMBER_OF_STEPS= 1.0e6 $ infinite time steps
NASTIN_MODULE: On $ nastin module (Incompressible Navier-Stokes) is used
END_NASTIN_MODULE
MAXIMUM_NUMBER_GLOBAL= 1 $ only used when coupling modules
END_PROBLEM_DATA
$----------------------------------------------------------—
```
* * *
## <a class="anchor" id="venturi_dom_dat"></a>venturi.dom.dat (domain input data)
```
$----------------------------------------------------------—
DIMENSIONS
NODAL_POINTS= 4361 $ number of nodes
ELEMENTS= 4200 $ number of elements
SPACE_DIMENSIONS= 2 $ 2D mesh
TYPES_OF_ELEMENTS= 12 $ 4 node quadrilateral elements
BOUNDARIES= 340 $ number of boundary edges
END_DIMENSIONS
$----------------------------------------------------------—
STRATEGY $ integration strategy
INTEGRATION_RULE: Open $ open rule is the default
DOMAIN_INTEGRATION_POINTS: 0 $ 0 = automatic, depending on each element type
END_STRATEGY
$----------------------------------------------------------—
GEOMETRY $ mesh definition
GROUPS= 20 $ number of groups (for deflation based solvers)
INCLUDE venturi.geo.dat $ include geometry file (nodes, elements & boundaries)
END_GEOMETRY
$----------------------------------------------------------—
SETS $ sets definition
INCLUDE venturi.set.dat $ include set file (groups for post-processing)
END_SETS
$----------------------------------------------------------—
BOUNDARY_CONDITIONS, EXTRAPOLATE $ edge BC’s extrapolate to nodes
INCLUDE venturi.fix.dat $ include boundary conditions file
END_BOUNDARY_CONDITIONS
$----------------------------------------------------------—
* * *
```
## <a class="anchor" id="venturi_geo_dat"></a>venturi.geo.dat (mesh data)
```
$----------------------------------------------------------—
NODES_PER_ELEMENT $ nodes per element list
1 4 $ element number, number of nodes 2 4 3 4 : : 4199 4 4200 4
END_NODES_PER_ELEMENT
$----------------------------------------------------------—
ELEMENTS $ element connectivity list
1 4370 4368 4369 4371 $ element number, node number 1, node number 2, ...
2 4367 4365 4368 4370
3 4362 4360 4365 4367
:
:
4199 32 29 28 33
4200 62 30 29 32
END_ELEMENTS
$----------------------------------------------------------—
COORDINATES
1 9.867555e-01 -6.000000e+00 $ node number, coordinate X, coordinate Y 2 9.710386e-01 -6.000000e+00 3 9.525975e-01 -6.000000e+00 : : 4370 9.867555e-01 6.000000e+00 4371 1.000000e+00 6.000000e+00
END_COORDINATES
$----------------------------------------------------------—
BOUNDARIES, ELEMENT
1 3471 3470 30 $ boundary element #, node #s, element # boundary belongs to
2 3470 3469 60
3 3469 3468 90
:
:
339 4366 4369 31
340 4369 4371 1
END_BOUNDARIES
MATERIALS, NUMBER=0, DEFAULT=1 $ all elements have material 1
END_MATERIALS
CHARACTERISTICS
END_CHARACTERISTICS
$----------------------------------------------------------—
```
* * *
## <a class="anchor" id="venturi_set_dat"></a>venturi.set.dat (set data: groups for post-processing, optional)
```
$----------------------------------------------------------—
ELEMENTS $ element sets definition
1 1 $ element number, set number
2 1
3 1
:
:
:
4199 1
4200 1
END_ELEMENTS
$----------------------------------------------------------—
BOUNDARIES $ boundary sets definition
1 1 $ boundary element number, boundary set number
2 1
3 1
:
:
:
339 4
340 4 $ 4 sets in total, 1 for each domain boundary
END_BOUNDARIES
$----------------------------------------------------------—
NODES $ node sets definition
0
END_NODES
$----------------------------------------------------------—
```
* * *
## <a class="anchor" id="venturi_fix_dat"></a>venturi.fix.dat (boundary conditions data)
```
$----------------------------------------------------------—
ON_BOUNDARIES
1 1 $ boundary element number, boundary number
2 1
3 1
:
:
:
339 4
340 4
END_ON_BOUNDARIES
$----------------------------------------------------------—
```
* * *
## <a class="anchor" id="venturi_ker_dat"></a>venturi.ker.dat (kernel input data)
```
$---------------------------------------------------------—
PHYSICAL_PROBLEM
PROPERTIES $ fluid physical properties
DENSITY: CONSTANT, PARAMETERS = 1.0 $ mass density
VISCOSITY: CONSTANT, PARAMETERS = 1.0e-2 $ dynamic viscosity (μ)
END_PROPERTIES
END_PHYSICAL_PROBLEM
$---------------------------------------------------------—
NUMERICAL_TREATMENT
MESH
DIVISION=0 $ mesh subdivisions (further runs with DIVISION=1, 2, 3)
END_MESH
ELSEST $ element search strategy
STRATEGY: BIN $ BIN divide mesh into boxes to find elements that host
witness points (suited for structured meshes)
NUMBER: 100,10 $ 2D domain divided in 100 x 10 boxes
END_ELSEST
SPACE_&_TIME_FUNCTIONS
FUNCTION=INFLOW $ function definition
1-x**2 $ parabolic function for inlet velocity
END_FUNCTION
END_SPACE_&_TIME_FUNCTIONS
END_NUMERICAL_TREATMENT
$---------------------------------------------------------—
OUTPUT_&_POST_PROCESS
ON_LAST_MESH
STEPS=10 $ write post-process file every ‘STEPS’ time steps
END_OUTPUT_&_POST_PROCESS
$---------------------------------------------------------—
```
* * *
```
## <a class="anchor" id="venturi_nsi_dat"></a>venturi.nsi.dat (incompressible Navier-Stokes solver parameters)
$---------------------------------------------------------—
PHYSICAL_PROBLEM
PROBLEM_DEFINITION
TEMPORAL_DERIVATIVES: On $ transient problem
CONVECTIVE_TERM: On $ off for Stokes flow (negligible for high viscosity fluids)
VISCOUS_TERM: LAPLACIAN $ suitable for constant viscosity fluid assumption
END_PROBLEM_DEFINITION
END_PHYSICAL_PROBLEM
$---------------------------------------------------------—
NUMERICAL_TREATMENT
ELEMENT_LENGTH: Minimum $ element length for Alya to calculate critical time step
STABILIZATION: ASGS $ numerical stabilization method
TIME_INTEGRATION: Trapezoidal, ORDER: 1, EULER=20 $ time integration scheme
SAFETY_FACTOR: 100 $ multiply global time step: Alya calculates critical time step
as required by explicit solvers, which is suited for transient
analysis but makes stationary solutions converge very slowly
STEADY_STATE_TOLER: 1.0e-10 $ convergence tolerance for steady state
MAXIMUM_NUMBER_OF_IT: 1 $ max number of inner NS iterations
CONVERGENCE_TOLERANCE: 1.0e-3 $ convergence tolerance for inner NS loop (useless in this case)
ALGORITHM: SCHUR $ NS solution algorithm (uncouples p & V)
END_ALGORITHM
MOMENTUM $ velocity solver
ALGEBRAIC_SOLVER
SOLVER: GMRES, KRYLOV=10 $ solver suited for asymmetric matrix
CONVERGENCE: ITERA=1000, TOLER=1.0e-12, ADAPTIVE, RATIO=0.001 $ max iter #, convergence criteria
ADAPTIVE, RATIO=0.001 means that the loop will end also if the difference of the norm of convergence value changes less than 0.1% in two consecutive iterations
OUTPUT: CONVERGENCE $ solver convergence file (.cso) is generated
PRECONDITIONER: DIAGONAL $ matrix preconditioner type
END_ALGEBRAIC_SOLVER
END_MOMENTUM
CONTINUITY $ pressure solver
ALGEBRAIC_SOLVER
SOLVER: DEFLATED_CG, COARSE: SPARSE $ CG solvers are suited for symmetric matrix
CONVERGENCE: ITERA=1000, TOLER=1.0e-12, ADAPTIVE, RATIO=0.001 $ max iter #, convergence criteria
ADAPTIVE, RATIO=0.001 means that the loop will end also if the difference of the norm of convergence value changes less than 0.1% in two consecutive iterations
OUTPUT: CONVERGENCE $ solver convergence file (.cso) is generated
PRECONDITIONER: DIAGONAL $ matrix preconditioner type
END_ALGEBRAIC_SOLVER
END_CONTINUITY
END_NUMERICAL_TREATMENT
$---------------------------------------------------------—
OUTPUT_&_POST_PROCESS
START_POSTPROCES_AT STEP = 0 $ initial step to post process
POSTPROCESS VELOCITY STEPS = 10 $ post process velocity every 10 steps (priority ker.dat)
POSTPROCESS PRESSURE STEPS = 10 $ post process pressure every 10 steps (priority ker.dat)
POSTPROCESS SHUR STEPS = 10 $ post process shur every 10 steps (priority ker.dat)
BOUNDARY_SET
FORCE $ obtain pressure & velocity forces acting on boundaries
TORQUE, CENTER=0,0,0 $ obtain torque of forces acting on boundaries, related to CENTER
MASS $ obtain mass flow through boundaries
END_BOUNDARY_SET
END_OUTPUT_&_POST_PROCESS
$---------------------------------------------------------—
BOUNDARY_CONDITIONS
PARAMETERS
INITIAL: COARSE $ domain velocity initialization (helps convergence)
END_PARAMETERS
CODES, NODES $ Boundary Conditions
1 00 0.000000 0.000000 $ outlet: free condition for Ux and Uy (p~0)
2 11 0.000000 -1.000000, SPACE_TIME_FUNCTION=INFLOW $ inlet: Uy = -1*INFLOW(x) ,inlet velocity parabolic
profile
3 11 0.000000 0.000000 $ wall condition: Ux = Uy = 0
4 10 0.000000 0.000000 $ symmetry condition: Ux = 0 , Uy = free
1 & 4 10 0.000000 0.000000 $ right lower corner
1 & 3 11 0.000000 0.000000 $ right upper corner
2 & 4 11 0.000000 -1.000000 $ left lower corner
2 & 3 11 0.000000 0.000000 $ left upper corner
END_CODES $ (note that BC’s apply to boundaries, not to boundary sets)
END_BOUNDARY_CONDITIONS
$---------------------------------------------------------—
```
* * *
## <a class="anchor" id="venturi_post_alya_dat"></a>venturi.post.alya.dat (alya2pos parameters)
```
$----------------------------------------------------------------—
DATA
FORMAT: visit $ also valid for ParaView
MARK_ELEMENTS: type $ to create automatic layers in post process according to some criterion
ELIMINATE_BOUNDARY_NODES: yes $ for parallel runs, to avoid node duplicity between subdomain
BOUNDARY: ON $ to post process boundary mesh
SUBDOMAINS, ALL $ subdomains (parallel partitions) to post process
END_SUBDOMAINS
$ SUBDOMAINS
$ 2 $ post process only subdomain 2
$ END_SUBDOMAINS
END_DATA
$----------------------------------------------------------------—
```
* * *
Clone repository
  • Home