how to get contour surface position by openfoam
Post on 15-Aug-2015
268 Views
Preview:
TRANSCRIPT
How to get contour surface position by OpenFOAM
Osaka Univ.Takuya Yamamoto
Target geometryOpenFOAM tutorial of dam break (interFoam) in 3D
Ini$al condi$on The interface is assumed to be contour surface of alpha1 = 0.5.
Numerical results of interface position
Getting the position of contour surface
We can get the contour surface posiDons aEer carrying out the mulDphase flow simulaDons and by using either of the following opDons
• OpenFOAM sample uDlity
• ParaView opDons
Paraview?
VisualizaDon toolbox made by Sandia NaDonal Laboratories The latest Ver. 4.3.1 Used for OpenFOAM visualizaDon
www.paraview.org
sample utility
One of the uDliDes implemented in OpenFOAM
• Get data along lines (sets) • Get data along surfaces (surface)
To get contour surface posiDon
surface type: isoSurface
How to use sample uDliDes is in OpenFOAMwiki、sampleDict examples OpenFOAM wiki (hUps://openfoamwiki.net/index.php/Sample) sampleDict examples(uDlity/postProcessing/sampling/sample/sampleDict)
How to write sampleDict file
In system/sampleDict
surfaces ( isoSurface { type isoSurface; isoField alpha1; isoValue 0.5; interpolate true; } )
Name (Whatever you want)
OpDon for obtaining isosurface data Variables used for contour Iso-‐surface value OpDon for interpolaDon
Open the test case
Executing sample
Execute sample in a case directory (in the same folder as 0, constant, system)
AEer execuDng the sample command, a folder named ‘surface’ is created. In the folder, there are sampled values (contour posiDons)
(To execute, simply type ‘sample’ without the quotes in the case directory)
By using paraview
Choose Contour
Choose File/Save Data
By using paraview
A new window opens automaDcally. Input saving file name. Choose file format as csv
By using paraview
A new window opens automaDcally.
When you choose Write All Time Steps, the contour data is automaDcally outpuUed.
Choose OK
By using paraview
Output files are Filename.*.csv The contour surface posiDon is in the file.
*: Output step number
By using paraview
Summary
• Two methods to get contour posiDon are explained. • By using OpenFOAM, sample uDlity can be used for gegng contour posiDons.
• In addiDon to the OpenFOAM uDlity, we can get contour posiDons by using ParaView.
Please let me know if there are other methods.
Reference
• https://openfoamwiki.net/index.php/Sample• www.paraview.org
top related