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

DOFI 1.0.

1: Tutorial guide
Tutorial 5: 2D projectile





DOFI tutorial

2 | P a g e



CONTENTS
TUTORIAL 5: 2D PROJECTILE .................................................................................................. 3
1 INTRODUCTION .................................................................................................................... 3
2 PROBLEM SPECIFICATION ................................................................................................. 3
2.1 DESCRIPTION ..................................................................................................................... 3
2.2 BOUNDARY CONDITIONS ................................................................................................... 4
3 PREPARATION AND TUTORIAL ......................................................................................... 4
3.1 MESH ................................................................................................................................ 4
3.1.1 Read mesh file........................................................................................................... 5
3.1.2 Check mesh ............................................................................................................... 6
3.1.3 Rescale mesh ............................................................................................................. 7
3.2 PROBLEM SETTING UP ........................................................................................................ 8
3.2.1 Solver selection ......................................................................................................... 8
3.2.2 Turbulence model selection ...................................................................................... 9
3.2.3 Material selection .................................................................................................... 10
3.2.4 Boundary condition ................................................................................................. 12
3.3 SOLUTION CONTROL ........................................................................................................ 16
3.3.1 Solution ................................................................................................................... 17
3.3.2 Initialization ............................................................................................................ 18
3.3.3 Computing............................................................................................................... 18
3.4 RUNNING THE SIMULATION ............................................................................................. 19
3.5 DISPLAY RESULTS USING PARAVIEW ............................................................................... 21
3.6 POST PROCESSING ........................................................................................................... 23
4 CONCLUSION ....................................................................................................................... 23


DOFI tutorial

3 | P a g e

TUTORIAL 5: 2D PROJECTILE
1 INTRODUCTION
In this tutorial, DOFIs density-based implicit solver is used to predict the time-dependent flow
over a 2D projectile. The density based is solver based on a central-upwind schemes of
Kurganov and Tadmor.
This tutorial demonstrates how to:
- Calculate a steady-state solution for compressible problem
- Calculate a transient solution using the second-order implicit unsteady formulation and
the density-based implicit solver.
- Control the calculation process.
2 PROBLEM SPECIFICATION
2.1 DESCRIPTION
The description of the proposed case is shown in the below figure.

Figure 2-1: 2D projectile simulation domain


15l
15l
20l
l
Mach 1.1
DOFI tutorial

4 | P a g e

2.2 BOUNDARY CONDITIONS
All of boundary conditions are listed in the below table:

Inlet Velocity inlet
Mach 1.1
Hydraulic diameter 0.001 (m)
Turbulent intensity 10%
Outlet Pressure Outlet
Pressure 0 (Pa)
Projectile Wall 0(m/s)
Rotate Grad (P)=0
Fluid properties Density
Viscosity
1.225kg/m
3

1.79e
-5
(kg/ms)
Operating conditions Reference pressure 100 000 (Pa)

Table 2-1: Definition of boundary conditions
3 PREPARATION AND TUTORIAL
Fluent mesh format is used in this tutorial. You can get the mesh in the following directory:
~/DOFI/tutorial/ /DOFI/runcases / DOFI_tutorial06/2D_projectile.msh
The original files in the Tutorial folder contain all the recommended setting for the proposed
test-case. For backup purpose, user is invited to copy this test-case in to his/her working folder,
i.e. ~/DOFI/working. In order to do so, copy test-case from:
~/DOFI/tutorial/ /DOFI/runcases / DOFI_tutorial05/2D_projectile
to ~/DOFI/working folder.
User can now safely manipulate the test case without modifying the original one. Lets begin by
starting DOFI

3.1 MESH
DOFI provides a way to import mesh from various mesh creators such as Gambit, T-Grid,
STAR-CCM, FLUENT In order to convert mesh into DOFI format, user must select the
proper tool for the mesh file format. User can refer to the DOFI USER GUIDE for additional
information.
DOFI tutorial

5 | P a g e

3.1.1 Read mesh file
DOFI will prompt you to select the mesh in FLUENT format to import like Figure 3-1

Figure 3-1: Window of selecting mesh
Navigate to your working directory and select the file windTurbine.msh. After imported mesh,
Cell zones are displayed from FLUENT mesh. Once the mesh is imported, you will be prompted
to select the mesh dimension.

DOFI tutorial

6 | P a g e

3.1.2 Check mesh
Mesh stats
points: 233888
internal points: 0
faces: 594499
internal faces: 274119
cells: 159185
boundary patches: 4
Overall number of cells of each type:
hexahedra: 72693
prisms: 86492
Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).
Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
inlet 178 358 ok (non-closed singly connected)
outlet 59 120 ok (non-closed singly connected)
projectile 1773 3546 ok (non-closed singly connected)
frontAndBackPlanes 318370 233888 ok (non-closed singly connected)
Checking geometry...
Overall domain bounding box (-4908.52 -5990.53 -205.716) (6757.72 5990.53 205.716)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 0)
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (2.32402e-018 3.60937e-018 7.41942e-025) OK.
Max cell openness = 3.52072e-016 OK.
Max aspect ratio = 22.3295 OK.
Minumum face area = 0.00232474. Maximum face area = 140284. Face area magnitudes OK.
Min volume = 0.956476. Max volume = 1.45685e+007. Total volume = 5.75014e+010. Cell
volumes OK.
Mesh non-orthogonality Max: 44.5532 average: 10.8549
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 2.16054 OK.
Coupled point location match (average 0) OK.
Mesh OK.


DOFI tutorial

7 | P a g e

3.1.3 Rescale mesh
In the check mesh details, overall domain bounding box show that the domain is too big because
of the difference between unit of origin mesh and default unit of DOFI. Therefore, user needs to
rescale mesh into desired parameter. In this case, mesh will be rescaled one thousandth to reach
right dimensions of the projectile.

Figure 3-2: Scale mesh



Figure 3-3: Mesh after conversion process

DOFI tutorial

8 | P a g e

3.2 PROBLEM SETTING UP
3.2.1 Solver selection
Follow the selection in Figure 3
about all available solvers, please refer to the DOFI USER GUIDE.
Click on OK to confirm the selection. A warning window announces
be changed, just click on Yes to validate

3-4 and select rhoCentralFoam solver. For further
about all available solvers, please refer to the DOFI USER GUIDE.
Figure 3-4: Solver selection window
selection. A warning window announces that all after
to validate.
Figure 3-5: Warning window
further information

after parameters will

DOFI tutorial

9 | P a g e

3.2.2 Turbulence model selection
Choose an appropriate turbulence model. Turbulence models are classified into 3 major groups:
Laminar, LES and RANS. This solver just permits correcting velocity using Laminar or RANS
model and in this tutorial, the popular RANS k
Figure
- Check the RANS button and select
- Click on OK button to confirm your selection. A new window containing all the default
coefficients of turbulent model opens
default values areapplied.
Note: click on Reset button to restore the turbulence coefficients
Pre-processing Turbulence model

selection
Choose an appropriate turbulence model. Turbulence models are classified into 3 major groups:
Laminar, LES and RANS. This solver just permits correcting velocity using Laminar or RANS
model and in this tutorial, the popular RANS k-epsilon model is selected.

Figure 3-6:Turbulence selection window
button and select kEpsilon model.
button to confirm your selection. A new window containing all the default
coefficients of turbulent model opens and user can modify these values. Otherwise, the
default values areapplied.
Reset button to restore the turbulence coefficients to their default values
Turbulence model
Choose an appropriate turbulence model. Turbulence models are classified into 3 major groups:
Laminar, LES and RANS. This solver just permits correcting velocity using Laminar or RANS

button to confirm your selection. A new window containing all the default
user can modify these values. Otherwise, the
to their default values
DOFI tutorial

10 | P a g e

Figure
- Click on OK button to finalize the turbulence selection step.

3.2.3 Material selection


To define material, follow these steps
- Select an existing material
parameter in the Edit window like
Pre-processing Material


Figure 3-7: Turbulence models coefficients
button to finalize the turbulence selection step.
follow these steps
Select an existing material Air in the material list. Click on Select and modify some
parameter in the Edit window like Figure 3-8
Material
and modify some
DOFI tutorial

11 | P a g e

Figure



Figure 3-8: Material window

Figure 3-9: Material modification window

DOFI tutorial

12 | P a g e

After having defined and selected new materials, then click on OK button at the bottom of
material window to confirm your selections. User can either create new fluid with all new value
by clicking on New material button and following the steps like some first tutorials.

3.2.4 Boundary condition
Boundary condition is managed by boundary names which are set up in the mesh creation. User
is not allowed to modify these names. In order to have a visualization of the working boundary,
user can display it by selecting their names in the upper right corner part of DOFI window.



Figure 3-10: Boundary condition window
Pre-processing Boundary condition
DOFI tutorial

13 | P a g e



Figure 3-11: Mesh display module

In order to set boundary conditions, follow these steps:
- Select the boundary name in the boundary condition window.
- Click on the drop-down list Type at the bottom of the window and select an appropriate
boundary condition.
- Once the type is selected, window will be opened to set all the necessary information for
the current boundary type. After setting all the information, user must click OK button to
confirm. Otherwise, the current boundary will be left unchanged.

Figure 3-12: Working condition window
DOFI tutorial

14 | P a g e

For this tutorial, user must set the boundary conditions for all the boundaries as in the following
figures

Figure 3-13: Momentum boundary condition of inlet

Figure 3-14: Thermal boundary condition of inlet
DOFI tutorial

15 | P a g e



Figure 3-15: Momentum boundary condition of outlet


Figure 3-16: Thermal boundary condition of outlet
DOFI tutorial

16 | P a g e


Figure 3-17: Momentum boundary condition of projectile

Figure 3-18: Thermal boundary condition of projectile
When importing a 2D mesh from FLUETN, the third dimension will be automatically added.
User must consider this value for calculating reference values. Default names of added boundary
will be frontAndBackPlanes and its type is empty.
3.3 SOLUTION CONTROL
This part controls the use of derivation schemes for gradient, Laplace, div and time component in
the governing equations of the problem which will decide the accuracy order of your problem,
i.e. these schemes can be of first order, second orderand so on. For the meantime, these
options are quite abundant. User should leave them unchanged as default settings.
DOFI tutorial

17 | P a g e

Solution control includes 3 parts
3.3.1 Solution

The relaxation factors option is only available for the Pimple and Simple pressure
coupling method. For further information, user can refer to the DOFI
In the solver part, use of algebraic solver for each parameter can be chosen. These options
be left unchanged. Click on OK button to confirm your setting.
Solution Solution

Solution control includes 3 parts

Figure 3-19: Solution control
option is only available for the Pimple and Simple pressure
information, user can refer to the DOFI USER GUIDE.

Figure 3-20: Set relaxation factor
part, use of algebraic solver for each parameter can be chosen. These options
button to confirm your setting.
Solution

option is only available for the Pimple and Simple pressure-velocity
USER GUIDE.
part, use of algebraic solver for each parameter can be chosen. These options should
DOFI tutorial

18 | P a g e

3.3.2 Initialization
This section describes the initialization
the picture below.

3.3.3 Computing
This section details how the simulation runs and writes data. For a better understanding of each
term, user can refer to the USER GUIDE DOFI. However, these parameters are brief explained
here after:
- Start time: by default the simulation begins from t=0 s. However, in case use
run simulations for and do not want to start over again, DOFI is very flexible. Switch
from Begin to Latest to start your simulation with the latest results
- Write control: define the timing of writing output files. Steady state solver is set
step for Write control
- End time: Define maximum number of iteration
- Write interval: the interval in term of second or iteration to write output to file

Solution Initialization

the initialization. In this tutorial, user needs to initialize


Figure 3-21: Initialization window

how the simulation runs and writes data. For a better understanding of each
term, user can refer to the USER GUIDE DOFI. However, these parameters are brief explained
: by default the simulation begins from t=0 s. However, in case use
run simulations for and do not want to start over again, DOFI is very flexible. Switch
to start your simulation with the latest results
: define the timing of writing output files. Steady state solver is set
: Define maximum number of iteration
the interval in term of second or iteration to write output to file
Initialization
data as shown in

how the simulation runs and writes data. For a better understanding of each
term, user can refer to the USER GUIDE DOFI. However, these parameters are brief explained
: by default the simulation begins from t=0 s. However, in case user has already
run simulations for and do not want to start over again, DOFI is very flexible. Switch
: define the timing of writing output files. Steady state solver is set Time
the interval in term of second or iteration to write output to file
DOFI tutorial

19 | P a g e


3.4 RUNNING THE SIMULATION
While setting of all parameters is done, user can now launch the simulation. In the control bar of
DOFI, click the run button to start the simulation.
User will be prompted to select the
size which means the number of cells in the mesh is smaller or around 30000, user can simply
choose sequence.

Figure 3-22: Calculation window
ULATION
While setting of all parameters is done, user can now launch the simulation. In the control bar of
to start the simulation.

Figure 3-23: Control bar of DOFI
User will be prompted to select the Sequential or Parallel simulation mode. For a small mesh
size which means the number of cells in the mesh is smaller or around 30000, user can simply


While setting of all parameters is done, user can now launch the simulation. In the control bar of
simulation mode. For a small mesh
size which means the number of cells in the mesh is smaller or around 30000, user can simply
DOFI tutorial

20 | P a g e

Figure 3-24: Simulation control
With larger mesh, the Parallel mode would be very useful to reducing simulation time. In order
to compute in Parallel mode, please follow these steps
- When user switches to Parallel option and if this case has never been run in parallel
mode, a window will appear for additional actions to be correct out.

Figure 3-25: Parallelizations warning window
- Click on Yes to process if user has already run this case with parallelization process.
Otherwise, click on No to choose some parameters for Parallelization process then a new
window called Parallelization will appear as shown in Figure 3-26.
+ Method: include Hierarchical and Simple. This is the name of the algorithm
employed for this process.
+ Number of processors is the product of the number of domain with the X, Y and Z
direction. User can select the distribution of the computational domain, divide it
into many part in X, Y or Z direction.

Figure 3-26: Parallelize window
+ Delta: this value sets up the matching tolerance of the geometry in the
parallelization process, in which the computational domain will be decomposed
into many parts and computed on a separated process or processor. By default,
this value is set to 10
-5
.
DOFI tutorial

21 | P a g e


- After having set all the required parameters, click OK to confirm. A warning window will
appear as shown in the following figure.


Figure 3-27: Parallelize window
- Select OK to process. The old folder processors store all the temporary files during the
computing process in parallel mode.
3.5 DISPLAY RESULTS USING PARAVIEW
From Paraview, display of results is straight forward and easy to plot contour, vector field,
streamlines Refer to the first tutorial for more information about using Paravew.

Figure 3-28: Distribution of Mach number
DOFI tutorial

22 | P a g e


Figure 3-29: Contour of pressure

Figure 3-30: Temperature field


DOFI tutorial

23 | P a g e

3.6 POST PROCESSING
Post processing contains many useful tools which helps user to proceed with simulation data
such as integral or weighted average integral over a specific computational domain.

Refer to the first tutorials to know how to use this function.
4 CONCLUSION
In this tutorial, the transient flow of air over the object was studied. You learned how to generate
a density-based unsteady-state solution, setup boundary conditions for a compressible problem.
The tutorial also showed a simple approach of DOFI. The result proves the DOFI ability in
simulating compressible flow.
Post-processing Report

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