Example 338: Solving 2d Navier-Stokes equations

Solving the 2d non-dimensional Navier-Stokes equations in a rotating cylinder.


The comfile run by this example is as follows:

# example_338.com - Solving Navier-Stokes flow in a rotating cylinder

fem
fem def para;r;circle;example # Define parameters to allow Voronoi arrays to be used.

fem def node;r;circle;example # Define the nodes of the Voronoi/Delaunay mesh.
fem def base;r;circle;example # Define 2d simplex basis functions.
fem def elem;r;circle;example # Define triangular simplex elements.
fem update delaunay           # Update the Delaunay triangulation to ensure Delaunayism
fem def mesh;r;circle;example # Define a Voronoi mesh. 
fem def equa;r;circle;example # Define equation type. This will be a time integration,
                              # Navier Stokes equation, of a general type, solved 
                              # using finite volumes.
fem def mate;r;circle;example # Define material. This is unimportant as the equations
                              # solved are non-dimensional, ie only depend on the 
                              # Reynolds number. These parameters are used only for
                              # conversion back to dimensional form. This has not
                              # been implemented yet.
fem def init;r;circle;example # Define initial (boundary) conditions. This involves
                              # defining the type (and velocity if using inlet or
                              # wall boundary conditions) at each boundary (B) Voronoi
                              # node.
fem def solv;r;circle;example # Define the solution parameters. 
                              # Always use automatic stepping unless stupid.
                              # As the mesh is fixed, you want to use a sparse LU 
                              # solver (only needs to be factorised once). 
                              # Use QUICK advection (best for steady state cases).
                              # The Courant number scales the maximum allowable
                              # time step by a factor of safety, should be between
                              # 0.3 and 0.7.
fem solv                      # Solve it to steady state.
 

Additional testing commands:

fem list node solution

Files used by this example are:

Name                  Modified     Size

example_338.com 20-Nov-2001 2.0k circle.ipbase 10-Apr-2000 1.0k circle.ipelem 10-Apr-2000 38k circle.ipequa 26-May-2003 1.3k circle.ipinit 10-Apr-2000 7.9k circle.ipinit.8jun99 10-Apr-2000 7.9k circle.ipmate 10-Apr-2000 686 circle.ipmesh 06-Nov-2001 947 circle.ipnode 10-Apr-2000 13k circle.ippara 12-Nov-2002 5.8k circle.ipsolv 13-Apr-2007 2.7k test_output.com 10-Apr-2000 23

Download the entire example:

Name                      Modified     Size

examples_3_33_338.tar.gz 14-Apr-2007 15k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:01:51 20160
cm-debugSuccessSat Mar 5 00:02:07 20161
mips-irix
cmSuccessSun Aug 19 01:30:37 20075
cm-debugSuccessWed Aug 15 01:29:06 200713
cm-debug-clear-mallocSuccessSat Aug 18 01:35:24 200720
cm-debug-clear-malloc7SuccessMon Aug 20 01:31:20 200716
cm64SuccessSun Aug 19 01:30:43 20075
cm64-debugSuccessTue Aug 21 01:28:57 200714
cm64-debug-clear-mallocSuccessThu Apr 1 10:13:31 20046
rs6000-aix
cmSuccessWed Mar 4 01:07:08 20091
cm-debugSuccessMon Mar 2 01:07:56 20093
cm64SuccessWed Mar 4 01:07:08 20091
cm64-debugSuccessTue Mar 3 01:13:14 20093
x86_64-linux
cmSuccessSun Mar 6 00:01:02 20160
cm-debugSuccessSat Mar 5 00:01:13 20161

Testing status by file:


Html last generated: Sun Mar 6 05:50:18 2016

Input last modified: Fri Apr 13 10:32:41 2007


CMISS Help / Examples / 3 / 33 / 338