Difference between revisions of "Lid driven cavity"

From Medusa: Coordinate Free Mehless Method implementation
Jump to: navigation, search
(Results)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Box-round|title= Related papers |
 +
[https://e6.ijs.si/ParallelAndDistributedSystems/publications/29512743.pdf G. Kosec; A local numerical solution of a fluid-flow problem on an irregular domain, Advances in engineering software, vol. 120, 2018 [DOI: 10.1016/j.advengsoft.2016.05.010]]
 +
}}
 +
 +
Click here to return back to [[Fluid Mechanics]]
 +
 
=Intro=
 
=Intro=
 
back to [[Fluid Mechanics]]
 
  
 
Let's try MLSM and described solution procedures first  on a lid driven cavity problem that stands for a standard benchmark test for validation of the fluid flow solvers. It has been proposed in 1982  and since then solved by many researchers with wide spectra of different numerical methods. The test is still widely studied and used for validation of novel methods and numerical principles. Case is schematically presented in <xr id="fig:lid_driven_scheme"/> followed by few basic analyses, just to show that things work as they should. Details about comparison can be found in [http://comms.ijs.si/~gkosec/data/papers/29512743.pdf paper]
 
Let's try MLSM and described solution procedures first  on a lid driven cavity problem that stands for a standard benchmark test for validation of the fluid flow solvers. It has been proposed in 1982  and since then solved by many researchers with wide spectra of different numerical methods. The test is still widely studied and used for validation of novel methods and numerical principles. Case is schematically presented in <xr id="fig:lid_driven_scheme"/> followed by few basic analyses, just to show that things work as they should. Details about comparison can be found in [http://comms.ijs.si/~gkosec/data/papers/29512743.pdf paper]
Line 11: Line 15:
  
 
=Code=
 
=Code=
The snippet of the MLSM code for an explicit ACM method with CBS looks like: (full examples, including '''implicit versions''', can be found under the examples in the code repository [[Main Page]]).
+
The snippet of the MLSM code for an explicit ACM method with CBS looks like: (full examples, including '''implicit versions''', can be found under the examples in the [https://gitlab.com/e62Lab/medusa code repository]).
 
<syntaxhighlight lang="c++" line>
 
<syntaxhighlight lang="c++" line>
 
     for (int step = 0; step <=O.t_steps; ++step) {
 
     for (int step = 0; step <=O.t_steps; ++step) {
 
         // Navier-Stokes
 
         // Navier-Stokes
         for (auto i:interior)  
+
         for (auto c:interior)  
 
             // Navier-Stokes
 
             // Navier-Stokes
 
             v2[c] = v1[c] + O.dt * ( - 1/O.rho    * op.grad(P1,c)
 
             v2[c] = v1[c] + O.dt * ( - 1/O.rho    * op.grad(P1,c)
Line 29: Line 33:
 
     }
 
     }
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
=Results=
 
=Results=
  

Latest revision as of 17:26, 23 October 2022

edit 

Related papers

G. Kosec; A local numerical solution of a fluid-flow problem on an irregular domain, Advances in engineering software, vol. 120, 2018 [DOI: 10.1016/j.advengsoft.2016.05.010]


Click here to return back to Fluid Mechanics

Intro

Let's try MLSM and described solution procedures first on a lid driven cavity problem that stands for a standard benchmark test for validation of the fluid flow solvers. It has been proposed in 1982 and since then solved by many researchers with wide spectra of different numerical methods. The test is still widely studied and used for validation of novel methods and numerical principles. Case is schematically presented in Figure 1 followed by few basic analyses, just to show that things work as they should. Details about comparison can be found in paper

FF .png Figure 1: Scheme of a lid driven cavity case

Code

The snippet of the MLSM code for an explicit ACM method with CBS looks like: (full examples, including implicit versions, can be found under the examples in the code repository).

 1     for (int step = 0; step <=O.t_steps; ++step) {
 2         // Navier-Stokes
 3         for (auto c:interior) 
 4             // Navier-Stokes
 5             v2[c] = v1[c] + O.dt * ( - 1/O.rho    * op.grad(P1,c)
 6                                      + O.mu/O.rho * op.lap(v1, c)
 7                                      -              op.grad(v1,c)*v1[c]);
 8         }
 9         // Mass continuity
10         for (auto i:interior) { 
11             P2[i] = P1[i] - O.dl * O.dt * O.rho * op.div(v2,i) + O.dl2 * O.dl * O.dt * O.dt * op.lap(P1,i);
12         }
13         v1.swap(v2);
14         P1.swap(P2);
15     }

Results

Lid driven contour Re3200.pngLid driven contour Re100.png


Lid driven explicit exec time.pngLid driven explicit convergence.png


Lid driven comparison.png Figure 2: Cross section velocity profiles.