Vortex Development - von Karman Instability
The example shows the formation of vortices due to the von Karman instability. The geometry is a channel with a circular obstacle. The example is treated in two dimensions.
Open a terminal window and run:
$ single Job XXXX is submitted to default queue - interactive. Waiting for dispatch ... Starting on cnXX $ module load elmergui Loading qwt/6.0.2 Loading vtk/5.10.1 Loading ftgl/2.1.3-rc5 Loading qt/4.8.4 Loading paraview/3.98 Loading opencascade/6.5.5 Loading openmpi/1.8.1 Loading elmer/7.0 Loading elmergui/7.0 $ ElmerGUI
In the ElmerGUI menu select:
File -> Open circle_in_channel.in2d
Increase the mesh density
Mesh->Configure nglib / Max H: 0.02 Mesh Remesh
Once we have the mesh, we start defining the model,
Prepare the surfaces for specifying boundary conditions.
As a boundary condition we want to set the temperature on the inner edge of the wider part of the cylindrical openings. This surface is defined by six faces, so we must select the surfaces shown in red in the figure (composed of six faces).Select the first face by double-clicking on it; to select the following ones, hold down the CTRL key while double-clicking on the selected face. If you select the wrong face, double-click on that face again (while holding down the CTRL key). The CTRL key allows adding previously selected faces to, or removing them from, the selection. If the object is not oriented correctly, it can also be rotated during selection, as described above.
Once all boundary condition faces are selected, continue with:Mesh -> Unify Surface
We must also enter the model data. In doing so, we follow the items in the ‘Model’ drop-down menu in order (from top to bottom). The steps for our example are given below:
Define the general settings:
Model -> Setup Simulation Type = Transient Steady state max. Iter =1 Time Stepping Method = bdf BDF Order = 2 Time Step Intervals = 200 Time Step Sizes = $ 8/200 Apply
Definition of equations:
Select the relevant equations and parameters. In our example we use two solvers (called Equations in Elmer). For the fluid we use the fluid flow solver and the heat flow solver, and for the iron pipe only the heat flow solver.
Since we know the mesh and know that the fluid is represented by Body 1 and the pipe by Body 2, we will assign the solvers (Equation) and material to this geometry already when defining them.Model -> Equation Add Name = Navier-Stokes Apply to Bodies = 1 Select the 'Navier Stokes' tab and define: Active = on (i.e. tick the checkbox) Edit Solver Settings Nonlinear system Convergence tol. = 1.0e-4 Linear System Convergence tol. = 1.0e-6 Add OK
Define the materials. To define the material properties of water (at room temperature) and iron, we use the library: :
Model -> Material Add Material library Watter – room temperature (select from the menu) Apply to bodies = Body 1 (tick the checkbox) Add New Material library Iron generic (select from the menu) Apply to bodies = Body 2 (tick the checkbox) Add OK OK
Define the load:
Model -> Body force Add Select the Heat Equation tab Name = Heating Head Source = 0.01 Apply to bodies = Body 1 (tick the checkbox) Add OK
Define the boundary conditions:
Model -> Boundary condition Add Name = HotInFlow Heat Equation Temperature = 350.0 Navier-Stokes Velocity 1 = 0.0 Velocity 2 = 0.0 Velocity 3 = Variable Coordinate; Real MATC "100.0*(1.0e-4-tx(0)^2-tx(1)^2)" Add New Name = Outflow NaviewStokes Use normal-tangential coordinate system = on Velocity 2 = 0.0 Velocity 3 = 0.0 Add New Name = NoSlip Navier-Stokes NoSlip Wall BC = on Add New Name = Troom Heat Equation Temperatute = 300.0 Add OK OK OK OK
To help determine the inlet face, activate the compass:
View -> Compas = on (tick the option in the View menu)
The inlet face should be the one whose normal points parallel to the axis.:
To specify boundary conditions using the graphical interface
Model -> Set boundary properties (select, i.e. tick the option)
Double-click on the surface of the inlet line; a window for selecting boundary conditions opens. Under ‘Boundary condition’ select ‘Inlet’.
Double-click on the surface of the outlet line; a window for selecting boundary conditions opens. Under ‘Boundary condition’ select ‘Outlet’.Generate the input file for the ‘ElmerSolver’ program:
Sif -> Generate
The resulting file can be viewed by selecting from the menu:
Sif -> Edit
The file can then be edited, or closed with the command ‘File->Quit’.
Save the project (project data can be saved at any stage of input):
File -> Save Project To save the project, choose any directory (e.g. the subdirectory 'ProjectFiles').
Project data are loaded with: File -> LoadProject, selecting the directory where the data were saved.
Compute the example:
Run -> Start solver
.
To view the results, start the postprocessor:
Run -> postprocesor
To view all results in the postprocessor, we must reopen the file (File-Open). Pressing the All button loads the results of all time steps. A video of the simulation can then be viewed by pressing the Loop button in the Edit – Timestep Control menu. Below we show only the velocity distribution at time steps 20, 60, 100, 150 and 200.:

Time step 20.
.
Time step 60.
,
Time step 100.

Time step 150.

Time step 200.
Razvoj vrtinčenja - von Karmanova nestabilnost
Primer prikazuje nastanek vrtinčenja ot von Karmanove nestabilsnoti. Geometrija je cev z krožno oviro. Primer obravnavamo dvodimenzionalno.
Odpremo terminalsko okno in zaženemo:
$ single Job XXXX is submitted to default queue - interactive. Waiting for dispatch ... Starting on cnXX $ module load elmergui Loading qwt/6.0.2 Loading vtk/5.10.1 Loading ftgl/2.1.3-rc5 Loading qt/4.8.4 Loading paraview/3.98 Loading opencascade/6.5.5 Loading openmpi/1.8.1 Loading elmer/7.0 Loading elmergui/7.0 $ ElmerGUI
V meniju programa ElmerGUI izberemo:
File -> Open circle_in_channel.in2d
Povečamo gostoto mreže
Mesh->Configure nglib / Max H: 0.02 Mesh Remesh
Ko imamo mrežo, začnemo z definicijo modela,
Pripravimo ploskve za določitev robnih pogojev.
Kot robni pogoj želimo nastaviti temperaturo na notranjem robu širšega dela valjastih odprtin. To površino definira šest ploskev, zato moramo izbrati na sliki rdeče prikazane površine (sestavljene so iz šestih ploskev).Prvo ploskev izberemo z dvojnim klikom nanjo, za izbor naslednjih pa moramo držati tipko CTRL in hkrati izvesti dvojni klik na izbrani ploskvi. Če izberemo napačno ploskev ponovimo dvojni klik na tej ploskvi (ob hkratnem držanji tipke CTRL). Tipka CTRL omogoča dodajanje ali odvzemanje predhodno izbranih ploskev k izboru. Če objekta ni pravilo orientiran, ga med izborom lahko tudi rotiramo, kot je opisano zgoraj.
Ko izberemo vse ploskve robnih pogojev nadaljujemo z:Mesh -> Unify Surface
Podati moramo še podatke modela. Pri tem po vrsti (od vrha proti dnu) sledimo navedbam v padajočem meniju ‘Model’. V nadaljevanju podajamo korake našega priemra:
Definiramo splošne nastavitve:
Model -> Setup Simulation Type = Transient Steady state max. Iter =1 Time Stepping Method = bdf BDF Order = 2 Time Step Intervals = 200 Time Step Sizes = $ 8/200 Apply
Definicija enačb:
Izveremo relevantne enačbe in parametre. V našem primeru uporabimo dva solverja (v Elmerju imenovana Equations). Za tekočino uporabimo solver za pretk tekočine in solver za pretok toplote, za železno cev pa le solver za pretok toplote.
Ker poznamo mrežo in vemo, da tekočino predstavlja Body 1, cev pa Body 2 bomo tej geomertiji dodelili solverje (Equation) in materialu že ob njihovi definiciji.Model -> Equation Add Name = Navier-Stokes Apply to Bodies = 1 Izberemo jeziček 'Navier Stokes' in definiramo: Active = on (tj postavimo kljukico) Edit Solver Settings Nonlinear system Convergence tol. = 1.0e-4 Linear System Convergence tol. = 1.0e-6 Add OK (V redu)
Definiramo materiala. Za definicijo materilanih lastnosti vode (sobne temperature) in železa uporabimo knjižnico: :
Model -> Material Add Material library Watter – room temperature (izberemo iz menija) Apply to bodies = Body 1 (postavimo kljukico) Add New Material library Iron generic (izberemo iz menija) Apply to bodies = Body 2 (postavimo kljukico) Add OK OK
Definiramo obtežbo:
Model -> Body force Add Izberemo jeziček Heat Equation Name = Heating Head Source = 0.01 Apply to bodies = Body 1 (postavimo kljukico) Add OK (V redu)
Definiramo robne pogoje:
Model -> Boundary condition Add Name = HotInFlow Heat Equation Temperature = 350.0 Navier-Stokes Velocity 1 = 0.0 Velocity 2 = 0.0 Velocity 3 = Variable Coordinate; Real MATC "100.0*(1.0e-4-tx(0)^2-tx(1)^2)" Add New Name = Outflow NaviewStokes Use normal-tangential coordinate system = on Velocity 2 = 0.0 Velocity 3 = 0.0 Add New Name = NoSlip Navier-Stokes NoSlip Wall BC = on Add New Name = Troom Heat Equation Temperatute = 300.0 Add OK OK OK OK (V redu)
Za pomoč pri določivi vhodne ploskve aktiviramo kompas:
View -> Compas = on (odkljukamo opcijo v meniju View)
Vhodna ploskev naj bo tista tatere normala kaže vzporedno z osi.:
Za določitev robnih pogjev s pomočjo grafičnega vmesnika
Model -> Set boundary properties (izberemo oz odkljukamo opcijo)
Dvokiknemo na površino vhodne linije, odpre se nam okno za izbiro robnih pogojev. Pod ‘Boundary condition’ izberemo ‘Inlet’.
Dvokiknemo na površino izhodne linije, odpre se nam okno za izbiro robnih pogojev. Pod ‘Boundary condition’ izberemo ‘Outlet’.Generiramo vhodno datoteko za program ‘ElmerSolver’:
Sif -> Generate
Nastalo datoteko si lahko ogledamo z izbiro iz menija:
Sif -> Edit
Datoteko lahko nato uredimo, ali zapustimo z ukazom ‘File->Quit’.
Shranimo projekt (Podatke projekta lahko shranimo v poljubni vazi vnosa):
File -> Save Project Za shranjevanje projekta izberemo poljuben direktorij (npr. poddirektorij 'ProjectFiles').
Podatke projekta prikličemo z: File -> LoadProject in izberemo dorektorij, kamor smo podatke shranili.
Izračunamo primer:
Run -> Start solver
.
Za ogled rezultatov poženemo postprocesor:
Run -> postprocesor
Da si v postprocesorju lahko ogledamo vse rezultate moramo ponovno odpreti datoteko (File-Open). Ob pritisku na gumb All se naložijo izračuni vseh časovnih korakov. Video simulacije si nato lahko ogledamo z pritiskom gumba Loop v meniju Edit – Timestep Control. V nadaljevanju prikazujemo le distribucijo hitrosti pri časovnih korakih 20, 60, 100, 150 in 200.:

Časovni korak 20.
.
Časovni korak 60.
,
Časovni korak 100.

Časovni korak 150.

Časovni korak 200.