Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

Conflicts:
	tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary
	tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/rho
	tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/boundary
	tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/RASProperties
	tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties
	tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/turbulenceProperties
	tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/cp
	tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/rho
	tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/polyMesh/boundary
	tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/fixedInlet
	tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/sideAndTopPatches
	tutorials/incompressible/simpleFoam/windTurbineTerrain/0/nut
	tutorials/incompressible/simpleFoam/windTurbineTerrain/0/p
	tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/RASProperties
	tutorials/incompressible/simpleFoam/windTurbineTerrain/system/decomposeParDict
This commit is contained in:
henry
2010-06-23 16:56:45 +01:00
309 changed files with 158964 additions and 2602 deletions

View File

@ -5,27 +5,21 @@ cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
rm -rf constant/polyMesh/sets
runApplication blockMesh
runApplication setSet -batch makeCellSets.setSet
rm -f constant/polyMesh/sets/*_old
runApplication setsToZones -noFlipMap
runApplication splitMeshRegions -cellZones -overwrite
# remove fluid fields from solid regions (important for post-processing)
for i in heater leftSolid rightSolid
do
rm -f 0*/$i/{mut,alphat,epsilon,k,p,p,U}
rm -f 0*/$i/{mut,alphat,epsilon,k,p,U}
done
# remove solid fields from fluid regions (important for post-processing)
for i in bottomAir topAir
do
rm -f 0*/$i/{cp,K,rho}
done
## remove solid fields from fluid regions (important for post-processing)
#for i in bottomAir topAir
#do
# rm -f 0*/$i/{cp,K,rho}
#done
for i in bottomAir topAir heater leftSolid rightSolid
do

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object solidThermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType constSolidThermo;
//thermoType interpolatedSolidThermo;
//thermoType directionalSolidThermo;
constSolidThermoCoeffs
{
//- constant properties
rho rho [1 -3 0 0 0 0 0] 8000;
cp cp [0 2 -2 -1 0 0 0] 450;
K K [1 1 -3 -1 0 0 0] 80;
// N/A
Hf Hf [0 2 -2 0 0 0 0] 1;
emissivity emissivity [0 0 0 0 0 0 0] 1;
}
interpolatedSolidThermoCoeffs
{
//- interpolated properties
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues (80 40);
HfValues (1 1);
emissivityValues (1 1);
}
directionalSolidThermoCoeffs
{
//- does interpolation and directional K in coordinate system.
// Specify multiple values, one for each temperature. Properties are
// interpolated according to the local temperature.
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues ((40 40 40) (40 40 40));
coordinateSystem
{
origin (-0.000062 0.000019 0.000039);
coordinateRotation
{
type axes;
e1 (1 0 0);
e3 (-3.1807824E-6 -0.99813473 0.0610505);
}
}
HfValues (1 1);
emissivityValues (1 1);
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../heater/solidThermophysicalProperties

View File

@ -2,7 +2,11 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
<<<<<<< HEAD
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / A nd | Web: www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -0,0 +1 @@
../heater/solidThermophysicalProperties

View File

@ -1,11 +1,16 @@
cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100)
cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01)
cellZoneSet heater new setToCellZone heater
cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01 0.01 100)
cellZoneSet leftSolid new setToCellZone leftSolid
cellSet rightSolid new boxToCell (0.01 0 -100 )(100 0.01 100)
cellZoneSet rightSolid new setToCellZone rightSolid
cellSet topAir new boxToCell (-100 0.01 -100 )(100 100 100)
cellZoneSet topAir new setToCellZone topAir
cellSet bottomAir clear
cellSet bottomAir add cellToCell heater
cellSet bottomAir add cellToCell leftSolid
cellSet bottomAir add cellToCell rightSolid
cellSet bottomAir add cellToCell topAir
cellSet bottomAir invert
cellZoneSet bottomAir new setToCellZone bottomAir

View File

@ -55,9 +55,10 @@ dictionaryReplacement
"bottomAir_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K basicThermo;
KName none;
value uniform 300;
}
}

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
libs ("libOpenFOAM.so" "libcompressibleTurbulenceModel.so" "libcompressibleRASModels.so");
libs ("libcompressibleTurbulenceModel.so" "libcompressibleRASModels.so");
application chtMultiRegionFoam;

View File

@ -45,9 +45,10 @@ dictionaryReplacement
}
"heater_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K solidThermo;
KName none;
value uniform 300;
}
minY
@ -58,47 +59,6 @@ dictionaryReplacement
}
}
rho
{
internalField uniform 8000;
boundaryField
{
".*"
{
type calculated;
value uniform 8000;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 80;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 450;
}
}
}
}
// ************************************************************************* //

View File

@ -41,55 +41,14 @@ dictionaryReplacement
}
"leftSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K solidThermo;
KName none;
value uniform 300;
}
}
}
rho
{
internalField uniform 8000;
boundaryField
{
".*"
{
type calculated;
value uniform 8000;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 80;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 450;
}
}
}
}
// ************************************************************************* //

View File

@ -41,55 +41,14 @@ dictionaryReplacement
}
"rightSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K solidThermo;
KName none;
value uniform 300;
}
}
}
rho
{
internalField uniform 8000;
boundaryField
{
".*"
{
type calculated;
value uniform 8000;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 80;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 450;
}
}
}
}
// ************************************************************************* //

View File

@ -66,9 +66,10 @@ dictionaryReplacement
"topAir_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K basicThermo;
KName none;
value uniform 300;
}
}

View File

@ -9,19 +9,19 @@ rm -rf constant/polyMesh/sets
runApplication blockMesh
runApplication snappyHexMesh -overwrite
runApplication splitMeshRegions -cellZones
runApplication splitMeshRegions -cellZones -overwrite
# remove fluid fields from solid regions (important for post-processing)
for i in heater leftSolid rightSolid
do
rm -f 0*/$i/{mut,alphat,epsilon,k,p,p,U}
rm -f 0*/$i/{mut,alphat,epsilon,k,p,U}
done
# remove solid fields from fluid regions (important for post-processing)
for i in bottomAir topAir
do
rm -f 0*/$i/{cp,K,rho}
done
# No solid fields to remove from fluid regions (important for post-processing)
#for i in bottomAir topAir
#do
# rm -f 0*/$i/{cp,K,rho}
#done
for i in bottomAir topAir heater leftSolid rightSolid
do

View File

@ -14,9 +14,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon;
RASModel laminar;
turbulence off;
turbulence on;
printCoeffs on;

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object solidThermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType constSolidThermo;
//thermoType interpolatedSolidThermo;
//thermoType directionalSolidThermo;
constSolidThermoCoeffs
{
//- constant properties
rho rho [1 -3 0 0 0 0 0] 8000;
cp cp [0 2 -2 -1 0 0 0] 450;
K K [1 1 -3 -1 0 0 0] 80;
// N/A
Hf Hf [0 2 -2 0 0 0 0] 1;
emissivity emissivity [0 0 0 0 0 0 0] 1;
}
interpolatedSolidThermoCoeffs
{
//- interpolated properties
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues (80 40);
HfValues (1 1);
emissivityValues (1 1);
}
directionalSolidThermoCoeffs
{
//- does interpolation and directional K in coordinate system.
// Specify multiple values, one for each temperature. Properties are
// interpolated according to the local temperature.
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues ((40 40 40) (40 40 40));
coordinateSystem
{
origin (-0.000062 0.000019 0.000039);
coordinateRotation
{
type axes;
e1 (1 0 0);
e3 (-3.1807824E-6 -0.99813473 0.0610505);
}
}
HfValues (1 1);
emissivityValues (1 1);
}
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object solidThermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType constSolidThermo;
//thermoType interpolatedSolidThermo;
//thermoType directionalSolidThermo;
constSolidThermoCoeffs
{
//- constant properties
rho rho [1 -3 0 0 0 0 0] 8000;
cp cp [0 2 -2 -1 0 0 0] 450;
K K [1 1 -3 -1 0 0 0] 80;
// N/A
Hf Hf [0 2 -2 0 0 0 0] 1;
emissivity emissivity [0 0 0 0 0 0 0] 1;
}
interpolatedSolidThermoCoeffs
{
//- interpolated properties
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues (80 40);
HfValues (1 1);
emissivityValues (1 1);
}
directionalSolidThermoCoeffs
{
//- does interpolation and directional K in coordinate system.
// Specify multiple values, one for each temperature. Properties are
// interpolated according to the local temperature.
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues ((40 40 40) (40 40 40));
coordinateSystem
{
origin (-0.000062 0.000019 0.000039);
coordinateRotation
{
type axes;
e1 (1 0 0);
e3 (-3.1807824E-6 -0.99813473 0.0610505);
}
}
HfValues (1 1);
emissivityValues (1 1);
}
// ************************************************************************* //

View File

@ -16,7 +16,7 @@ FoamFile
convertToMeters 1;
vertices
vertices
(
(-0.1 -0.04 -0.05)
( 0.1 -0.04 -0.05)
@ -28,18 +28,18 @@ vertices
(-0.1 0.04 0.05)
);
blocks
blocks
(
hex (0 1 2 3 4 5 6 7) (30 10 10) simpleGrading (1 1 1)
);
edges
edges
(
);
patches
patches
(
wall maxY
wall maxY
(
(3 7 6 2)
)
@ -65,7 +65,7 @@ patches
)
);
mergePatchPairs
mergePatchPairs
(
);

View File

@ -2,7 +2,11 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
<<<<<<< HEAD
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / A nd | Web: www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object solidThermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType constSolidThermo;
//thermoType interpolatedSolidThermo;
//thermoType directionalSolidThermo;
constSolidThermoCoeffs
{
//- constant properties
rho rho [1 -3 0 0 0 0 0] 8000;
cp cp [0 2 -2 -1 0 0 0] 450;
K K [1 1 -3 -1 0 0 0] 80;
// N/A
Hf Hf [0 2 -2 0 0 0 0] 1;
emissivity emissivity [0 0 0 0 0 0 0] 1;
}
interpolatedSolidThermoCoeffs
{
//- interpolated properties
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues (80 40);
HfValues (1 1);
emissivityValues (1 1);
}
directionalSolidThermoCoeffs
{
//- does interpolation and directional K in coordinate system.
// Specify multiple values, one for each temperature. Properties are
// interpolated according to the local temperature.
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues ((40 40 40) (40 40 40));
coordinateSystem
{
origin (-0.000062 0.000019 0.000039);
coordinateRotation
{
type axes;
e1 (1 0 0);
e3 (-3.1807824E-6 -0.99813473 0.0610505);
}
}
HfValues (1 1);
emissivityValues (1 1);
}
// ************************************************************************* //

View File

@ -2,7 +2,11 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
<<<<<<< HEAD
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / A nd | Web: www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
@ -14,9 +18,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon;
RASModel laminar;
turbulence off;
turbulence on;
printCoeffs on;

View File

@ -2,7 +2,11 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
<<<<<<< HEAD
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / A nd | Web: www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,11 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
<<<<<<< HEAD
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / A nd | Web: www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -1,11 +0,0 @@
cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100)
cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01)
cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01 0.01 100)
cellSet rightSolid new boxToCell (0.01 0 -100 )(100 0.01 100)
cellSet topAir new boxToCell (-100 0.01 -100 )(100 100 100)
cellSet bottomAir clear
cellSet bottomAir add cellToCell heater
cellSet bottomAir add cellToCell leftSolid
cellSet bottomAir add cellToCell rightSolid
cellSet bottomAir add cellToCell topAir
cellSet bottomAir invert

View File

@ -16,52 +16,25 @@ FoamFile
dictionaryReplacement
{
boundary
{
minX
{
type wall;
}
maxX
{
type wall;
}
}
U
{
internalField uniform (0 0 0);
internalField uniform (0.01 0 0);
boundaryField
{
minX
{
type fixedValue;
value uniform (0 0 0);
}
maxX
{
type fixedValue;
value uniform (0 0 0);
}
minY
{
type fixedValue;
value uniform (0 0 0);
}
minZ
{
type fixedValue;
value uniform (0 0 0);
}
maxZ
{
type fixedValue;
value uniform (0 0 0);
}
bottomAir_to_leftSolid
{
type fixedValue;
value uniform (0 0 0);
}
bottomAir_to_heater
{
type fixedValue;
value uniform (0 0 0);
}
bottomAir_to_rightSolid
".*"
{
type fixedValue;
value uniform (0 0 0);
@ -71,47 +44,21 @@ dictionaryReplacement
T
{
internalField uniform 300;
boundaryField
{
minX
".*"
{
type zeroGradient;
}
maxX
"bottomAir_to_.*"
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
bottomAir_to_leftSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
value uniform 300;
}
bottomAir_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
bottomAir_to_rightSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
K basicThermo;
KName none;
value uniform 300;
}
}
@ -125,47 +72,9 @@ dictionaryReplacement
boundaryField
{
minX
".*"
{
type zeroGradient;
value uniform 0.01;
}
maxX
{
type zeroGradient;
value uniform 0.01;
}
minY
{
type zeroGradient;
value uniform 0.01;
}
minZ
{
type zeroGradient;
value uniform 0.01;
}
maxZ
{
type zeroGradient;
value uniform 0.01;
}
bottomAir_to_leftSolid
{
type zeroGradient;
value uniform 0.01;
}
bottomAir_to_heater
{
type zeroGradient;
value uniform 0.01;
}
bottomAir_to_rightSolid
{
type zeroGradient;
type compressible::epsilonWallFunction;
value uniform 0.01;
}
}
@ -174,49 +83,12 @@ dictionaryReplacement
k
{
internalField uniform 0.1;
boundaryField
{
minX
".*"
{
type zeroGradient;
value uniform 0.1;
}
maxX
{
type zeroGradient;
value uniform 0.1;
}
minY
{
type zeroGradient;
value uniform 0.1;
}
minZ
{
type zeroGradient;
value uniform 0.1;
}
maxZ
{
type zeroGradient;
value uniform 0.1;
}
bottomAir_to_leftSolid
{
type zeroGradient;
value uniform 0.1;
}
bottomAir_to_heater
{
type zeroGradient;
value uniform 0.1;
}
bottomAir_to_rightSolid
{
type zeroGradient;
type compressible::kqRWallFunction;
value uniform 0.1;
}
}
@ -224,53 +96,17 @@ dictionaryReplacement
p
{
internalField uniform 1E5;
internalField uniform 100000;
boundaryField
{
minX
{
type buoyantPressure;
value 1e5;
}
maxX
{
type buoyantPressure;
value 1e5;
}
minY
{
type buoyantPressure;
value 1e5;
}
minZ
{
type buoyantPressure;
value 1e5;
}
maxZ
{
type buoyantPressure;
value 1e5;
}
bottomAir_to_leftSolid
{
type buoyantPressure;
value 1e5;
}
bottomAir_to_heater
{
type buoyantPressure;
value 1e5;
}
bottomAir_to_rightSolid
".*"
{
type buoyantPressure;
value 1e5;
}
}
}
}
// ************************************************************************* //

View File

@ -15,9 +15,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
libs ("libOpenFOAM.so" "libcompressibleTurbulenceModel.so" "libcompressibleRASModels.so");
libs ("libcompressibleTurbulenceModel.so" "libcompressibleRASModels.so");
application snappyHexMesh;
application chtMultiRegionFoam;
startFrom latestTime;
@ -30,9 +30,8 @@ endTime 200;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 50;
//writeControl timeStep;
//writeInterval 100;
purgeWrite 0;
@ -50,6 +49,8 @@ runTimeModifiable true;
maxCo 0.3;
maxDi 10.0;
adjustTimeStep yes;

View File

@ -22,8 +22,8 @@ numberOfSubdomains 4;
//- Keep owner and neighbour on same processor for faces in zones:
// preserveFaceZones (heater solid1 solid3);
method scotch;
// method hierarchical;
// method scotch;
method hierarchical;
// method simple;
// method metis;
// method manual;

View File

@ -16,169 +16,49 @@ FoamFile
dictionaryReplacement
{
boundary
{
minY
{
type patch;
}
minZ
{
type patch;
}
maxZ
{
type patch;
}
}
T
{
internalField uniform 300;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 300;
}
"heater_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K solidThermo;
KName none;
value uniform 300;
}
minY
{
type fixedValue;
value uniform 500;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
heater_to_bottomAir
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
heater_to_leftSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
heater_to_rightSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
heater_to_topAir
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
}
}
rho
{
internalField uniform 8000;
boundaryField
{
minY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
heater_to_bottomAir
{
type zeroGradient;
}
heater_to_leftSolid
{
type zeroGradient;
}
heater_to_rightSolid
{
type zeroGradient;
}
heater_to_topAir
{
type zeroGradient;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
minY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
heater_to_bottomAir
{
type zeroGradient;
}
heater_to_leftSolid
{
type zeroGradient;
}
heater_to_rightSolid
{
type zeroGradient;
}
heater_to_topAir
{
type zeroGradient;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
minY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
heater_to_bottomAir
{
type zeroGradient;
}
heater_to_leftSolid
{
type zeroGradient;
}
heater_to_rightSolid
{
type zeroGradient;
}
heater_to_topAir
{
type zeroGradient;
}
}
}
}
// ************************************************************************* //

View File

@ -16,147 +16,39 @@ FoamFile
dictionaryReplacement
{
boundary
{
minZ
{
type patch;
}
maxZ
{
type patch;
}
}
T
{
internalField uniform 300;
boundaryField
{
minX
".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
leftSolid_to_bottomAir
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
leftSolid_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
leftSolid_to_topAir
"leftSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K solidThermo;
KName none;
value uniform 300;
}
}
}
rho
{
internalField uniform 8000;
boundaryField
{
minX
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
leftSolid_to_bottomAir
{
type zeroGradient;
}
leftSolid_to_heater
{
type zeroGradient;
}
leftSolid_to_topAir
{
type zeroGradient;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
minX
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
leftSolid_to_bottomAir
{
type zeroGradient;
}
leftSolid_to_heater
{
type zeroGradient;
}
leftSolid_to_topAir
{
type zeroGradient;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
minX
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
leftSolid_to_bottomAir
{
type zeroGradient;
}
leftSolid_to_heater
{
type zeroGradient;
}
leftSolid_to_topAir
{
type zeroGradient;
}
}
}
}
// ************************************************************************* //

View File

@ -16,144 +16,37 @@ FoamFile
dictionaryReplacement
{
boundary
{
minZ
{
type patch;
}
maxZ
{
type patch;
}
}
T
{
internalField uniform 300;
boundaryField
{
maxX
".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
rightSolid_to_bottomAir
"rightSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K solidThermo;
KName none;
value uniform 300;
}
rightSolid_to_topAir
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
}
}
rho
{
internalField uniform 8000;
boundaryField
{
maxX
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_bottomAir
{
type zeroGradient;
}
rightSolid_to_heater
{
type zeroGradient;
}
rightSolid_to_topAir
{
type zeroGradient;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
maxX
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_bottomAir
{
type zeroGradient;
}
rightSolid_to_heater
{
type zeroGradient;
}
rightSolid_to_topAir
{
type zeroGradient;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
maxX
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_bottomAir
{
type zeroGradient;
}
rightSolid_to_heater
{
type zeroGradient;
}
rightSolid_to_topAir
{
type zeroGradient;
}
}
}
}

View File

@ -18,52 +18,25 @@ dictionaryReplacement
{
U
{
internalField uniform ( 0.01 0 0 );
internalField uniform (0.01 0 0);
boundaryField
{
".*"
{
type fixedValue;
value uniform (0 0 0);
}
minX
{
type fixedValue;
value uniform (0.01 0 0);
value uniform ( 0.01 0 0 );
}
maxX
{
type inletOutlet;
inletValue uniform (0 0 0);
}
maxY
{
type fixedValue;
value uniform (0 0 0);
}
minZ
{
type fixedValue;
value uniform (0 0 0);
}
maxZ
{
type fixedValue;
value uniform (0 0 0);
}
topAir_to_leftSolid
{
type fixedValue;
value uniform (0 0 0);
}
topAir_to_heater
{
type fixedValue;
value uniform (0 0 0);
}
topAir_to_rightSolid
{
type fixedValue;
value uniform (0 0 0);
inletValue uniform ( 0 0 0 );
value uniform ( 0 0 0 );
}
}
}
@ -74,11 +47,11 @@ dictionaryReplacement
boundaryField
{
maxY
".*"
{
type fixedValue;
value uniform 300;
type zeroGradient;
}
minX
{
type fixedValue;
@ -86,39 +59,17 @@ dictionaryReplacement
}
maxX
{
type fixedValue;
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}
minZ
{
type fixedValue;
value uniform 300;
}
maxZ
{
type fixedValue;
value uniform 300;
}
topAir_to_leftSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
topAir_to_heater
"topAir_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
value uniform 300;
}
topAir_to_rightSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
K basicThermo;
KName none;
value uniform 300;
}
}
@ -126,10 +77,16 @@ dictionaryReplacement
epsilon
{
// Set the value on all bc to non-zero. Not used in simulation
// since zeroGradient; only used in initialisation.
internalField uniform 0.01;
boundaryField
{
".*"
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
minX
{
type fixedValue;
@ -137,44 +94,8 @@ dictionaryReplacement
}
maxX
{
type zeroGradient;
value uniform 0.01;
}
minY
{
type zeroGradient;
value uniform 0.01;
}
maxY
{
type zeroGradient;
value uniform 0.01;
}
minZ
{
type zeroGradient;
value uniform 0.01;
}
maxZ
{
type zeroGradient;
value uniform 0.01;
}
topAir_to_leftSolid
{
type zeroGradient;
value uniform 0.01;
}
topAir_to_heater
{
type zeroGradient;
value uniform 0.01;
}
topAir_to_rightSolid
{
type zeroGradient;
type inletOutlet;
inletValue uniform 0.01;
value uniform 0.01;
}
}
@ -183,50 +104,24 @@ dictionaryReplacement
k
{
internalField uniform 0.1;
boundaryField
{
".*"
{
type compressible::kqRWallFunction;
value uniform 0.1;
}
minX
{
type fixedValue;
value uniform 0.1;
}
maxX
{
type zeroGradient;
value uniform 0.1;
}
maxY
{
type zeroGradient;
value uniform 0.1;
}
minZ
{
type zeroGradient;
value uniform 0.1;
}
maxZ
{
type zeroGradient;
value uniform 0.1;
}
topAir_to_leftSolid
{
type zeroGradient;
value uniform 0.1;
}
topAir_to_heater
{
type zeroGradient;
value uniform 0.1;
}
topAir_to_rightSolid
{
type zeroGradient;
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}
}
@ -234,59 +129,23 @@ dictionaryReplacement
p
{
internalField uniform 1E5;
internalField uniform 100000;
boundaryField
{
minX
".*"
{
type buoyantPressure;
value 1e5;
}
maxX
{
type waveTransmissive;
//field p;
phi phi;
rho rho;
psi psi;
gamma 1.4; // cp/cv
fieldInf 1e5;
lInf 0.40; // double length of domain
value uniform 1e5;
}
maxY
{
type buoyantPressure;
value 1e5;
}
minZ
{
type buoyantPressure;
value 1e5;
}
maxZ
{
type buoyantPressure;
value 1e5;
}
topAir_to_leftSolid
{
type buoyantPressure;
value 1e5;
}
topAir_to_heater
{
type buoyantPressure;
value 1e5;
}
topAir_to_rightSolid
{
type buoyantPressure;
value 1e5;
gamma 1.4;
fieldInf 100000;
lInf 0.4;
value uniform 100000;
}
}
}

View File

@ -5,27 +5,21 @@ cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
rm -rf constant/polyMesh/sets
runApplication blockMesh
runApplication setSet -batch makeCellSets.setSet
rm -f constant/polyMesh/sets/*_old
runApplication setsToZones -noFlipMap
runApplication splitMeshRegions -cellZones -overwrite
# remove fluid fields from solid regions (important for post-processing)
for i in heater leftSolid rightSolid
do
rm -f 0*/$i/{mut,alphat,epsilon,k,p,p,U}
rm -f 0*/$i/{mut,alphat,epsilon,k,p,U}
done
# remove solid fields from fluid regions (important for post-processing)
for i in bottomAir topAir
do
rm -f 0*/$i/{cp,K,rho}
done
## remove solid fields from fluid regions (important for post-processing)
#for i in bottomAir topAir
#do
# rm -f 0*/$i/{cp,K,rho}
#done
for i in bottomAir topAir heater leftSolid rightSolid
do

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object solidThermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType constSolidThermo;
//thermoType interpolatedSolidThermo;
//thermoType directionalSolidThermo;
constSolidThermoCoeffs
{
//- constant properties
rho rho [1 -3 0 0 0 0 0] 8000;
cp cp [0 2 -2 -1 0 0 0] 450;
K K [1 1 -3 -1 0 0 0] 80;
// N/A
Hf Hf [0 2 -2 0 0 0 0] 1;
emissivity emissivity [0 0 0 0 0 0 0] 1;
}
interpolatedSolidThermoCoeffs
{
//- interpolated properties
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues (80 40);
HfValues (1 1);
emissivityValues (1 1);
}
directionalSolidThermoCoeffs
{
//- does interpolation and directional K in coordinate system.
// Specify multiple values, one for each temperature. Properties are
// interpolated according to the local temperature.
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues ((40 40 40) (40 40 40));
coordinateSystem
{
origin (-0.000062 0.000019 0.000039);
coordinateRotation
{
type axes;
e1 (1 0 0);
e3 (-3.1807824E-6 -0.99813473 0.0610505);
}
}
HfValues (1 1);
emissivityValues (1 1);
}
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object solidThermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType constSolidThermo;
//thermoType interpolatedSolidThermo;
//thermoType directionalSolidThermo;
constSolidThermoCoeffs
{
//- constant properties
rho rho [1 -3 0 0 0 0 0] 8000;
cp cp [0 2 -2 -1 0 0 0] 450;
K K [1 1 -3 -1 0 0 0] 80;
// N/A
Hf Hf [0 2 -2 0 0 0 0] 1;
emissivity emissivity [0 0 0 0 0 0 0] 1;
}
interpolatedSolidThermoCoeffs
{
//- interpolated properties
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues (80 40);
HfValues (1 1);
emissivityValues (1 1);
}
directionalSolidThermoCoeffs
{
//- does interpolation and directional K in coordinate system.
// Specify multiple values, one for each temperature. Properties are
// interpolated according to the local temperature.
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues ((40 40 40) (40 40 40));
coordinateSystem
{
origin (-0.000062 0.000019 0.000039);
coordinateRotation
{
type axes;
e1 (1 0 0);
e3 (-3.1807824E-6 -0.99813473 0.0610505);
}
}
HfValues (1 1);
emissivityValues (1 1);
}
// ************************************************************************* //

View File

@ -2,7 +2,11 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
<<<<<<< HEAD
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / A nd | Web: www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object solidThermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType constSolidThermo;
//thermoType interpolatedSolidThermo;
//thermoType directionalSolidThermo;
constSolidThermoCoeffs
{
//- constant properties
rho rho [1 -3 0 0 0 0 0] 8000;
cp cp [0 2 -2 -1 0 0 0] 450;
K K [1 1 -3 -1 0 0 0] 80;
// N/A
Hf Hf [0 2 -2 0 0 0 0] 1;
emissivity emissivity [0 0 0 0 0 0 0] 1;
}
interpolatedSolidThermoCoeffs
{
//- interpolated properties
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues (80 40);
HfValues (1 1);
emissivityValues (1 1);
}
directionalSolidThermoCoeffs
{
//- does interpolation and directional K in coordinate system.
// Specify multiple values, one for each temperature. Properties are
// interpolated according to the local temperature.
TValues (100 1000);
rhoValues (1700 1700);
cpValues (1700 1700);
KValues ((40 40 40) (40 40 40));
coordinateSystem
{
origin (-0.000062 0.000019 0.000039);
coordinateRotation
{
type axes;
e1 (1 0 0);
e3 (-3.1807824E-6 -0.99813473 0.0610505);
}
}
HfValues (1 1);
emissivityValues (1 1);
}
// ************************************************************************* //

View File

@ -1,11 +1,16 @@
cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100)
cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01)
cellZoneSet heater new setToCellZone heater
cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01 0.01 100)
cellZoneSet leftSolid new setToCellZone leftSolid
cellSet rightSolid new boxToCell (0.01 0 -100 )(100 0.01 100)
cellZoneSet rightSolid new setToCellZone rightSolid
cellSet topAir new boxToCell (-100 0.01 -100 )(100 100 100)
cellZoneSet topAir new setToCellZone topAir
cellSet bottomAir clear
cellSet bottomAir add cellToCell heater
cellSet bottomAir add cellToCell leftSolid
cellSet bottomAir add cellToCell rightSolid
cellSet bottomAir add cellToCell topAir
cellSet bottomAir invert
cellZoneSet bottomAir new setToCellZone bottomAir

View File

@ -55,9 +55,10 @@ dictionaryReplacement
"bottomAir_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K basicThermo;
KName none;
value uniform 300;
}
}

View File

@ -15,7 +15,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application chtMultiRegionSimpleFoam;
libs ("libcompressibleTurbulenceModel.so" "libcompressibleRASModels.so");
application chtMultiRegionFoam;
startFrom startTime;

View File

@ -45,9 +45,10 @@ dictionaryReplacement
}
"heater_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K solidThermo;
KName none;
value uniform 300;
}
minY
@ -58,47 +59,6 @@ dictionaryReplacement
}
}
rho
{
internalField uniform 8000;
boundaryField
{
".*"
{
type calculated;
value uniform 8000;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 80;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 450;
}
}
}
}
// ************************************************************************* //

View File

@ -41,55 +41,14 @@ dictionaryReplacement
}
"leftSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K solidThermo;
KName none;
value uniform 300;
}
}
}
rho
{
internalField uniform 8000;
boundaryField
{
".*"
{
type calculated;
value uniform 8000;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 80;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 450;
}
}
}
}
// ************************************************************************* //

View File

@ -41,55 +41,14 @@ dictionaryReplacement
}
"rightSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K solidThermo;
KName none;
value uniform 300;
}
}
}
rho
{
internalField uniform 8000;
boundaryField
{
".*"
{
type calculated;
value uniform 8000;
}
}
}
K
{
internalField uniform 80;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 80;
}
}
}
cp
{
internalField uniform 450;
boundaryField
{
".*"
{
type zeroGradient;
value uniform 450;
}
}
}
}
// ************************************************************************* //

View File

@ -66,9 +66,10 @@ dictionaryReplacement
"topAir_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T;
K K;
K basicThermo;
KName none;
value uniform 300;
}
}

View File

@ -0,0 +1,63 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 1 -1 0 0 0 0];
internalField uniform $flowVelocity;
boundaryField
{
#include "include/ABLConditions"
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}
inlet
{
type atmBoundaryLayerInletVelocity;
Uref $Uref;
Href $Href;
n $windDirection;
z $zDirection;
z0 $z0;
value $internalField;
zGround $zGround;
}
"terrain_.*"
{
type fixedValue;
value uniform (0 0 0);
}
ground
{
type fixedValue;
value uniform (0 0 0);
}
#include "include/sideAndTopPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
#include "include/initialConditions"
internalField uniform $turbulentEpsilon;
boundaryField
{
#include "include/ABLConditions"
"terrain_.*"
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.4;
E 9.8;
value $internalField;
}
outlet
{
type zeroGradient;
}
inlet
{
type atmBoundaryLayerInletEpsilon;
Ustar $Ustar;
z $zDirection;
z0 $z0;
value $internalField;
zGround $zGround;
}
ground
{
type zeroGradient;
}
#include "include/sideAndTopPatches"
}
// ************************************************************************* //

View File

@ -1,29 +1,17 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object cp;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 -1 0 0 0];
internalField uniform 450;
boundaryField
{
".*"
{
type calculated;
}
}
Ustar 0.82;
Uref 10.0;
Href 20;
z0 0.1;
turbulentKE 1.3;
windDirection (1 0 0);
zDirection (0 0 1);
zGround 935.0;
// ************************************************************************* //

View File

@ -1,29 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
<<<<<<< HEAD:tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/cp
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b:tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/fixedInlet
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
inlet
{
version 2.0;
format ascii;
class volScalarField;
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0 0 0];
internalField uniform 8000;
boundaryField
{
".*"
{
type calculated;
}
type fixedValue;
value $internalField;
}
// ************************************************************************* //

View File

@ -1,29 +1,14 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object K;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 1 -3 -1 0 0 0];
internalField uniform 80;
boundaryField
{
".*"
{
type calculated;
}
}
flowVelocity (0 0 0);
pressure 0;
turbulentKE 1.3;
turbulentEpsilon 0.01;
// ************************************************************************* //

View File

@ -1,29 +1,24 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
<<<<<<< HEAD:tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/K
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b:tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/sideAndTopPatches
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
top
{
version 2.0;
format ascii;
class volScalarField;
object cp;
type slip;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 -1 0 0 0];
internalField uniform 450;
boundaryField
sides
{
".*"
{
type calculated;
}
type slip;
}
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 2 -2 0 0 0 0];
internalField uniform $turbulentKE;
boundaryField
{
#include "include/ABLConditions"
outlet
{
type inletOutlet;
inletValue uniform 0.0;
value $internalField;
}
inlet
{
type fixedValue;
value uniform $turbulentKE;
}
"terrain_.*"
{
type kqRWallFunction;
value uniform 0.0;
}
ground
{
type zeroGradient;
}
#include "include/sideAndTopPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,61 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
<<<<<<< HEAD:tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/K
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b:tutorials/incompressible/simpleFoam/windTurbineTerrain/0/nut
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
"terrain_.*"
{
type nutkRoughWallFunction;
Ks 0.2; //Ks = 20 Z0
Cs 0.5;
value uniform 0.0;
}
ground
{
type calculated;
value uniform 0;
}
#include "include/sideAndTopPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
<<<<<<< HEAD:tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/cp
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b:tutorials/incompressible/simpleFoam/windTurbineTerrain/0/p
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 2 -2 0 0 0 0];
internalField uniform $pressure;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value $internalField;
}
"terrain_.*"
{
type zeroGradient;
}
ground
{
type zeroGradient;
}
#include "include/sideAndTopPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf VTK
#rm -rf constant/cellToRegion constant/polyMesh/sets
rm -rf constant/polyMesh/sets
#rm -rf constant/cellLevel
#rm -rf constant/cellZones
#rm -rf constant/faceZones
#rm -rf constant/faces
#rm -rf constant/neighbour
#rm -rf constant/owner
#rm -rf constant/pointZones
#rm -rf constant/points
#rm -rf constant/refinementHistory
#rm -rf constant/surfaceIndex
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,13 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication snappyHexMesh -overwrite
runApplication setSet -batch makeZones
runApplication setsToZones -noFlipMap
runApplication windSimpleFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,39 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
<<<<<<< HEAD:tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/rho
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b:tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/RASProperties
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon;
turbulence on;
printCoeffs on;
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 -0.33;
sigmak 1.0;
sigmaEps 1.11; //Original value:1.44
Prt 1.0;
}
// ************************************************************************* //

View File

@ -0,0 +1,84 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
/*
( 581761 4.78575e+06 1000)
( 581861 4.78575e+06 1000)
( 581861 4.78585e+06 1000)
( 581761 4.78585e+06 1000)
( 581761 4.78575e+06 1100)
( 581861 4.78575e+06 1100)
( 581861 4.78585e+06 1100)
( 581761 4.78585e+06 1100)
*/
( 581321 4.78537e+06 930)
( 582290 4.78537e+06 930)
( 582290 4.78624e+06 930)
( 581321 4.78624e+06 930)
( 581321 4.78537e+06 1500)
( 582290 4.78537e+06 1500)
( 582290 4.78624e+06 1500)
( 581321 4.78624e+06 1500)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (30 30 20) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch outlet
(
(2 6 5 1)
)
patch sides
(
(1 5 4 0)
(3 7 6 2)
)
patch inlet
(
(0 4 7 3)
)
wall ground
(
(0 3 2 1)
)
patch top
(
(4 5 6 7)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,58 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6
(
outlet
{
type patch;
nFaces 922;
startFace 364825;
}
sides
{
type patch;
nFaces 1834;
startFace 365747;
}
inlet
{
type patch;
nFaces 923;
startFace 367581;
}
ground
{
type wall;
nFaces 0;
startFace 368504;
}
top
{
type patch;
nFaces 900;
startFace 368504;
}
terrain_patch0
{
type wall;
nFaces 18201;
startFace 369404;
}
)
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object sourcesProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
disk1
{
typeModel actuationDiskSource;
active on; // on/off switch
timeStart 0.0; // start time
duration 1000.0; // duration
selectionMode cellSet; // cellSet // points //cellZone
cellSet actuationDisk1; // cellSet name when selectionMode = cellSet
cellZone actuationDisk1; // cellZone name when selectionMode = cellZone
actuationDiskSourceCoeffs
{
diskDir (-1 0 0); // orientation of the disk
Cp 0.53; // Cp
Ct 0.58; // Ct
diskArea 40; // disk area
}
}
disk2
{
typeModel actuationDiskSource;
active on; // on/off switch
timeStart 0.0; // start time
duration 1000.0; // duration
selectionMode cellSet; // cellSet // points //cellZone
cellSet actuationDisk2; // cellSet name when selectionMode = cellSet
cellZone actuationDisk2; // cellZone name when selectionMode = cellZone
actuationDiskSourceCoeffs
{
diskDir (-1 0 0); // orientation of the disk
Cp 0.53; // Cp
Ct 0.58; // Ct
diskArea 40; // disk area
}
}
// ************************************************************************* //

View File

@ -1,29 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object K;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 1 -3 -1 0 0 0];
transportModel Newtonian;
internalField uniform 80;
boundaryField
{
".*"
{
type calculated;
}
}
nu nu [0 2 -1 0 0 0 0] 1.5e-05;
// ************************************************************************* //

View File

@ -0,0 +1,2 @@
cellSet actuationDisk1 new boxToCell (581850.5 4785805 1061) (581850.8 4785815 1071)
cellSet actuationDisk2 new boxToCell (581754 4785658 1065) (581754.4 4785668 1075)

View File

@ -1,29 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object K;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 1 -3 -1 0 0 0];
application simpleFoam;
internalField uniform 80;
startFrom latestTime;
boundaryField
{
".*"
{
type calculated;
}
}
startTime 0;
stopAt endTime;
endTime 5000;
deltaT 1;
writeControl timeStep;
writeInterval 50;
purgeWrite 0;
writeFormat ascii;
writePrecision 12;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
// ************************************************************************* //

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
<<<<<<< HEAD:tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/K
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
=======
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
>>>>>>> 34d87d1a94f83ac39028abe5f447f2b6d069380b:tutorials/incompressible/simpleFoam/windTurbineTerrain/system/decomposeParDict
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 1;
method hierarchical;
// method metis;
// method ptscotch;
simpleCoeffs
{
n (4 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
}
manualCoeffs
{
dataFile "cellDecomposition";
}
metisCoeffs
{
//n (5 1 1);
//cellWeightsFile "constant/cellWeightsFile";
}
// ************************************************************************* //

View File

@ -0,0 +1,60 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind grad(U);
div((nuEff*dev(grad(U).T()))) Gauss linear;
div(phi,epsilon) Gauss upwind;
div(phi,k) Gauss upwind;
}
laplacianSchemes
{
default Gauss linear limited 0.333;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default limited 0.333;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View File

@ -0,0 +1,80 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
maxIter 300;
};
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
};
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
};
epsilon
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
};
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.1;
};
}
SIMPLE
{
nNonOrthogonalCorrectors 1;
convergence 1e-3;
}
relaxationFactors
{
p 0.3;
U 0.7;
k 0.7;
epsilon 0.7;
}
cache
{
grad(U);
}
// ************************************************************************* //

View File

@ -0,0 +1,431 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;
snap true;
addLayers false;
// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
windTurbine1
{
type searchableBox;
min (581845 4785805 1061);
max (581855 4785815 1071);
}
windTurbine2
{
type searchableBox;
min (581740 4785658 1065);
max (581771 4785671 1079);
}
terrain.stl
{
type triSurfaceMesh;
name terrain;
//tolerance 1E-5; // optional:non-default tolerance on intersections
//maxTreeDepth 10; // optional:depth of octree. Decrease only in case
// of memory limitations.
// Per region the patchname. If not provided will be <name>_<region>.
/*
regions
{
secondSolid
{
name mySecondPatch;
}
}
*/
}
/*
sphere2
{
type searchableSphere;
centre (1.5 1.5 1.5);
radius 1.03;
}
*/
};
// Settings for the castellatedMesh generation.
castellatedMeshControls
{
// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
// If local number of cells is >= maxLocalCells on any processor
// switches from from refinement followed by balancing
// (current method) to (weighted) balancing before refinement.
maxLocalCells 1000000;
// Overall cell limit (approximately). Refinement will stop immediately
// upon reaching this number so a refinement level might not complete.
// Note that this is the number of cells before removing the part which
// is not 'visible' from the keepPoint. The final number of cells might
// actually be a lot less.
maxGlobalCells 2000000;
// The surface refinement loop might spend lots of iterations refining just a
// few cells. This setting will cause refinement to stop if <= minimumRefine
// are selected for refinement. Note: it will at least do one iteration
// (unless the number of cells to refine is 0)
minRefinementCells 0;
// Allow a certain level of imbalance during refining
// (since balancing is quite expensive)
// Expressed as fraction of perfect balance (= overall number of cells /
// nProcs). 0=balance always.
maxLoadUnbalance 0.10;
// Number of buffer layers between different levels.
// 1 means normal 2:1 refinement restriction, larger means slower
// refinement.
nCellsBetweenLevels 1;
// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now.
features
(
//{
// file "someLine.eMesh";
// level 2;
//}
);
// Surface based refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies two levels for every surface. The first is the minimum level,
// every cell intersecting a surface gets refined up to the minimum level.
// The second level is the maximum level. Cells that 'see' multiple
// intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum level.
refinementSurfaces
{
terrain
{
// Surface-wise min and max refinement level
level (2 2);
// Optional region-wise level specification
/*
regions
{
windTurbine
{
level (3 3);
}
}
*/
//- Optional angle to detect small-large cell situation
// perpendicular to the surface. Is the angle of face w.r.t.
// the local surface normal. Use on flat(ish) surfaces only.
// Otherwise leave out or set to negative number.
//perpendicularAngle 10;
//- Optional faceZone and (for closed surface) cellZone with
// how to select the cells that are in the cellZone
// (inside / outside / specified insidePoint)
//faceZone sphere;
//cellZone sphere;
//cellZoneInside inside; //outside/insidePoint
}
}
resolveFeatureAngle 2;
// Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~
// Specifies refinement level for cells in relation to a surface. One of
// three modes
// - distance. 'levels' specifies per distance to the surface the
// wanted refinement level. The distances need to be specified in
// descending order.
// - inside. 'levels' is only one entry and only the level is used. All
// cells inside the surface get refined up to the level. The surface
// needs to be closed for this to be possible.
// - outside. Same but cells outside.
refinementRegions
{
windTurbine1
{
mode inside;
levels ((6 6));
}
windTurbine2
{
mode inside;
levels ((6 6));
}
//sphere.stl
//{
// mode distance;
// levels ((1.0 5) (2.0 3));
//}
}
// Mesh selection
// ~~~~~~~~~~~~~~
// After refinement patches get added for all refinementSurfaces and
// all cells intersecting the surfaces get put into these patches. The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even
// after refinement.
locationInMesh (581770 4.78580e+06 1050);
// Whether any faceZones (as specified in the refinementSurfaces)
// are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true;
}
// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;
//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 4.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 30;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
}
// Settings for the layer addition.
addLayersControls
{
// Are the thickness parameters below relative to the undistorted
// size of the refined cell outside layer (true) or absolute sizes (false).
relativeSizes true;
// Per final patch (so not geometry!) the layer information
layers
{
sphere.stl_firstSolid
{
nSurfaceLayers 1;
}
maxY
{
nSurfaceLayers 1;
}
}
// Expansion factor for layer mesh
expansionRatio 1.0;
//- Wanted thickness of final added cell layer. If multiple layers
// is the thickness of the layer furthest away from the wall.
// See relativeSizes parameter.
finalLayerThickness 0.3;
//- Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// See relativeSizes parameter.
minThickness 0.25;
//- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process
// close to features.
// Note: changed(corrected) w.r.t 16x! (didn't do anything in 16x)
nGrow 0;
// Advanced settings
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
// make straight angle.
featureAngle 60;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 16x! 90 degrees corresponds to 130 in 16x.
minMedianAxisAngle 90;
// Create buffer region for new layer terminations
nBufferCellsNoExtrude 0;
// Overall max number of layer addition iterations. The mesher will exit
// if it reaches this number of iterations; possibly with an illegal
// mesh.
nLayerIter 50;
// Max number of iterations after which relaxed meshQuality controls
// get used. Up to nRelaxIter it uses the settings in meshQualityControls,
// after nRelaxIter it uses the values in meshQualityControls::relaxed.
nRelaxedIter 20;
}
// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 65;
//- Max skewness allowed. Set to <0 to disable.
maxBoundarySkewness 20;
maxInternalSkewness 4;
//- Max concaveness allowed. Is angle (in degrees) below which concavity
// is allowed. 0 is straight face, <0 would be convex face.
// Set to 180 to disable.
maxConcave 80;
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
// Set to a sensible fraction of the smallest cell volume expected.
// Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13;
//- Minimum tet volume. Is absolute volume of the tet formed by the
// face-centre decomposition triangle and the cell centre.
// Set to a sensible fraction of the smallest cell volume expected.
// Set to very negative number (e.g. -1E30) to disable.
minTetVol 1e-20;
//- Minimum face area. Set to <0 to disable.
minArea -1;
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
//- and face centre triangles normal
minTwist 0.05;
//- minimum normalised cell determinant
//- 1 = hex, <= 0 = folded or flattened illegal cell
minDeterminant 0.001;
//- minFaceWeight (0 -> 0.5)
minFaceWeight 0.05;
//- minVolRatio (0 -> 1)
minVolRatio 0.01;
//must be >0 for Fluent compatibility
minTriangleTwist -1;
//- if >0 : preserve single cells with all points on the surface if the
// resulting volume after snapping (by approximation) is larger than
// minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
// If <0 : delete always.
//minVolCollapseRatio 0.5;
// Advanced
//- Number of error distribution iterations
nSmoothScale 4;
//- amount to scale back displacement at error points
errorReduction 0.75;
// Optional : some meshing phases allow usage of relaxed rules.
// See e.g. addLayersControls::nRelaxedIter.
relaxed
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 75;
}
}
// Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;
// ************************************************************************* //

View File

@ -0,0 +1,3 @@
windSimpleFoam.C
EXE = $(FOAM_APPBIN)/windSimpleFoam

View File

@ -0,0 +1,14 @@
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
EXE_LIBS = \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools

View File

@ -0,0 +1,19 @@
// Solve the Momentum equation
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
UEqn().relax();
// Add resistance on the actuation disks
actuationDisks.addSu(UEqn());
eqnResidual = solve
(
UEqn() == -fvc::grad(p)
).initialResidual();
maxResidual = max(eqnResidual, maxResidual);

View File

@ -0,0 +1,9 @@
// check convergence
if (maxResidual < convergenceCriterion)
{
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
runTime.writeAndEnd();
Info<< "latestTime = " << runTime.timeName() << endl;
}

View File

@ -0,0 +1,45 @@
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
# include "createPhi.H"
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
);
IObasicSourceList actuationDisks(mesh);

View File

@ -0,0 +1,7 @@
// initialize values for convergence checks
scalar eqnResidual = 1, maxResidual = 0;
scalar convergenceCriterion = 0;
simple.readIfPresent("convergence", convergenceCriterion);

View File

@ -0,0 +1,41 @@
p.boundaryField().updateCoeffs();
volScalarField AU = UEqn().A();
U = UEqn().H()/AU;
UEqn.clear();
phi = fvc::interpolate(U) & mesh.Sf();
adjustPhi(phi, U, p);
// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(1.0/AU, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
// retain the residual from the first iteration
if (nonOrth == 0)
{
pEqn.solve();
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
# include "continuityErrs.H"
// Explicitly relax pressure for momentum corrector
p.relax();
// Momentum corrector
U -= fvc::grad(p)/AU;
U.correctBoundaryConditions();

View File

@ -0,0 +1,85 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
windSimpleFoam
Description
Steady-state solver for incompressible, turbulent flow with external
source in the momentum equation.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "RASModel.H"
#include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readSIMPLEControls.H"
#include "initConvergenceCheck.H"
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
#include "UEqn.H"
#include "pEqn.H"
}
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
#include "convergenceCheck.H"
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //