mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -34,17 +34,14 @@ Description
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
surfaceScalarField SfUfbyDelta =
|
scalarField sumPhi =
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
fvc::surfaceSum(mag(phiSt))().internalField()
|
||||||
*mag(phiSt/fvc::interpolate(rho));
|
/rho.internalField();
|
||||||
|
|
||||||
StCoNum =
|
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
max(SfUfbyDelta/mesh.magSf()).value()
|
|
||||||
*runTime.deltaTValue();
|
|
||||||
|
|
||||||
meanStCoNum =
|
meanStCoNum =
|
||||||
(sum(SfUfbyDelta)/sum(mesh.magSf())).value()
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
*runTime.deltaTValue();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "St courant Number mean: " << meanStCoNum
|
Info<< "St courant Number mean: " << meanStCoNum
|
||||||
|
|||||||
@ -30,10 +30,10 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
{
|
{
|
||||||
scalar sumLocalContErr = runTime.deltaT().value()*
|
scalar sumLocalContErr = runTime.deltaTValue()*
|
||||||
mag(fvc::div(phia))().weightedAverage(mesh.V()).value();
|
mag(fvc::div(phia))().weightedAverage(mesh.V()).value();
|
||||||
|
|
||||||
scalar globalContErr = runTime.deltaT().value()*
|
scalar globalContErr = runTime.deltaTValue()*
|
||||||
fvc::div(phia)().weightedAverage(mesh.V()).value();
|
fvc::div(phia)().weightedAverage(mesh.V()).value();
|
||||||
cumulativeContErr += globalContErr;
|
cumulativeContErr += globalContErr;
|
||||||
|
|
||||||
|
|||||||
@ -36,23 +36,23 @@ scalar waveCoNum = 0.0;
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
surfaceScalarField SfUfbyDelta =
|
scalarField sumPhi =
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
fvc::surfaceSum(mag(phi))().internalField()
|
||||||
*mag(phi)/fvc::interpolate(h);
|
/h.internalField();
|
||||||
|
|
||||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
.value()*runTime.deltaTValue();
|
|
||||||
|
|
||||||
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanCoNum =
|
||||||
.value()*runTime.deltaTValue();
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
|
|
||||||
// Gravity wave Courant number
|
// Gravity wave Courant number
|
||||||
waveCoNum =
|
waveCoNum = 0.25*gMax
|
||||||
0.5*max
|
|
||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
fvc::surfaceSum
|
||||||
*sqrt(fvc::interpolate(h))
|
(
|
||||||
).value()*sqrt(magg).value()*runTime.deltaTValue();
|
fvc::interpolate(sqrt(h))*mesh.magSf()
|
||||||
|
)().internalField()/mesh.V().field()
|
||||||
|
)*sqrt(magg).value()*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Courant number mean: " << meanCoNum
|
Info<< "Courant number mean: " << meanCoNum
|
||||||
|
|||||||
@ -35,19 +35,21 @@ scalar acousticCoNum = 0.0;
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
surfaceScalarField SfUfbyDelta =
|
scalarField sumPhi =
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv);
|
fvc::surfaceSum(mag(phiv))().internalField();
|
||||||
|
|
||||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
.value()*runTime.deltaTValue();
|
|
||||||
|
|
||||||
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanCoNum =
|
||||||
.value()*runTime.deltaTValue();
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
|
|
||||||
acousticCoNum = max
|
acousticCoNum = 0.5*gMax
|
||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi))
|
fvc::surfaceSum
|
||||||
).value()*runTime.deltaTValue();
|
(
|
||||||
|
fvc::interpolate(scalar(1)/sqrt(psi))*mesh.magSf()
|
||||||
|
)().internalField()/mesh.V().field()
|
||||||
|
)*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "phiv Courant Number mean: " << meanCoNum
|
Info<< "phiv Courant Number mean: " << meanCoNum
|
||||||
|
|||||||
@ -86,7 +86,7 @@ int main(int argc, char *argv[])
|
|||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "\n end \n";
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,10 +43,10 @@ if (mesh.nInternalFaces())
|
|||||||
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
|
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
|
||||||
*fvc::surfaceSum(mag(phi))().internalField();
|
*fvc::surfaceSum(mag(phi))().internalField();
|
||||||
|
|
||||||
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaT().value();
|
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|
||||||
meanAlphaCoNum =
|
meanAlphaCoNum =
|
||||||
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaT().value();
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
|
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
|
||||||
|
|||||||
@ -42,12 +42,12 @@ if (adjustTimeStep)
|
|||||||
(
|
(
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
deltaTFact*runTime.deltaT().value(),
|
deltaTFact*runTime.deltaTValue(),
|
||||||
maxDeltaT
|
maxDeltaT
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -39,20 +39,16 @@ scalar meanAlphaCoNum = 0.0;
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
surfaceScalarField alpha1f = fvc::interpolate(alpha1);
|
scalarField sumPhi = max
|
||||||
surfaceScalarField alpha2f = fvc::interpolate(alpha2);
|
|
||||||
|
|
||||||
surfaceScalarField SfUfbyDelta = max
|
|
||||||
(
|
(
|
||||||
pos(alpha1f - 0.01)*pos(0.99 - alpha1f),
|
pos(alpha1 - 0.01)*pos(0.99 - alpha1),
|
||||||
pos(alpha2f - 0.01)*pos(0.99 - alpha2f)
|
pos(alpha2 - 0.01)*pos(0.99 - alpha2)
|
||||||
)*mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);
|
)*fvc::surfaceSum(mag(phi))().internalField();
|
||||||
|
|
||||||
alphaCoNum = max(SfUfbyDelta/mesh.magSf())
|
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
.value()*runTime.deltaT().value();
|
|
||||||
|
|
||||||
meanAlphaCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanAlphaCoNum =
|
||||||
.value()*runTime.deltaT().value();
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
|
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
|
||||||
|
|||||||
@ -39,15 +39,14 @@ scalar meanAlphaCoNum = 0.0;
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
surfaceScalarField SfUfbyDelta =
|
scalarField sumPhi =
|
||||||
mixture.nearInterface()
|
mixture.nearInterface()().internalField()
|
||||||
*mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);
|
*fvc::surfaceSum(mag(phi))().internalField();
|
||||||
|
|
||||||
alphaCoNum = max(SfUfbyDelta/mesh.magSf())
|
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
.value()*runTime.deltaT().value();
|
|
||||||
|
|
||||||
meanAlphaCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanAlphaCoNum =
|
||||||
.value()*runTime.deltaT().value();
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
|
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
|
||||||
|
|||||||
@ -457,12 +457,12 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::surfaceScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
Foam::multiphaseMixture::nearInterface() const
|
Foam::multiphaseMixture::nearInterface() const
|
||||||
{
|
{
|
||||||
tmp<surfaceScalarField> tnearInt
|
tmp<volScalarField> tnearInt
|
||||||
(
|
(
|
||||||
new surfaceScalarField
|
new volScalarField
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -477,8 +477,7 @@ Foam::multiphaseMixture::nearInterface() const
|
|||||||
|
|
||||||
forAllConstIter(PtrDictionary<phase>, phases_, iter)
|
forAllConstIter(PtrDictionary<phase>, phases_, iter)
|
||||||
{
|
{
|
||||||
surfaceScalarField alphaf = fvc::interpolate(iter());
|
tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
|
||||||
tnearInt() = max(tnearInt(), pos(alphaf - 0.01)*pos(0.99 - alphaf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tnearInt;
|
return tnearInt;
|
||||||
|
|||||||
@ -258,7 +258,7 @@ public:
|
|||||||
|
|
||||||
//- Indicator of the proximity of the interface
|
//- Indicator of the proximity of the interface
|
||||||
// Field values are 1 near and 0 away for the interface.
|
// Field values are 1 near and 0 away for the interface.
|
||||||
tmp<surfaceScalarField> nearInterface() const;
|
tmp<volScalarField> nearInterface() const;
|
||||||
|
|
||||||
//- Solve for the mixture phase-fractions
|
//- Solve for the mixture phase-fractions
|
||||||
void solve();
|
void solve();
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
# include "CourantNo.H"
|
# include "CourantNo.H"
|
||||||
|
|
||||||
{
|
{
|
||||||
scalar UrCoNum = max
|
scalar UrCoNum = 0.5*gMax
|
||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phia - phib)
|
fvc::surfaceSum(mag(phia - phib))().internalField()/mesh.V().field()
|
||||||
/mesh.magSf()
|
)*runTime.deltaTValue();
|
||||||
).value()*runTime.deltaT().value();
|
|
||||||
|
|
||||||
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
||||||
|
|
||||||
|
|||||||
@ -34,14 +34,13 @@ scalar meanMeshCoNum = 0.0;
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
surfaceScalarField SfUfbyDelta =
|
scalarField sumPhi =
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(mesh.phi());
|
fvc::surfaceSum(mag(mesh.phi()))().internalField();
|
||||||
|
|
||||||
meshCoNum = max(SfUfbyDelta/mesh.magSf())
|
meshCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
.value()*runTime.deltaTValue();
|
|
||||||
|
|
||||||
meanMeshCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanMeshCoNum =
|
||||||
.value()*runTime.deltaTValue();
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Mesh Courant Number mean: " << meanMeshCoNum
|
Info<< "Mesh Courant Number mean: " << meanMeshCoNum
|
||||||
|
|||||||
@ -38,10 +38,10 @@ if (mesh.nInternalFaces())
|
|||||||
fvc::surfaceSum(mag(phi))().internalField()
|
fvc::surfaceSum(mag(phi))().internalField()
|
||||||
/rho.internalField();
|
/rho.internalField();
|
||||||
|
|
||||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaT().value();
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum =
|
meanCoNum =
|
||||||
0.5*(gSum(sumPhi)/sum(mesh.V().field()))*runTime.deltaT().value();
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Courant Number mean: " << meanCoNum
|
Info<< "Courant Number mean: " << meanCoNum
|
||||||
|
|||||||
@ -37,10 +37,10 @@ if (mesh.nInternalFaces())
|
|||||||
scalarField sumPhi =
|
scalarField sumPhi =
|
||||||
fvc::surfaceSum(mag(phi))().internalField();
|
fvc::surfaceSum(mag(phi))().internalField();
|
||||||
|
|
||||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaT().value();
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum =
|
meanCoNum =
|
||||||
0.5*(gSum(sumPhi)/sum(mesh.V().field()))*runTime.deltaT().value();
|
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Courant Number mean: " << meanCoNum
|
Info<< "Courant Number mean: " << meanCoNum
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "0/uniform/lagrangian/dsmc";
|
|
||||||
object particleProperties;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
processor0
|
|
||||||
{
|
|
||||||
particleCount 63978;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "0/uniform/lagrangian/dsmc";
|
|
||||||
object particleProperties;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
processor0
|
|
||||||
{
|
|
||||||
particleCount 63978;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
|
||||||
|
|
||||||
# Source tutorial clean functions
|
|
||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
|
||||||
|
|
||||||
(
|
|
||||||
cd throttle || exit
|
|
||||||
|
|
||||||
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
|
||||||
rm -rf 0/polyMesh > /dev/null 2>&1
|
|
||||||
rm system/topoSetDict > /dev/null 2>&1
|
|
||||||
|
|
||||||
cleanCase
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
(
|
|
||||||
cd throttle3D || exit
|
|
||||||
|
|
||||||
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
|
||||||
rm -rf 0 > /dev/null 2>&1
|
|
||||||
cp -r 0.org 0
|
|
||||||
rm system/topoSetDict > /dev/null 2>&1
|
|
||||||
rm -rf processor[0-9] > /dev/null 2>&1
|
|
||||||
|
|
||||||
cleanCase
|
|
||||||
)
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
|
||||||
@ -1,50 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
# Source tutorial run functions
|
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
||||||
|
|
||||||
# Set application name
|
|
||||||
application="cavitatingFoam"
|
|
||||||
|
|
||||||
refineMeshByCellSet()
|
|
||||||
{
|
|
||||||
while [ $# -ge 1 ]
|
|
||||||
do
|
|
||||||
echo "creating cell set for primary zone - $1"
|
|
||||||
cp system/topoSetDict.$1 system/topoSetDict
|
|
||||||
topoSet > log.topoSet.$1 2>&1
|
|
||||||
|
|
||||||
echo "refining primary zone - $1"
|
|
||||||
refineMesh -dict -overwrite > log.refineMesh.$1 2>&1
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
(
|
(
|
||||||
cd throttle || exit
|
cd throttle || exit
|
||||||
|
./Allrun
|
||||||
runApplication blockMesh
|
|
||||||
refineMeshByCellSet 1 2 3
|
|
||||||
runApplication $application
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
(
|
(
|
||||||
cd throttle3D || exit
|
cd throttle3D || exit
|
||||||
|
./Allrun
|
||||||
cp -r 0.org 0
|
|
||||||
|
|
||||||
runApplication blockMesh
|
|
||||||
refineMeshByCellSet 1 2 3
|
|
||||||
|
|
||||||
echo "mapping fields from 2D throttle case"
|
|
||||||
mapFields ../throttle -sourceTime latestTime > log.mapFields 2>&1
|
|
||||||
|
|
||||||
runApplication decomposePar
|
|
||||||
runParallel $application 4
|
|
||||||
runApplication reconstructPar
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
12
tutorials/multiphase/cavitatingFoam/les/throttle/Allclean
Executable file
12
tutorials/multiphase/cavitatingFoam/les/throttle/Allclean
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
||||||
|
rm -rf 0/polyMesh > /dev/null 2>&1
|
||||||
|
rm system/topoSetDict > /dev/null 2>&1
|
||||||
|
cleanCase
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
28
tutorials/multiphase/cavitatingFoam/les/throttle/Allrun
Executable file
28
tutorials/multiphase/cavitatingFoam/les/throttle/Allrun
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# Set application name
|
||||||
|
application="cavitatingFoam"
|
||||||
|
|
||||||
|
refineMeshByCellSet()
|
||||||
|
{
|
||||||
|
while [ $# -ge 1 ]
|
||||||
|
do
|
||||||
|
echo "creating cell set for primary zone - $1"
|
||||||
|
cp system/topoSetDict.$1 system/topoSetDict
|
||||||
|
topoSet > log.topoSet.$1 2>&1
|
||||||
|
|
||||||
|
echo "refining primary zone - $1"
|
||||||
|
refineMesh -dict -overwrite > log.refineMesh.$1 2>&1
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
refineMeshByCellSet 1 2 3
|
||||||
|
runApplication $application
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -21,25 +21,25 @@ FoamFile
|
|||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 51;
|
nFaces 51;
|
||||||
startFace 15151;
|
startFace 35380;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 51;
|
nFaces 51;
|
||||||
startFace 15202;
|
startFace 35431;
|
||||||
}
|
}
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 436;
|
nFaces 640;
|
||||||
startFace 15253;
|
startFace 35482;
|
||||||
}
|
}
|
||||||
frontBack
|
frontBack
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
nFaces 15420;
|
nFaces 35580;
|
||||||
startFace 15689;
|
startFace 36122;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
14
tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean
Executable file
14
tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
||||||
|
rm -rf 0 > /dev/null 2>&1
|
||||||
|
cp -r 0.org 0
|
||||||
|
rm system/topoSetDict > /dev/null 2>&1
|
||||||
|
rm -rf processor[0-9] > /dev/null 2>&1
|
||||||
|
cleanCase
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
36
tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun
Executable file
36
tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# Set application name
|
||||||
|
application="cavitatingFoam"
|
||||||
|
|
||||||
|
refineMeshByCellSet()
|
||||||
|
{
|
||||||
|
while [ $# -ge 1 ]
|
||||||
|
do
|
||||||
|
echo "creating cell set for primary zone - $1"
|
||||||
|
cp system/topoSetDict.$1 system/topoSetDict
|
||||||
|
topoSet > log.topoSet.$1 2>&1
|
||||||
|
|
||||||
|
echo "refining primary zone - $1"
|
||||||
|
refineMesh -dict -overwrite > log.refineMesh.$1 2>&1
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
cp -r 0.org 0
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
refineMeshByCellSet 1 2 3
|
||||||
|
|
||||||
|
echo "mapping fields from 2D throttle case"
|
||||||
|
mapFields ../throttle -sourceTime latestTime > log.mapFields 2>&1
|
||||||
|
|
||||||
|
runApplication decomposePar
|
||||||
|
runParallel $application 4
|
||||||
|
runApplication reconstructPar
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
Reference in New Issue
Block a user