mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'merge-foundation' of develop.openfoam.com:Development/OpenFOAM-plus into merge-foundation
This commit is contained in:
@ -28,6 +28,18 @@
|
|||||||
# Miscellaneous functions for running tutorial cases
|
# Miscellaneous functions for running tutorial cases
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#
|
||||||
|
# Look for '-parallel' in the argument list.
|
||||||
|
#
|
||||||
|
isParallel()
|
||||||
|
{
|
||||||
|
for i; do [ "$i" = "-parallel" ] && return 0; done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Look for '-test' in the argument list.
|
||||||
|
#
|
||||||
isTest()
|
isTest()
|
||||||
{
|
{
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
|
|||||||
@ -14,32 +14,27 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "include/initialConditions"
|
||||||
|
|
||||||
dimensions [0 0 0 1 0 0 0];
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
internalField uniform 300;
|
internalField uniform $temperature;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
INLE1
|
"(inlet|outlet).*"
|
||||||
{
|
{
|
||||||
type inletOutlet;
|
type inletOutlet;
|
||||||
inletValue uniform 300;
|
inletValue uniform $temperature;
|
||||||
value uniform 300;
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUTL2
|
"sym.*"
|
||||||
{
|
|
||||||
type inletOutlet;
|
|
||||||
inletValue uniform 300;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
SYMP3
|
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
WALL10
|
"wall.*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,35 +14,37 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "include/initialConditions"
|
||||||
|
|
||||||
dimensions [0 1 -1 0 0 0 0];
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform (600 148.16 0);
|
internalField uniform $flowVelocity;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
INLE1
|
"inlet.*"
|
||||||
{
|
{
|
||||||
type supersonicFreestream;
|
type supersonicFreestream;
|
||||||
pInf 100000;
|
pInf $pressure;
|
||||||
TInf 300;
|
TInf $temperature;
|
||||||
UInf (600 148.16 0);
|
UInf $flowVelocity;
|
||||||
gamma 1.4;
|
gamma 1.4;
|
||||||
value uniform (600 148.16 0);
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUTL2
|
"outlet.*"
|
||||||
{
|
{
|
||||||
type inletOutlet;
|
type inletOutlet;
|
||||||
inletValue uniform (600 148.16 0);
|
inletValue uniform $flowVelocity;
|
||||||
value uniform (600 148.16 0);
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYMP3
|
"sym.*"
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
WALL10
|
"wall.*"
|
||||||
{
|
{
|
||||||
type noSlip;
|
type noSlip;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,21 +21,18 @@ internalField uniform 0;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
INLE1
|
"(inlet|outlet).*"
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
OUTL2
|
|
||||||
{
|
"sym.*"
|
||||||
type calculated;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
SYMP3
|
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
WALL10
|
|
||||||
|
"wall.*"
|
||||||
{
|
{
|
||||||
type compressible::alphatWallFunction;
|
type compressible::alphatWallFunction;
|
||||||
Prt 0.85;
|
Prt 0.85;
|
||||||
|
|||||||
@ -15,35 +15,33 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "include/initialConditions"
|
||||||
|
|
||||||
dimensions [0 2 -3 0 0 0 0];
|
dimensions [0 2 -3 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 25000;
|
internalField uniform $turbulentEpsilon;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
INLE1
|
"(inlet|outlet).*"
|
||||||
{
|
{
|
||||||
type inletOutlet;
|
type inletOutlet;
|
||||||
inletValue uniform 25000;
|
inletValue uniform $turbulentEpsilon;
|
||||||
value uniform 25000;
|
value $internalField;
|
||||||
}
|
}
|
||||||
OUTL2
|
|
||||||
{
|
"sym.*"
|
||||||
type inletOutlet;
|
|
||||||
inletValue uniform 25000;
|
|
||||||
value uniform 25000;
|
|
||||||
}
|
|
||||||
SYMP3
|
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
WALL10
|
|
||||||
|
"wall.*"
|
||||||
{
|
{
|
||||||
type epsilonWallFunction;
|
type epsilonWallFunction;
|
||||||
Cmu 0.09;
|
Cmu 0.09;
|
||||||
kappa 0.41;
|
kappa 0.41;
|
||||||
E 9.8;
|
E 9.8;
|
||||||
value uniform 25000;
|
value uniform $turbulentEpsilon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,15 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: plus |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
flowVelocity (600 148.16 0);
|
||||||
|
pressure 100000;
|
||||||
|
temperature 300;
|
||||||
|
turbulentKE 1000;
|
||||||
|
turbulentEpsilon 25000;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -15,32 +15,30 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "include/initialConditions"
|
||||||
|
|
||||||
dimensions [0 2 -2 0 0 0 0];
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 1000;
|
internalField uniform $turbulentKE;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
INLE1
|
"(inlet|outlet).*"
|
||||||
{
|
{
|
||||||
type inletOutlet;
|
type inletOutlet;
|
||||||
inletValue uniform 1000;
|
inletValue uniform $turbulentKE;
|
||||||
value uniform 1000;
|
value $internalField;
|
||||||
}
|
}
|
||||||
OUTL2
|
|
||||||
{
|
"sym.*"
|
||||||
type inletOutlet;
|
|
||||||
inletValue uniform 1000;
|
|
||||||
value uniform 1000;
|
|
||||||
}
|
|
||||||
SYMP3
|
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
WALL10
|
|
||||||
|
"wall.*"
|
||||||
{
|
{
|
||||||
type kqRWallFunction;
|
type kqRWallFunction;
|
||||||
value uniform 1000;
|
value $internalField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,21 +21,18 @@ internalField uniform 0;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
INLE1
|
"(inlet|outlet).*"
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
OUTL2
|
|
||||||
{
|
"sym.*"
|
||||||
type calculated;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
SYMP3
|
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
WALL10
|
|
||||||
|
"wall.*"
|
||||||
{
|
{
|
||||||
type nutkWallFunction;
|
type nutkWallFunction;
|
||||||
Cmu 0.09;
|
Cmu 0.09;
|
||||||
|
|||||||
@ -14,34 +14,36 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "include/initialConditions"
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 100000;
|
internalField uniform $pressure;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
INLE1
|
"inlet.*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUTL2
|
"outlet.*"
|
||||||
{
|
{
|
||||||
type waveTransmissive;
|
type waveTransmissive;
|
||||||
field p;
|
field p;
|
||||||
psi thermo:psi;
|
psi thermo:psi;
|
||||||
gamma 1.3;
|
gamma 1.3;
|
||||||
fieldInf 100000;
|
fieldInf $pressure;
|
||||||
lInf 1;
|
lInf 1;
|
||||||
value uniform 100000;
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYMP3
|
"sym.*"
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
WALL10
|
"wall.*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,13 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
rm -f constant/polyMesh/boundary > /dev/null 2>&1
|
rm -f constant/polyMesh/boundary > /dev/null 2>&1
|
||||||
|
|
||||||
|
# Don't need these extra files (from star4ToFoam conversion)
|
||||||
|
rm -f \
|
||||||
|
constant/cellTable \
|
||||||
|
constant/polyMesh/cellTableId \
|
||||||
|
constant/polyMesh/interfaces \
|
||||||
|
constant/polyMesh/origCellId > /dev/null 2>&1
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -4,13 +4,33 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
# Source tutorial run functions
|
# Source tutorial run functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
# Get application name
|
# Convert mesh from resources directory
|
||||||
application=$(getApplication)
|
runApplication star4ToFoam -scale 1 \
|
||||||
|
$FOAM_TUTORIALS/resources/geometry/nacaAirfoil/nacaAirfoil
|
||||||
runApplication star3ToFoam prostar/nacaAirfoil
|
|
||||||
|
|
||||||
|
# Symmetry plane -> empy
|
||||||
sed -i -e 's/symmetry\([)]*;\)/empty\1/' constant/polyMesh/boundary
|
sed -i -e 's/symmetry\([)]*;\)/empty\1/' constant/polyMesh/boundary
|
||||||
|
|
||||||
runApplication $application
|
# Don't need these extra files (from star4ToFoam conversion)
|
||||||
|
rm -f \
|
||||||
|
constant/cellTable \
|
||||||
|
constant/polyMesh/cellTableId \
|
||||||
|
constant/polyMesh/interfaces \
|
||||||
|
constant/polyMesh/origCellId > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
|
if isParallel "$@"
|
||||||
|
then
|
||||||
|
|
||||||
|
# Parallel
|
||||||
|
runApplication decomposePar
|
||||||
|
runParallel $(getApplication)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# Serial
|
||||||
|
runApplication $(getApplication)
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,36 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: plus |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 6;
|
||||||
|
|
||||||
|
method simple;
|
||||||
|
|
||||||
|
simpleCoeffs
|
||||||
|
{
|
||||||
|
n (3 2 1);
|
||||||
|
delta 0.001;
|
||||||
|
}
|
||||||
|
|
||||||
|
hierarchicalCoeffs
|
||||||
|
{
|
||||||
|
n (3 2 1);
|
||||||
|
delta 0.001;
|
||||||
|
order xyz;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
8
tutorials/resources/geometry/nacaAirfoil/README
Normal file
8
tutorials/resources/geometry/nacaAirfoil/README
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
nacaAirfoil
|
||||||
|
~~~~~~~~~~~
|
||||||
|
* large domain with airfoil section near centre
|
||||||
|
* extremely non-orthogonal, highly skew mesh refined around the airfoil
|
||||||
|
* running at Mach 1.78
|
||||||
|
* limited corrected 0.5 on all laplacianSchemes because the mesh is so poor
|
||||||
|
* run to t = 0.02 with nextWrite; change to stopAt endTime to continue running
|
||||||
|
* deltaT can be increased later in the run to 2e-07
|
||||||
BIN
tutorials/resources/geometry/nacaAirfoil/nacaAirfoil.bnd.gz
Normal file
BIN
tutorials/resources/geometry/nacaAirfoil/nacaAirfoil.bnd.gz
Normal file
Binary file not shown.
BIN
tutorials/resources/geometry/nacaAirfoil/nacaAirfoil.cel.gz
Normal file
BIN
tutorials/resources/geometry/nacaAirfoil/nacaAirfoil.cel.gz
Normal file
Binary file not shown.
15
tutorials/resources/geometry/nacaAirfoil/nacaAirfoil.inp
Normal file
15
tutorials/resources/geometry/nacaAirfoil/nacaAirfoil.inp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
! ------------------------------
|
||||||
|
! PROSTAR file of NACA airfoil
|
||||||
|
! 40000 cells, 80860 points
|
||||||
|
! scaling = meters
|
||||||
|
! ------------------------------
|
||||||
|
|
||||||
|
ctable 2 fluid ,,,,,,
|
||||||
|
ctname 2 fluid
|
||||||
|
|
||||||
|
*set icvo mxv - 1" << nl
|
||||||
|
vread nacaAirfoil.vrt icvo,,,coded
|
||||||
|
cread nacaAirfoil.cel icvo,,,add,coded
|
||||||
|
*set icvo
|
||||||
|
|
||||||
|
! end
|
||||||
BIN
tutorials/resources/geometry/nacaAirfoil/nacaAirfoil.vrt.gz
Normal file
BIN
tutorials/resources/geometry/nacaAirfoil/nacaAirfoil.vrt.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user