Вы находитесь на странице: 1из 21

Creating & Editing Mesh

This tutorial will help you with mesh preparation. Mesh is necessary to start
working on most CFD-related task. Mesh represents a computational domain
determined by a geometry used during the meshing process.
Prerequisites:
1. STL geometry (or you can create new primitive geometry inside simFlow)
2. mesh created using external tool (or you can create it in simFlow)
Preparing your workspace mesh.
You have 2 ways:
1. Import from a file:
A. Click on the STL button in Geometry panel

B. Your geometry is imported and converted to OpenFOAM format.


Original file of the geometry stays untouched.
Two formats are currently supported for import: STL (ASCII and binary) and OBJ
(ASCII).
2. Create your own geometry:
A. choose from basic shapes - box, cylinder & sphere
B. modify shapes
a. change parameters (Origin, Dimensions) in Geometries panel

b. change parameters using mouse in 3D window:

while holding Ctrl button grab arrowhead to change the


Dimensions

while holding Ctrl button grab arrow shaft to change


the Origin

All dimensions are given in SI units


Each loaded geometry will be used to cut out with its contour an area of your
base mesh. Base mesh is a cuboid consisting of hexahedral elements. Each of

the base mesh boundaries can be later assigned with individual boundary
condition.
Create mesh
1. Go to Meshing panel

2. In Geometry tab define the meshing parameters for each created or


imported geometry

Create a boundary layer around the geometry. Click the 'Create


boundary layer' button and specify number of cells across the
boundary layer.

For each geometry define appropriate refinement level.

3. Switch to the Base tab.


This is where you create the initial mesh, that will be the base for the
meshing process.

Use the Autosize button to let simFlow choose the smallest


bounding box, to automatically adjust the size of the initial mesh, or

define the size of the initial mesh manually in Min & Max fields.

Change initial mesh size also using mouse in 3D window

holding Ctrl button grab arrowhead to change the Dimensions

holding Ctrl button grab arrow shaft to change the Origin

Set the density of the initial mesh by specifying divisions along each
axis of the global coordinate system.

4. Optionally in the Base tab expand the list of Boundaries of the initial mesh
to assign specific name and type to each planar boundary of the initial
mesh.

Define names such as 'inlet' and 'outlet' for appropriate planes

You can create your own boundary name in the field New name.

5. In the next tab pick a point inside the mesh.


The location of the point defines which volume will be filled with mesh.
Our geometry is a cylinder. If the point is inside the cylinder, then as a result of
meshing, everything that is outside the cylinder will be rejected.

type coordinates of the point

or pick a point from graphics


o

holding Ctrl button grab arrow to change position of the point

6. For advanced settings of mesh go to Controls tab.


7. Final step: Mesh tab.
A mesh defined in the previous panels will be created and then loaded.

Select Mesh in Parallel to make meshing operation faster.

Import mesh
If you already created your own mesh outside simFlow, you can import it.
1. Go to Import panel

2. Import from one of the available formats:

Fluent

Ansys

CFX

GAMBIT

I-DEAS

GMSH

OpenFOAM

Modify mesh
Even after you created a mesh, you can still perform operations on it.
1. Go to MeshTools
Most mesh modyfying operations can be reverted using Restore Previous
Meshbutton. You can think of this option as a 'One Level Undo', that lets you
bring back mesh if you performed an erroneous operation.
2. Choose desired operation:

Transform

Rescale your mesh if you, for example, created it in


centimeters.

Translate or Rotate your mesh if it was not created in global


coordinate system.

Refine
Refine your mesh in regions where higher resolution is required, e.g.
wake region of a vehicle.
You can either refine cells based on Geometry or cells next to a
Wall.
o

Refine Geometry:
Each selected cell of the mesh will be divided into two along
each axis of the coordinate system. You may also define
refinement directions, e.g. if you want to solve 2D problem,
you must refine cells along the axis parallel to the symmetry
plane. You may choose refinement option that uses local or

global coordinate system.

Select which geometry you want to refine

Choose Cut Method of cells

Define CoordinateSystem

Select refinement directions

Refine Wall
This option allows for refinement of cells adjacent to the wall.
Use this option if you want to create simplified boundary
layer.

Select boundary for refinement

Define Edge Weight to set size of new cells near


boundary.

Setting Edge Weight to 0.4 will cause the new cell near boundary to be 40% of
the original cell.

Zones
It is often necessary to define special physical models (e.g. porosity)
in certain areas of the domain. This can be achieved using a
concept of Cell Zone. Cell Zone is a list of cells where special
models can be applied to.

If you have already created zones and you want them to be


removed then select Cell Zones from first list.

Select geometries that will define your Cell Zones.

Click Modify Zones to change zones in your domain.

Patch
If you want to set different boundary conditions in distinct areas of
your mesh, you have to divide the mesh using patch function.
o

Use Auto Patch to let simFlow divide the mesh at chosen


angle (Split Angle)

Use additional geometry to divide mesh into desired areas

Select Extracting geometries which will indicate the


area that you want to belong to a new boundary

Select boundary to extract from

Utilities

Utils panel gives you a couple of options:


o

Check your mesh for potential errors

Renumber mesh

Case Setup
After your mesh is ready, it is time to choose what and how you want to solve
your case. To do that, you have to choose solver - an OpenFOAM application to
be used by simFlow.
Choose solver
Every solver is dedicated for different purposes. Choose the one that best fit your
needs.

1. Go to Setup panel

2. Using filters in lower part of the panel narrow down the list of solvers.
3. Select appropriate solver. Notice new panels appearing in the panel list on
the left.
Setting up selected solver
After you choose appropriate solver you need to configure its settings. To do that,
you have a wide range of panels, which are dependent on the selected solver.
Description of each requires a thorough analysis, which will be included in our
documentation soon. A collection of tutorials covering a wide range of topics can
be found in tutorials section.
Creating global parameters
It is useful to have parameters available throughout the whole process of
simulation. Parameter is simply a variable - a letter representing a number. They
help you to change values globally from one place.
There are 2 ways of defining a global parameter:

By putting name of the parameter and number into a chosen input field:

Parameter will be created automatically in Parameters panel:

By creating a new parameter through parameters panel:

What more can you do with parameters?

Define parameter as a formula.


o

Instead of number put a formula after equality sign, for example:


Uref=sqrt(a)*sin(x)+3

The same for Parameters panel:


Name field: Uref Formula field: sqrt(a)*sin(x)+3

Change parameter globally.


o

Go to Parameters panel

Select desired parameter from the list

Change value of formula in Formula field

Break the connection between a parameter and a previously assigned


value
o

Go to the input field you want to change

Fill in the field with a single value or formula (see example above:
defining a global parameter)

Initial Conditions
Initial conditions are basically the pressure, velocity and any other field values at
the moment t = 0.
Basic settings
1. Go to Initial conditions panel. Basic tab should appear,

2. In the p (field pressure) tab enter the number that is to be defined (in SI
units).

Alternatively, you can type in any pattern, which can be determined


by a formula.

Variables x, y, z are automatically reserved for the spatial


coordinates.

You can use global parameters.

3. In the U (velocity vector) tab enter the numbers that is to be defined (in SI
units).

3 input fields represent 3 coordinates: x, y, z

Above rules for formulas and global parameters apply here.

Advanced settings
In addition to basic settings, simFlow allows you to set initial conditions in 3 more
advanced methods. They can be applied simultaneously.

Potential Flow Initialization


simFlow before running the appropriate solver will calculate potential flow
solution (potential flow is a simplification of reality, a non-viscous flow). As a
result of these short preliminary calculations you obtain an approximation of the
flow field, which will result in shortening total calculation time.
When you should use this option?

When the results changing in time are more important than the initial
conditions of the simulation.

When stationary solver is chosen (finding fixed solution).

When it is better not to use this option?

When initial conditions are important to the result of your simulation.

In the case of non-stationary solver our initial conditions defined in the


Basic tab are modified. As a result, the evolution of flow in time starts not
with the initial conditions you set, but with what we get from potential flow
initialization.

How to use it?

1. Select the number of potential solver iterations.


Map Solution
This option lets you use results from previous projects in the present one. It
allows you to finish calculations faster.
When you should use this option? Consider 2 cases:
1. When you are solving similar cases and you know the approximate
solution of the problem. It is far better to start the calculation from the
point as close as possible to what we want to achieve.
How to do it?
A. Run and finish calculating solution in first case.
B. During configuration of the second, similar case select Map existing
results option and use this solution as the initial conditions for the
new task.
2. When you want to continue the calculation based on changed parameters,
eg. change boundary conditions after 50% of the simulation is done.
How to do it?
A. Run calculations in one project.
B. Copy project without solutions as a template.
C. Change the boundary conditions.
D. Set the initial conditions of the new project as an import from the
old one by selecting Map existing results option.
simFlow does not allow you to change essential solvers parameters during
calculations.This option gives you the possibility to calculate the same case with
changed parameters.
Patch
Patched geometries allows you to set specific initial conditions in a limited area.
1. Create auxiliary geometry where specific conditions should take place. You
can useprimitive geometries available in Geometries panel.
2. Go back to Initial Conditions panel, Advanced tab, patch section.
3. Select it from the list of geometries.

4. Add specific initial conditions of pressure field or velocity vector with


a + button.

5. Select where to apply chosen conditions.


The initial velocity vector (Basic tab) is set to u =(1, 0, 0). At this point, the
program will apply this setting in the entire mesh. But instead of the whole flow
domain, you want 50% of the domain to start with u=(0, 0, 0). You have to define
a geometry, where u=(0, 0, 0) is set inside. After you create the proper
geometry, for example box_special_conditions, go to the Initial conditions >
Advanced tab. In Patched geometries list select box_special_conditions and add
different initial velocity value equal to u=(0, 0, 0).
Boundary Conditions
CFD software like simFlow lets you predict what is happening inside your mesh
but is not aware of the phenomena on the boundaries. This panel lets you decide
what is happening in the boundary areas.
Setting appropriate boundary conditions helps define the interaction between
objects in your simulation and their surroundings. Understanding how you should
set and manage these variables is crucial for the accurate simulation results.
To set up boundary conditions:
1. Go to Boundary Conditions panel

2. Choose a boundary from the list of boundaries. You can define boundaries
in Mesh panel.
3. Define the character of a boundary.

Character is defined form a list of predefined conditions for all fields, so that
resulting combination represents a physical condition.
The list is dependant on the type of the boundary:

These predefined conditions are physical interpretations of a boundary. They set


appropriate parameters for chosen condition.
After predefined conditions are set you are still able to change each parameter
individually.
4. Define parameters: pressure and velocity, depending on which Character
of a boundary you selected.
When pressure inlet is chosen, the only thing you need to define is pressure
parameter. Velocity will be set for you. If you want, you still can change type of
velocity as well as the value itself.
Writing Results to Disk
After all the solution settings have been defined, the time has come to define
how to save the results. It is essential to define a reasonable amount of results,
as they can take a substantial amount of disk space.
simFlow will write results in a manner depending on the problem:

for transient problems - writing a new solution will occur in subsequent


iterations, after specific time step

for steady state problems - writing will occur in subsequent iterations,


saving intermediate results.

Setting how results are written


1. Go to Controls panel

2. Choose when your results are written to disk:

Time Step - result is saved after a defined number of steps. Single


step is a unitary part of a simulation.

Single time-step is t=0.01. If you set Write Interval to 10 steps (the default
setting), then simFlow will save the results at moments: t=0.1, 0.2, 0.3, ., t max

Run Time - result is saved after a defined simulation time; in case


of unsteady flow results may be written at the nearest
neighbourhood of the chosen Write Interval time.

As in the example above, you want to save the result every 0.1 seconds. Choose
Run Time and set Write Interval to 0.1.

Adjustable Run Time - this option should be set for unsteady


solvers; unlike Run Time result is saved precisely in the defined
Write Interval moment.

Secondary Write Control - backup result writing to disk set in seconds.


Clean Old Result Files - choose, if only final result is important; choose also
how many final steps are left in the process of cleaning.
Use it in the case of steady flow you are interested in final result, which is the
most accurate one. If you set Max No. of Files to 3, it means that at every step of
the iteration, 4th step from the end is cleared. The last 3 steps always remain on
a disk. Dont use it in the case of unsteady flow when not only in the final result
of the last step of a simulation counts, but also the course of changes in the
entire time of a simulation.
Time Step Controls - this option is available only when unsteady solver is
chosen. Choosing this option will allow simFlow to adjust time step of the
simulation in the case of an unsteady state. Time step is adjusted (limited by the
Max T) so that the Courant number calculated for each cell is below the Courant
number set in the Max Co field.

Max T - longest possible time step solver may choose automatically

Max Co - Courant number calculated based on CFL condition depends on


velocity, time step and smallest cell-size and is calculated for each cell.

Simulation in the first 10 seconds is smooth, then suddenly accelerates (this can
be set in Boundary Conditions panel). In this case, you need to reduce the time
step to run accurate simulation. To allow automatic selection of the time step,
depending on Courant number, choose Adjust Time Step option. Then set longest
possible time step solver may choose automatically. Set Courant number

appropriate for your calculations. CFL condition is a complex subject and is


described extensively on a CFD dictionary page.
Writing case settings
1. Go to Run panel

2. Click Write Case

Monitoring Results During Simulation


Before you run the calculations, one of the last things you can set are the
parameters to monitor physical values in the computational domain during
the simulation. Monitoring helps you to determine if the calculation is running
correctly or achieved convergence.
Setting up monitoring parameters
1. Go to Monitor panel

2. Choose where you want to monitor

For Volume/Boundary select appropriate tab and select parameters


to monitor.

For specific point in space select Probes tab


o

Add a Probe using Flag button.

Change location using mouse in 3D window - holding Ctrl


grab arrowhead.

Change location using X, Y, Z domains inputs.

Choose parameters to monitor.


Parameters that can be monitored are Minimum/Maximum,
Average or Integral value various parameters depending on
the selected solver.

3. Choose Forces tab to monitor lift coefficient on a boundary

choose boundary from the list

enter appropriate values for reference parameters as seen in the


picture:

Viewing monitored parameters


After the calculation has started, next to tabs: | Model | Residuals | above 3D
panel, additional tabs will appear. Each tab will represent graph for each of
the enabled monitors. Values are added after each time step. This way you
can watch results during the calculation process.

Running Calculations
Time has come to finally run your simulation. Go to Run panel to set up last
options.

Options that you can use:

number of processors in parallel calculations

start and end time of the simulation for unsteady flow

end time in case of steady flow becomes number of iterations

time step field to set the temporal resolution

Write Case data.

Click Run Calculation when you are ready.


Run window

An informative window of calculations in progress.

Use Interrupt button to stop calculations. All your data to this point will
remain untouched.

Console

Console panel showing all calculation output. It appears under 3D graphics


panel, after you start calculations or after any output becomes available.

Use [console button icon] button to manually show the console.

Charts

Charts panel appear with the beginning of calculations in the place of 3D


Graphics panel. On top of it you can see tabs:

Model-3D

Residuals - chart that shows error of a solution for subsequent iterations,


thus giving you an insight on:
o

the stage of the simulation.

the solution going in the wrong direction with current settings; this
way you can stop a time-consuming calculation and correct mesh or
other parameters

additional tabs representing monitored parameters.

Continue Calculation button


Button Continue Calculation becomes available instead of Run Calculation
button. It lets you continue calculation if you decide previous results are not
enough to represent a real-life situation.
1. Change simulation time in End Time field during or after previous
calculation is completed

2. Wait until Continue Calculation button becomes available and click it.
3. Previous results stay untouched, even when you interrupt calculations and
change time step. Further calculations will simply begin from the moment
they were stopped with changed time step.
Reset Calculation button
Reset Calculation button simply lets you delete result files. Reset should be
done when:

results are unsatisfactory

you want to make changes in simulation mode, mesh or boundary


conditions; without resetting the results these parameters are locked from
editing

Postprocessing
Postprocessing with ParaView

Most postprocessing is done in an outside program - ParaView. It has the


ability to make complex data processing. ParaView guides can be found
at The ParaView Tutorial site.
1. Go to Postprocessing panel after calculations are completed

2. Click Postprocess with ParaView button.


Exporting to other CFD software tools
You can export mesh and results to major CFD and postprocessing software
applications:

Fluent

Ensight

FieldView

Tecplot

VTK

1. Go to Postprocessing panel after calculations are completed

2. Select export format from the list


3. Click Export button
Simple postprocessing in simFlow
You can still do some postprocessing operations inside simFlow. The output is
presented in the console. You can use new results outside simFlow like.

Go to Postprocessing Calculate panel

If you want to calculate minimum / maximum or average value of a quantity:


1. Go to Fields tab

2. Select time range for which you want to calculate values.


3. Select quantity to analyse from the Field list.
4. Finish with Calculate button
Fields tab gives you also the possibility to calculate derrived quantity of a
quantity calculated during the simulation. New results will be included in data
used by ParaView.
You can calculate values in the same way for a boundary:
1. Go to Boundary tab

2. Select time range for which you want to calculate values.


3. Select Boundary Name

4. Select quantity to analyse from the Field list.


5. Select Calculation type: average or integral
6. Finish with Calculate button
If you want to calculate value of y+ or wall heat flux:
1. Go to Wall tab

2. Select time range for which you want to calculate values.


3. Select quantity to analyse from the Wall Calculation list.
4. Finish with Calculate button.

Вам также может понравиться