mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
This commit is contained in:
@ -2,11 +2,10 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-IBCs/lnInclude \
|
||||
-IBCs/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-L$(FOAM_USER_LIBBIN) \
|
||||
-lspecie \
|
||||
-lrhoCentralFoam
|
||||
|
||||
@ -348,7 +348,8 @@ int main(int argc, char *argv[])
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
Info<< nl << "end" << endl;
|
||||
Info<< nl << "End" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -23,8 +23,9 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
Extrude mesh from existing patch (flipped so has inwards pointing
|
||||
normals) or from patch read from file.
|
||||
Extrude mesh from existing patch (by default outwards facing normals;
|
||||
optional flips faces)
|
||||
or from patch read from file.
|
||||
Note: Merges close points so be careful.
|
||||
|
||||
Type of extrusion prescribed by run-time selectable model.
|
||||
@ -108,14 +109,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
const polyPatch& pp = mesh.boundaryMesh()[patchID];
|
||||
fMesh.reset(new faceMesh(pp.localFaces(), pp.localPoints()));
|
||||
fMesh().flip();
|
||||
|
||||
{
|
||||
fileName surfName(patchName + ".sMesh");
|
||||
|
||||
Info<< "Writing (flipped) patch as surfaceMesh to "
|
||||
fileName surfName(runTime.path()/patchName + ".sMesh");
|
||||
Info<< "Writing patch as surfaceMesh to "
|
||||
<< surfName << nl << endl;
|
||||
|
||||
OFstream os(surfName);
|
||||
os << fMesh() << nl;
|
||||
}
|
||||
@ -142,6 +140,20 @@ int main(int argc, char *argv[])
|
||||
<< "patch or surface." << exit(FatalError);
|
||||
}
|
||||
|
||||
Switch flipNormals(dict.lookup("flipNormals"));
|
||||
|
||||
if (flipNormals)
|
||||
{
|
||||
Info<< "Flipping faces." << nl << endl;
|
||||
|
||||
faceList faces(fMesh().size());
|
||||
forAll(faces, i)
|
||||
{
|
||||
faces[i] = fMesh()[i].reverseFace();
|
||||
}
|
||||
fMesh.reset(new faceMesh(faces, fMesh().localPoints()));
|
||||
}
|
||||
|
||||
|
||||
Info<< "Extruding patch with :" << nl
|
||||
<< " points : " << fMesh().points().size() << nl
|
||||
|
||||
@ -47,7 +47,14 @@ linearNormal::linearNormal(const dictionary& dict)
|
||||
:
|
||||
extrudeModel(typeName, dict),
|
||||
thickness_(readScalar(coeffDict_.lookup("thickness")))
|
||||
{}
|
||||
{
|
||||
if (thickness_ <= 0)
|
||||
{
|
||||
FatalErrorIn("linearNormal(const dictionary&)")
|
||||
<< "thickness should be positive : " << thickness_
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -19,31 +19,40 @@ FoamFile
|
||||
constructFrom patch; //surface;
|
||||
|
||||
// If construct from (flipped) patch
|
||||
sourceCase "../cavity";
|
||||
sourceCase "$FOAM_RUN/icoFoam/cavity";
|
||||
sourcePatch movingWall;
|
||||
|
||||
// Flip surface normals before usage.
|
||||
flipNormals false;
|
||||
|
||||
// If construct from surface
|
||||
surface "movingWall.sMesh";
|
||||
|
||||
|
||||
// Do front and back need to be merged?
|
||||
mergeFaces false;
|
||||
// Do front and back need to be merged? Usually only makes sense for 360
|
||||
// degree wedges.
|
||||
mergeFaces true;
|
||||
|
||||
|
||||
//- Linear extrusion in point-normal direction
|
||||
//extrudeModel linearNormal;
|
||||
|
||||
//- Wedge extrusion. If nLayers is 1 assumes symmetry around plane.
|
||||
extrudeModel wedge;
|
||||
|
||||
//- Extrudes into sphere around (0 0 0)
|
||||
//extrudeModel linearRadial;
|
||||
|
||||
//- Extrudes into sphere with grading according to pressure (atmospherics)
|
||||
//extrudeModel sigmaRadial;
|
||||
|
||||
nLayers 6;
|
||||
nLayers 20;
|
||||
|
||||
wedgeCoeffs
|
||||
{
|
||||
axisPt (0 0.1 0);
|
||||
axis (1 0 0);
|
||||
angle 90.0; // For nLayers=1 assume symmetry so angle/2 on each side
|
||||
axis (-1 0 0);
|
||||
angle 360; // For nLayers=1 assume symmetry so angle/2 on each side
|
||||
}
|
||||
|
||||
linearNormalCoeffs
|
||||
|
||||
@ -109,15 +109,33 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
|
||||
label currentLayerOffset = layer*surfacePoints.size();
|
||||
label nextLayerOffset = currentLayerOffset + surfacePoints.size();
|
||||
|
||||
// Side faces from layer to layer+1
|
||||
for (label i=0; i<nInternalEdges; i++)
|
||||
// Vertical faces from layer to layer+1
|
||||
for (label edgeI=0; edgeI<nInternalEdges; edgeI++)
|
||||
{
|
||||
quad[0] = surfaceEdges[i][1] + currentLayerOffset;
|
||||
quad[1] = surfaceEdges[i][0] + currentLayerOffset;
|
||||
quad[2] = surfaceEdges[i][0] + nextLayerOffset;
|
||||
quad[3] = surfaceEdges[i][1] + nextLayerOffset;
|
||||
const edge& e = surfaceEdges[edgeI];
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[edgeI];
|
||||
|
||||
eFaces[facei++] = face(quad).reverseFace();
|
||||
face& f = eFaces[facei++];
|
||||
f.setSize(4);
|
||||
|
||||
if
|
||||
(
|
||||
(edgeFaces[0] < edgeFaces[1])
|
||||
== sameOrder(surfaceFaces[edgeFaces[0]], e)
|
||||
)
|
||||
{
|
||||
f[0] = e[0] + currentLayerOffset;
|
||||
f[1] = e[1] + currentLayerOffset;
|
||||
f[2] = e[1] + nextLayerOffset;
|
||||
f[3] = e[0] + nextLayerOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
f[0] = e[1] + currentLayerOffset;
|
||||
f[1] = e[0] + currentLayerOffset;
|
||||
f[2] = e[0] + nextLayerOffset;
|
||||
f[3] = e[1] + nextLayerOffset;
|
||||
}
|
||||
}
|
||||
|
||||
// Faces between layer and layer+1
|
||||
@ -128,9 +146,9 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
|
||||
eFaces[facei++] =
|
||||
face
|
||||
(
|
||||
surfaceFaces[i].reverseFace()
|
||||
surfaceFaces[i] //.reverseFace()
|
||||
+ nextLayerOffset
|
||||
).reverseFace();
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -142,40 +160,46 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
|
||||
label nextLayerOffset = currentLayerOffset + surfacePoints.size();
|
||||
|
||||
// Side faces across layer
|
||||
for (label i=nInternalEdges; i<surfaceEdges.size(); i++)
|
||||
for (label edgeI=nInternalEdges; edgeI<surfaceEdges.size(); edgeI++)
|
||||
{
|
||||
const edge& e = surfaceEdges[i];
|
||||
quad[0] = e[1] + currentLayerOffset;
|
||||
quad[1] = e[0] + currentLayerOffset;
|
||||
quad[2] = e[0] + nextLayerOffset;
|
||||
quad[3] = e[1] + nextLayerOffset;
|
||||
const edge& e = surfaceEdges[edgeI];
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[edgeI];
|
||||
|
||||
label ownerFace = extrudePatch.edgeFaces()[i][0];
|
||||
face& f = eFaces[facei++];
|
||||
f.setSize(4);
|
||||
|
||||
if (sameOrder(surfaceFaces[ownerFace], e))
|
||||
if (sameOrder(surfaceFaces[edgeFaces[0]], e))
|
||||
{
|
||||
reverse(quad);
|
||||
f[0] = e[0] + currentLayerOffset;
|
||||
f[1] = e[1] + currentLayerOffset;
|
||||
f[2] = e[1] + nextLayerOffset;
|
||||
f[3] = e[0] + nextLayerOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
f[0] = e[1] + currentLayerOffset;
|
||||
f[1] = e[0] + currentLayerOffset;
|
||||
f[2] = e[0] + nextLayerOffset;
|
||||
f[3] = e[1] + nextLayerOffset;
|
||||
}
|
||||
|
||||
eFaces[facei++] = face(quad);
|
||||
}
|
||||
}
|
||||
|
||||
// Top faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] = face(surfaceFaces[i]).reverseFace();
|
||||
}
|
||||
|
||||
// Bottom faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] = face(surfaceFaces[i]).reverseFace();
|
||||
}
|
||||
|
||||
// Top faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] =
|
||||
face
|
||||
(
|
||||
surfaceFaces[i].reverseFace()
|
||||
surfaceFaces[i]
|
||||
+ nLayers*surfacePoints.size()
|
||||
).reverseFace();
|
||||
);
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
|
||||
@ -67,8 +67,13 @@ Foam::label Foam::checkTopology
|
||||
{
|
||||
forAll(mesh.faceZones(), zoneI)
|
||||
{
|
||||
if (mesh.faceZones()[zoneI].checkParallelSync(true))
|
||||
if (mesh.faceZones()[zoneI].checkParallelSync(false))
|
||||
{
|
||||
Info<< " ***FaceZone " << mesh.faceZones()[zoneI].name()
|
||||
<< " is not correctly synchronised"
|
||||
<< " acrosss coupled boundaries."
|
||||
<< " (coupled faces both"
|
||||
<< " present in set but with opposite flipmap)" << endl;
|
||||
noFailedChecks++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -492,6 +492,8 @@ int main(int argc, char *argv[])
|
||||
delete ensightCaseFilePtr;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
Info << nl << "Translation Complete." << nl;
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -84,6 +84,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
utility().tryPostCalc(args, runTime, mesh);
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -179,6 +179,8 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " No phi" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
@ -78,6 +78,8 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " No U" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -134,6 +134,8 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " Missing U or T" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
@ -361,6 +361,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " No phi" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
@ -105,6 +105,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " No U" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -80,6 +80,8 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " No U" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
@ -87,6 +87,8 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " No U" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
@ -460,7 +460,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
@ -80,6 +80,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " No k" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
@ -93,6 +93,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
{
|
||||
Info<< " No U" << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -50,7 +50,7 @@ elif [ -d "./system" ]
|
||||
then
|
||||
# Normal case.
|
||||
parentDir=`dirname $PWD`
|
||||
application=`basename $parentDir`
|
||||
application=`getApplication`
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
else
|
||||
|
||||
@ -29,6 +29,11 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
getApplication ()
|
||||
{
|
||||
grep application system/controlDict | sed "s/application *\([a-zA-Z]*\);/\1/"
|
||||
}
|
||||
|
||||
runApplication ()
|
||||
{
|
||||
APP_RUN=$1; shift
|
||||
|
||||
@ -32,7 +32,6 @@ template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial()
|
||||
:
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(),
|
||||
name_("unknownPolynomialName"),
|
||||
logActive_(false),
|
||||
logCoeff_(0.0)
|
||||
{}
|
||||
@ -42,16 +41,17 @@ template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial(const word& name, Istream& is)
|
||||
:
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(),
|
||||
name_(is),
|
||||
logActive_(false),
|
||||
logCoeff_(0.0)
|
||||
{
|
||||
if (name_ != name)
|
||||
word isName(is);
|
||||
|
||||
if (isName != name)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Polynomial<PolySize>::Polynomial(const word&, Istream&)"
|
||||
) << "Expected polynomial name " << name << " but read " << name_
|
||||
) << "Expected polynomial name " << name << " but read " << isName
|
||||
<< nl << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ Foam::Polynomial<PolySize>::Polynomial(const word& name, Istream& is)
|
||||
FatalErrorIn
|
||||
(
|
||||
"Polynomial<PolySize>::Polynomial(const word&, Istream&)"
|
||||
) << "Polynomial coefficients for entry " << name_
|
||||
) << "Polynomial coefficients for entry " << isName
|
||||
<< " are invalid (empty)" << nl << exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -72,12 +72,10 @@ Foam::Polynomial<PolySize>::Polynomial(const word& name, Istream& is)
|
||||
template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial
|
||||
(
|
||||
const word& name,
|
||||
const Polynomial<PolySize>& poly
|
||||
)
|
||||
:
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(poly),
|
||||
name_(name),
|
||||
logActive_(poly.logActive_),
|
||||
logCoeff_(poly.logCoeff_)
|
||||
{}
|
||||
@ -85,13 +83,6 @@ Foam::Polynomial<PolySize>::Polynomial
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<int PolySize>
|
||||
const Foam::word& Foam::Polynomial<PolySize>::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
bool& Foam::Polynomial<PolySize>::logActive()
|
||||
{
|
||||
|
||||
@ -82,9 +82,6 @@ class Polynomial
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Polynomial name
|
||||
word name_;
|
||||
|
||||
//- Include the log term? - only activated using integrateMinus1()
|
||||
bool logActive_;
|
||||
|
||||
@ -107,17 +104,14 @@ public:
|
||||
//- Construct from name and Istream
|
||||
Polynomial(const word& name, Istream& is);
|
||||
|
||||
//- Copy constructor with name
|
||||
Polynomial(const word& name, const Polynomial& poly);
|
||||
//- Copy constructor
|
||||
Polynomial(const Polynomial& poly);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to the polynomial name
|
||||
const word& name() const;
|
||||
|
||||
//- Return access to the log term active flag
|
||||
bool& logActive();
|
||||
|
||||
|
||||
@ -35,8 +35,7 @@ Foam::Ostream& Foam::operator<<
|
||||
const Polynomial<PolySize>& poly
|
||||
)
|
||||
{
|
||||
os << poly.name_ << token::SPACE
|
||||
<< static_cast
|
||||
os << static_cast
|
||||
<VectorSpace<Polynomial<PolySize>, scalar, PolySize> >(poly);
|
||||
|
||||
// Check state of Ostream
|
||||
|
||||
@ -100,6 +100,12 @@ Foam::label Foam::meshRefinement::createBaffle
|
||||
<< " ownPatch:" << ownPatch << abort(FatalError);
|
||||
}
|
||||
|
||||
bool reverseFlip = false;
|
||||
if (zoneID >= 0)
|
||||
{
|
||||
reverseFlip = !zoneFlip;
|
||||
}
|
||||
|
||||
dupFaceI = meshMod.setAction
|
||||
(
|
||||
polyAddFace
|
||||
@ -113,7 +119,7 @@ Foam::label Foam::meshRefinement::createBaffle
|
||||
true, // face flip
|
||||
neiPatch, // patch for face
|
||||
zoneID, // zone for face
|
||||
!zoneFlip // face flip in zone
|
||||
reverseFlip // face flip in zone
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -104,6 +104,7 @@ $(constraintFvPatchFields)/wedge/wedgeFvPatchFields.C
|
||||
$(constraintFvPatchFields)/wedge/wedgeFvPatchScalarField.C
|
||||
|
||||
derivedFvPatchFields = $(fvPatchFields)/derived
|
||||
$(derivedFvPatchFields)/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
|
||||
$(derivedFvPatchFields)/advective/advectiveFvPatchFields.C
|
||||
$(derivedFvPatchFields)/directMappedFixedValue/directMappedFixedValueFvPatchFields.C
|
||||
$(derivedFvPatchFields)/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C
|
||||
|
||||
@ -111,7 +111,7 @@ protected:
|
||||
const PtrList<volScalarField>& carrierFields_;
|
||||
|
||||
//- Active flag
|
||||
bool active_;
|
||||
Switch active_;
|
||||
|
||||
//- List of point source properties
|
||||
List<pointSourceProperties> pointSources_;
|
||||
|
||||
@ -0,0 +1,274 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "activeBaffleVelocityFvPatchVectorField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::activeBaffleVelocityFvPatchVectorField::
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
pName_("p"),
|
||||
cyclicPatchName_(),
|
||||
cyclicPatchLabel_(-1),
|
||||
orientation_(1),
|
||||
initWallSf_(0),
|
||||
initCyclicSf_(0),
|
||||
openFraction_(0),
|
||||
openingTime_(0),
|
||||
maxOpenFractionDelta_(0),
|
||||
curTimeIndex_(-1)
|
||||
{}
|
||||
|
||||
|
||||
Foam::activeBaffleVelocityFvPatchVectorField::
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const activeBaffleVelocityFvPatchVectorField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(ptf, p, iF, mapper),
|
||||
pName_(ptf.pName_),
|
||||
cyclicPatchName_(ptf.cyclicPatchName_),
|
||||
cyclicPatchLabel_(ptf.cyclicPatchLabel_),
|
||||
orientation_(ptf.orientation_),
|
||||
initWallSf_(ptf.initWallSf_),
|
||||
initCyclicSf_(ptf.initCyclicSf_),
|
||||
openFraction_(ptf.openFraction_),
|
||||
openingTime_(ptf.openingTime_),
|
||||
maxOpenFractionDelta_(ptf.maxOpenFractionDelta_),
|
||||
curTimeIndex_(-1)
|
||||
{}
|
||||
|
||||
|
||||
Foam::activeBaffleVelocityFvPatchVectorField::
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
pName_("p"),
|
||||
cyclicPatchName_(dict.lookup("cyclicPatch")),
|
||||
cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)),
|
||||
orientation_(readLabel(dict.lookup("orientation"))),
|
||||
initWallSf_(p.Sf()),
|
||||
initCyclicSf_(p.boundaryMesh()[cyclicPatchLabel_].Sf()),
|
||||
openFraction_(readScalar(dict.lookup("openFraction"))),
|
||||
openingTime_(readScalar(dict.lookup("openingTime"))),
|
||||
maxOpenFractionDelta_(readScalar(dict.lookup("maxOpenFractionDelta"))),
|
||||
curTimeIndex_(-1)
|
||||
{
|
||||
fvPatchVectorField::operator=(vector::zero);
|
||||
|
||||
if (dict.found("p"))
|
||||
{
|
||||
dict.lookup("p") >> pName_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::activeBaffleVelocityFvPatchVectorField::
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const activeBaffleVelocityFvPatchVectorField& ptf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(ptf),
|
||||
pName_(ptf.pName_),
|
||||
cyclicPatchName_(ptf.cyclicPatchName_),
|
||||
cyclicPatchLabel_(ptf.cyclicPatchLabel_),
|
||||
orientation_(ptf.orientation_),
|
||||
initWallSf_(ptf.initWallSf_),
|
||||
initCyclicSf_(ptf.initCyclicSf_),
|
||||
openFraction_(ptf.openFraction_),
|
||||
openingTime_(ptf.openingTime_),
|
||||
maxOpenFractionDelta_(ptf.maxOpenFractionDelta_),
|
||||
curTimeIndex_(-1)
|
||||
{}
|
||||
|
||||
|
||||
Foam::activeBaffleVelocityFvPatchVectorField::
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const activeBaffleVelocityFvPatchVectorField& ptf,
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(ptf, iF),
|
||||
pName_(ptf.pName_),
|
||||
cyclicPatchName_(ptf.cyclicPatchName_),
|
||||
cyclicPatchLabel_(ptf.cyclicPatchLabel_),
|
||||
orientation_(ptf.orientation_),
|
||||
initWallSf_(ptf.initWallSf_),
|
||||
initCyclicSf_(ptf.initCyclicSf_),
|
||||
openFraction_(ptf.openFraction_),
|
||||
openingTime_(ptf.openingTime_),
|
||||
maxOpenFractionDelta_(ptf.maxOpenFractionDelta_),
|
||||
curTimeIndex_(-1)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::activeBaffleVelocityFvPatchVectorField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchVectorField::autoMap(m);
|
||||
|
||||
//- Note: cannot map field from cyclic patch anyway so just recalculate
|
||||
// Areas should be consistent when doing autoMap except in case of
|
||||
// topo changes.
|
||||
initWallSf_ = patch().Sf();
|
||||
initCyclicSf_ = patch().boundaryMesh()[cyclicPatchLabel_].Sf();
|
||||
}
|
||||
|
||||
void Foam::activeBaffleVelocityFvPatchVectorField::rmap
|
||||
(
|
||||
const fvPatchVectorField& ptf,
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchVectorField::rmap(ptf, addr);
|
||||
|
||||
//- Note: cannot map field from cyclic patch anyway so just recalculate
|
||||
// Areas should be consistent when doing rmap (mainly reconstructPar)
|
||||
initWallSf_ = patch().Sf();
|
||||
initCyclicSf_ = patch().boundaryMesh()[cyclicPatchLabel_].Sf();
|
||||
}
|
||||
|
||||
|
||||
void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute the change to the openFraction only once per time-step
|
||||
if (curTimeIndex_ != this->db().time().timeIndex())
|
||||
{
|
||||
const volScalarField& p = db().lookupObject<volScalarField>
|
||||
(
|
||||
pName_
|
||||
);
|
||||
|
||||
const fvPatch& cyclicPatch = patch().boundaryMesh()[cyclicPatchLabel_];
|
||||
const labelList& cyclicFaceCells = cyclicPatch.patch().faceCells();
|
||||
label nCyclicFaces = cyclicFaceCells.size();
|
||||
label nCyclicFacesPerSide = nCyclicFaces/2;
|
||||
|
||||
scalar forceDiff = 0;
|
||||
|
||||
for (label facei=0; facei<nCyclicFacesPerSide; facei++)
|
||||
{
|
||||
forceDiff += p[cyclicFaceCells[facei]]*mag(initCyclicSf_[facei]);
|
||||
}
|
||||
|
||||
for (label facei=nCyclicFacesPerSide; facei<nCyclicFaces; facei++)
|
||||
{
|
||||
forceDiff -= p[cyclicFaceCells[facei]]*mag(initCyclicSf_[facei]);
|
||||
}
|
||||
|
||||
openFraction_ =
|
||||
max(min(
|
||||
openFraction_
|
||||
+ max
|
||||
(
|
||||
this->db().time().deltaT().value()/openingTime_,
|
||||
maxOpenFractionDelta_
|
||||
)
|
||||
*(orientation_*sign(forceDiff)),
|
||||
1 - 1e-6), 1e-6);
|
||||
|
||||
Info<< "openFraction = " << openFraction_ << endl;
|
||||
|
||||
vectorField::subField Sfw = patch().patch().faceAreas();
|
||||
vectorField newSfw = (1 - openFraction_)*initWallSf_;
|
||||
forAll(Sfw, facei)
|
||||
{
|
||||
Sfw[facei] = newSfw[facei];
|
||||
}
|
||||
const_cast<scalarField&>(patch().magSf()) = mag(patch().Sf());
|
||||
|
||||
const_cast<vectorField&>(cyclicPatch.Sf()) =
|
||||
openFraction_*initCyclicSf_;
|
||||
const_cast<scalarField&>(cyclicPatch.magSf()) =
|
||||
mag(cyclicPatch.Sf());
|
||||
|
||||
curTimeIndex_ = this->db().time().timeIndex();
|
||||
}
|
||||
|
||||
fixedValueFvPatchVectorField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::activeBaffleVelocityFvPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchVectorField::write(os);
|
||||
os.writeKeyword("cyclicPatch")
|
||||
<< cyclicPatchName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("orientation")
|
||||
<< orientation_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("openingTime")
|
||||
<< openingTime_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("maxOpenFractionDelta")
|
||||
<< maxOpenFractionDelta_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("openFraction")
|
||||
<< openFraction_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("p")
|
||||
<< pName_ << token::END_STATEMENT << nl;
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchVectorField,
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,193 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::activeBaffleVelocityFvPatchVectorField
|
||||
|
||||
Description
|
||||
Boundary condition that modifies mesh areas based on velocity.
|
||||
|
||||
SourceFiles
|
||||
activeBaffleVelocityFvPatchVectorField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef activeBaffleVelocityFvPatchVectorField_H
|
||||
#define activeBaffleVelocityFvPatchVectorField_H
|
||||
|
||||
#include "fvPatchFields.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class activeBaffleVelocityFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class activeBaffleVelocityFvPatchVectorField
|
||||
:
|
||||
public fixedValueFvPatchVectorField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of the pressure field used to calculate the force
|
||||
// on the active baffle
|
||||
word pName_;
|
||||
|
||||
//- Name of the cyclic patch used when the active baffle is open
|
||||
word cyclicPatchName_;
|
||||
|
||||
//- Index of the cyclic patch used when the active baffle is open
|
||||
label cyclicPatchLabel_;
|
||||
|
||||
//- Orientation (1 or -1) of the active baffle patch.
|
||||
// Used to change the direction of opening without the need for
|
||||
// reordering the patch faces
|
||||
label orientation_;
|
||||
|
||||
//- Initial wall patch areas
|
||||
vectorField initWallSf_;
|
||||
|
||||
//- Initial cyclic patch areas
|
||||
vectorField initCyclicSf_;
|
||||
|
||||
//- Current fraction of the active baffle which is open
|
||||
scalar openFraction_;
|
||||
|
||||
//- Time taken for the active baffle to open
|
||||
scalar openingTime_;
|
||||
|
||||
//- Maximum fractional change to the active baffle openness
|
||||
// per time-step
|
||||
scalar maxOpenFractionDelta_;
|
||||
|
||||
label curTimeIndex_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("activeBaffleVelocity");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given activeBaffleVelocityFvPatchVectorField
|
||||
// onto a new patch
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const activeBaffleVelocityFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const activeBaffleVelocityFvPatchVectorField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchVectorField> clone() const
|
||||
{
|
||||
return tmp<fvPatchVectorField>
|
||||
(
|
||||
new activeBaffleVelocityFvPatchVectorField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
activeBaffleVelocityFvPatchVectorField
|
||||
(
|
||||
const activeBaffleVelocityFvPatchVectorField&,
|
||||
const DimensionedField<vector, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchVectorField> clone
|
||||
(
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchVectorField>
|
||||
(
|
||||
new activeBaffleVelocityFvPatchVectorField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
(
|
||||
const fvPatchVectorField&,
|
||||
const labelList&
|
||||
);
|
||||
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -37,7 +37,7 @@ Foam::molecule::molecule
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
Particle<molecule>(cloud, is, true),
|
||||
Particle<molecule>(cloud, is, readFields),
|
||||
Q_(tensor::zero),
|
||||
v_(vector::zero),
|
||||
a_(vector::zero),
|
||||
|
||||
@ -30,14 +30,17 @@ License
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo(Istream& is)
|
||||
Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
||||
(
|
||||
Istream& is
|
||||
)
|
||||
:
|
||||
EquationOfState(is),
|
||||
Hf_(readScalar(is)),
|
||||
Sf_(readScalar(is)),
|
||||
cpPolynomial_("cpPolynomial", is),
|
||||
dhPolynomial_("dhPolynomial", cpPolynomial_.integrate()),
|
||||
sPolynomial_("sPolynomial", cpPolynomial_.integrateMinus1())
|
||||
dhPolynomial_(cpPolynomial_.integrate()),
|
||||
sPolynomial_(cpPolynomial_.integrateMinus1())
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="dnsFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication boxTurb
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application dnsFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application directory
|
||||
application="laplacianFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runAnsysToFoam()
|
||||
{
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application laplacianFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="potentialFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application potentialFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="potentialFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application potentialFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application scalarTransportFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application XiFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application XiFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
# Set application name
|
||||
application="XiFoam"
|
||||
|
||||
setControlDict () {
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application XiFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application dieselFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="engineFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runKivaToFoam ()
|
||||
{
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
applicationClass engineFoam;
|
||||
application engineFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
applicationClass engineFoam;
|
||||
application engineFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
applicationClass engineFoam;
|
||||
application engineFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=${PWD##*/}
|
||||
# Get application name
|
||||
application="rhoCentralFoam"
|
||||
|
||||
cases=" \
|
||||
shockTube \
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoCentralFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoCentralFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0.005;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoCentralFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoCentralFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoCentralFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoCentralFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -10,28 +10,42 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha1;
|
||||
location "0";
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
walls
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -20,27 +20,27 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -10,6 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPisoFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
@ -43,6 +45,11 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 0.5;
|
||||
|
||||
|
||||
functions
|
||||
{
|
||||
fieldAverage1
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPisoFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoSonicFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="rhoSonicFoam"
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoSonicFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="rhopSonicFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhopSonicFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhopSonicFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
(cd laminar && ./Allrun)
|
||||
(cd ras && ./Allrun)
|
||||
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=sonicFoam
|
||||
|
||||
cases=" \
|
||||
forwardStep \
|
||||
shockTube \
|
||||
"
|
||||
for case in $cases
|
||||
do
|
||||
(cd $case && runApplication blockMesh)
|
||||
#
|
||||
if [ "$case" = "shockTube" ] ; then
|
||||
(cd $case && ./Allrun)
|
||||
else
|
||||
(cd $case && runApplication $application)
|
||||
fi
|
||||
#
|
||||
done
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application sonicFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="sonicFoam"
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application sonicFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=${PWD##*/}
|
||||
|
||||
runStarToFoam ()
|
||||
{
|
||||
if [ -f log.starToFoam ] ; then
|
||||
echo "starToFoam already run on $PWD: remove log file to run"
|
||||
else
|
||||
echo "starToFoam: converting mesh $1"
|
||||
starToFoam $1 > log.starToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
# Do prism
|
||||
(cd prism && foamRunTutorials)
|
||||
|
||||
# Special handling for nacaAirfoil
|
||||
cd nacaAirfoil
|
||||
runStarToFoam prostar/nacaAirfoil
|
||||
mv constant/polyMesh/boundary temp
|
||||
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
|
||||
temp > constant/polyMesh/boundary
|
||||
rm temp
|
||||
runApplication $application
|
||||
cd ..
|
||||
23
tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun
Executable file
23
tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runStarToFoam ()
|
||||
{
|
||||
if [ -f log.starToFoam ] ; then
|
||||
echo "starToFoam already run on $PWD: remove log file to run"
|
||||
else
|
||||
echo "starToFoam: converting mesh $1"
|
||||
starToFoam $1 > log.starToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
runStarToFoam prostar/nacaAirfoil
|
||||
mv constant/polyMesh/boundary temp
|
||||
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
|
||||
temp > constant/polyMesh/boundary
|
||||
rm temp
|
||||
runApplication $application
|
||||
@ -2,11 +2,7 @@ nacaAirfoil
|
||||
~~~~~~~~~~~
|
||||
* large domain with airfoil section near centre
|
||||
* extremely non-orthogonal, highly skew mesh refined around the airfoil
|
||||
* running at Mach 1.78
|
||||
* running at Mach 1.78
|
||||
* limited 0.5 on all laplacianSchemes because the mesh is so poor
|
||||
* run to t = 0.02 with nextWrite; change to stopAt endTime to continue running
|
||||
* deltaT can be increased later in the run to 2e-07
|
||||
|
||||
prism
|
||||
~~~~~
|
||||
* run to t = 0.0014 for convergence
|
||||
* run to t = 0.02 with nextWrite; change to stopAt endTime to continue running
|
||||
* deltaT can be increased later in the run to 2e-07
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application sonicFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application sonicFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=${PWD##*/}
|
||||
# Set application name
|
||||
application="sonicLiquidFoam"
|
||||
|
||||
setDecompressionTankFine ()
|
||||
{
|
||||
|
||||
@ -15,6 +15,8 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application sonicLiquidFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user