mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -1,3 +1,6 @@
|
|||||||
Test-DataEntry.C
|
Test-DataEntry.C
|
||||||
|
interpolationWeights.C
|
||||||
|
splineInterpolationWeights.C
|
||||||
|
linearInterpolationWeights.C
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/Test-DataEntry
|
EXE = $(FOAM_USER_APPBIN)/Test-DataEntry
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-DFULLDEBUG -g -O0 \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,6 +32,8 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "DataEntry.H"
|
#include "DataEntry.H"
|
||||||
#include "IOdictionary.H"
|
#include "IOdictionary.H"
|
||||||
|
#include "linearInterpolationWeights.H"
|
||||||
|
#include "splineInterpolationWeights.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -41,6 +43,62 @@ int main(int argc, char *argv[])
|
|||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
|
{
|
||||||
|
scalarField samples(4);
|
||||||
|
samples[0] = 0;
|
||||||
|
samples[1] = 1;
|
||||||
|
samples[2] = 2;
|
||||||
|
samples[3] = 3;
|
||||||
|
scalarField values(4);
|
||||||
|
values = 1.0;
|
||||||
|
//values[0] = 0.0;
|
||||||
|
//values[1] = 1.0;
|
||||||
|
|
||||||
|
//linearInterpolationWeights interpolator
|
||||||
|
splineInterpolationWeights interpolator
|
||||||
|
(
|
||||||
|
samples,
|
||||||
|
interpolationWeights::WARN
|
||||||
|
);
|
||||||
|
labelList indices;
|
||||||
|
scalarField weights;
|
||||||
|
|
||||||
|
interpolator.integrationWeights(1.1, 1.2, indices, weights);
|
||||||
|
Pout<< "indices:" << indices << endl;
|
||||||
|
Pout<< "weights:" << weights << endl;
|
||||||
|
|
||||||
|
scalar baseSum = interpolator.weightedSum
|
||||||
|
(
|
||||||
|
weights,
|
||||||
|
UIndirectList<scalar>(values, indices)
|
||||||
|
);
|
||||||
|
Pout<< "baseSum=" << baseSum << nl << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
|
// interpolator.integrationWeights(-0.01, 0, indices, weights);
|
||||||
|
// scalar partialSum = interpolator.weightedSum
|
||||||
|
// (
|
||||||
|
// weights,
|
||||||
|
// UIndirectList<scalar>(values, indices)
|
||||||
|
// );
|
||||||
|
// Pout<< "partialSum=" << partialSum << nl << nl << endl;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// interpolator.integrationWeights(-0.01, 1, indices, weights);
|
||||||
|
// //Pout<< "samples:" << samples << endl;
|
||||||
|
// //Pout<< "indices:" << indices << endl;
|
||||||
|
// //Pout<< "weights:" << weights << endl;
|
||||||
|
// scalar sum = interpolator.weightedSum
|
||||||
|
// (
|
||||||
|
// weights,
|
||||||
|
// UIndirectList<scalar>(values, indices)
|
||||||
|
// );
|
||||||
|
// Pout<< "integrand=" << sum << nl << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
IOdictionary dataEntryProperties
|
IOdictionary dataEntryProperties
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -239,7 +239,8 @@ snapControls
|
|||||||
// Leave out altogether to disable.
|
// Leave out altogether to disable.
|
||||||
nFeatureSnapIter 10;
|
nFeatureSnapIter 10;
|
||||||
|
|
||||||
//- Detect (geometric) features by sampling the surface (default=false)
|
//- Detect (geometric only) features by sampling the surface
|
||||||
|
// (default=false).
|
||||||
implicitFeatureSnap false;
|
implicitFeatureSnap false;
|
||||||
|
|
||||||
//- Use castellatedMeshControls::features (default = true)
|
//- Use castellatedMeshControls::features (default = true)
|
||||||
|
|||||||
@ -92,8 +92,10 @@ patches
|
|||||||
// Optional: explicitly set transformation tensor.
|
// Optional: explicitly set transformation tensor.
|
||||||
// Used when matching and synchronising points.
|
// Used when matching and synchronising points.
|
||||||
transform rotational;
|
transform rotational;
|
||||||
rotationAxis ( 0 0 1 );
|
rotationAxis (1 0 0);
|
||||||
rotationCentre ( 0.3 0 0 );
|
rotationCentre (0 0 0);
|
||||||
|
// transform translational;
|
||||||
|
// separationVector (1 0 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// How to construct: either from 'patches' or 'set'
|
// How to construct: either from 'patches' or 'set'
|
||||||
|
|||||||
@ -107,6 +107,7 @@ void writeWeights(const polyMesh& mesh)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addRegionOption.H"
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"checkAMI",
|
"checkAMI",
|
||||||
@ -115,7 +116,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createDynamicFvMesh.H"
|
# include "createNamedDynamicFvMesh.H"
|
||||||
|
|
||||||
const bool checkAMI = args.optionFound("checkAMI");
|
const bool checkAMI = args.optionFound("checkAMI");
|
||||||
|
|
||||||
|
|||||||
@ -359,6 +359,20 @@ FoamFile
|
|||||||
// cellSet c0; // name of cellSet of slave side
|
// cellSet c0; // name of cellSet of slave side
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
// pointZoneSet
|
||||||
|
// ~~~~~~~~~~~~
|
||||||
|
// (mirrors operations on a pointSet into a pointZone)
|
||||||
|
//
|
||||||
|
// // Select based on pointSet
|
||||||
|
// source setToPointZone;
|
||||||
|
// sourceInfo
|
||||||
|
// {
|
||||||
|
// set p0; // name of pointSet
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
actions
|
actions
|
||||||
(
|
(
|
||||||
|
|||||||
@ -965,4 +965,34 @@ DimensionedConstants
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DimensionSets
|
||||||
|
{
|
||||||
|
unitSet SI; // USCS
|
||||||
|
|
||||||
|
SICoeffs
|
||||||
|
{
|
||||||
|
// Basic units
|
||||||
|
kg kg [ 1 0 0 0 0 0 0 ] 1.0;
|
||||||
|
m m [ 0 1 0 0 0 0 0 ] 1.0;
|
||||||
|
s s [ 0 0 1 0 0 0 0 ] 1.0;
|
||||||
|
K K [ 0 0 0 1 0 0 0 ] 1.0;
|
||||||
|
mol mol [ 0 0 0 0 1 0 0 ] 1.0;
|
||||||
|
A A [ 0 0 0 0 0 1 0 ] 1.0;
|
||||||
|
Cd Cd [ 0 0 0 0 0 0 1 ] 1.0;
|
||||||
|
|
||||||
|
// Derived units
|
||||||
|
Pa Pa [ kg^1 m^-2 ] 1.0;
|
||||||
|
|
||||||
|
// Scaled units
|
||||||
|
mm mm [ kg^1 m^-2 ] 1e-3;
|
||||||
|
|
||||||
|
|
||||||
|
// Set of units used for printing. Can be any basic or derived
|
||||||
|
// but not scaled (only supported for dimensionedScalar, etc)
|
||||||
|
printUnits (kg m s K mol A Cd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,7 +30,8 @@ License
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::CompatibilityConstant<Type>::CompatibilityConstant
|
Foam::CompatibilityConstant<Type>::CompatibilityConstant
|
||||||
(
|
(
|
||||||
const word& entryName, const dictionary& dict
|
const word& entryName,
|
||||||
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
DataEntry<Type>(entryName),
|
DataEntry<Type>(entryName),
|
||||||
@ -69,6 +70,7 @@ Foam::CompatibilityConstant<Type>::CompatibilityConstant
|
|||||||
dimensions_(cnst.dimensions_)
|
dimensions_(cnst.dimensions_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -27,13 +27,13 @@ Class
|
|||||||
Description
|
Description
|
||||||
Templated table container data entry. Items are stored in a list of
|
Templated table container data entry. Items are stored in a list of
|
||||||
Tuple2's. First column is always stored as scalar entries. Data is read
|
Tuple2's. First column is always stored as scalar entries. Data is read
|
||||||
in the form, e.g. for an entry \<entryName\> that is (scalar, vector):
|
in Tuple2 form, e.g. for an entry \<entryName\> that is (scalar, vector):
|
||||||
|
|
||||||
\verbatim
|
\verbatim
|
||||||
<entryName> table [0 1 0 0 0] //dimension set optional
|
<entryName> table
|
||||||
(
|
(
|
||||||
0.0 (1 2 3)
|
(0.0 (1 2 3))
|
||||||
1.0 (4 5 6)
|
(1.0 (4 5 6))
|
||||||
);
|
);
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
|||||||
32
src/dynamicFvMesh/include/createNamedDynamicFvMesh.H
Normal file
32
src/dynamicFvMesh/include/createNamedDynamicFvMesh.H
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Foam::word regionName;
|
||||||
|
|
||||||
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
|
{
|
||||||
|
Foam::Info
|
||||||
|
<< "Create mesh " << regionName << " for time = "
|
||||||
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
regionName = Foam::fvMesh::defaultRegion;
|
||||||
|
Foam::Info
|
||||||
|
<< "Create mesh for time = "
|
||||||
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
autoPtr<dynamicFvMesh> meshPtr
|
||||||
|
(
|
||||||
|
dynamicFvMesh::New
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
regionName,
|
||||||
|
runTime.timeName(),
|
||||||
|
runTime,
|
||||||
|
IOobject::MUST_READ
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
dynamicFvMesh& mesh = meshPtr();
|
||||||
@ -40,8 +40,9 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(p, iF),
|
fixedValueFvPatchField<vector>(p, iF),
|
||||||
flowRate_(),
|
flowRate_(),
|
||||||
phiName_("phi"),
|
volumetric_(false),
|
||||||
rhoName_("rho")
|
rhoName_("rho"),
|
||||||
|
rhoInlet_(0.0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -56,8 +57,9 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
|
||||||
flowRate_(ptf.flowRate_().clone().ptr()),
|
flowRate_(ptf.flowRate_().clone().ptr()),
|
||||||
phiName_(ptf.phiName_),
|
volumetric_(ptf.volumetric_),
|
||||||
rhoName_(ptf.rhoName_)
|
rhoName_(ptf.rhoName_),
|
||||||
|
rhoInlet_(ptf.rhoInlet_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -69,11 +71,52 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(p, iF, dict),
|
fixedValueFvPatchField<vector>(p, iF),
|
||||||
flowRate_(DataEntry<scalar>::New("flowRate", dict)),
|
rhoInlet_(0.0)
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
{
|
||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
if (dict.found("volumetricFlowRate"))
|
||||||
{}
|
{
|
||||||
|
volumetric_ = true;
|
||||||
|
flowRate_ = DataEntry<scalar>::New("volumetricFlowRate", dict);
|
||||||
|
rhoName_ = "rho";
|
||||||
|
}
|
||||||
|
else if (dict.found("massFlowRate"))
|
||||||
|
{
|
||||||
|
volumetric_ = false;
|
||||||
|
flowRate_ = DataEntry<scalar>::New("massFlowRate", dict);
|
||||||
|
rhoName_ = word(dict.lookupOrDefault<word>("rho", "rho"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalIOErrorIn
|
||||||
|
(
|
||||||
|
"flowRateInletVelocityFvPatchVectorField::"
|
||||||
|
"flowRateInletVelocityFvPatchVectorField"
|
||||||
|
"(const fvPatch&, const DimensionedField<vector, volMesh>&,"
|
||||||
|
" const dictionary&)",
|
||||||
|
dict
|
||||||
|
) << "Please supply either 'volumetricFlowRate' or"
|
||||||
|
<< " 'massFlowRate' and 'rho'" << exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Value field require if mass based
|
||||||
|
if (dict.found("value"))
|
||||||
|
{
|
||||||
|
fvPatchField<vector>::operator=
|
||||||
|
(
|
||||||
|
vectorField("value", dict, p.size())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (volumetric_)
|
||||||
|
{
|
||||||
|
evaluate(Pstream::blocking);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rhoInlet_ = readScalar(dict.lookup("rhoInlet"));
|
||||||
|
updateCoeffs(rhoInlet_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::flowRateInletVelocityFvPatchVectorField::
|
Foam::flowRateInletVelocityFvPatchVectorField::
|
||||||
@ -84,8 +127,9 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(ptf),
|
fixedValueFvPatchField<vector>(ptf),
|
||||||
flowRate_(ptf.flowRate_().clone().ptr()),
|
flowRate_(ptf.flowRate_().clone().ptr()),
|
||||||
phiName_(ptf.phiName_),
|
volumetric_(ptf.volumetric_),
|
||||||
rhoName_(ptf.rhoName_)
|
rhoName_(ptf.rhoName_),
|
||||||
|
rhoInlet_(ptf.rhoInlet_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -98,13 +142,44 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchField<vector>(ptf, iF),
|
fixedValueFvPatchField<vector>(ptf, iF),
|
||||||
flowRate_(ptf.flowRate_().clone().ptr()),
|
flowRate_(ptf.flowRate_().clone().ptr()),
|
||||||
phiName_(ptf.phiName_),
|
volumetric_(ptf.volumetric_),
|
||||||
rhoName_(ptf.rhoName_)
|
rhoName_(ptf.rhoName_),
|
||||||
|
rhoInlet_(ptf.rhoInlet_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs
|
||||||
|
(
|
||||||
|
const scalar uniformRho
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (updated())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const scalar t = db().time().timeOutputValue();
|
||||||
|
|
||||||
|
// a simpler way of doing this would be nice
|
||||||
|
const scalar avgU = -flowRate_->value(t)/gSum(patch().magSf());
|
||||||
|
|
||||||
|
tmp<vectorField> n = patch().nf();
|
||||||
|
|
||||||
|
if (volumetric_ || rhoName_ == "none")
|
||||||
|
{
|
||||||
|
// volumetric flow-rate
|
||||||
|
operator==(n*avgU);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// mass flow-rate
|
||||||
|
operator==(n*avgU/uniformRho);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (updated())
|
if (updated())
|
||||||
@ -119,40 +194,18 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
|
|
||||||
tmp<vectorField> n = patch().nf();
|
tmp<vectorField> n = patch().nf();
|
||||||
|
|
||||||
const surfaceScalarField& phi =
|
if (volumetric_ || rhoName_ == "none")
|
||||||
db().lookupObject<surfaceScalarField>(phiName_);
|
|
||||||
|
|
||||||
if (phi.dimensions() == dimVelocity*dimArea)
|
|
||||||
{
|
{
|
||||||
// volumetric flow-rate
|
// volumetric flow-rate or density not given
|
||||||
operator==(n*avgU);
|
operator==(n*avgU);
|
||||||
}
|
}
|
||||||
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
|
||||||
{
|
|
||||||
if (rhoName_ == "none")
|
|
||||||
{
|
|
||||||
// volumetric flow-rate if density not given
|
|
||||||
operator==(n*avgU);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// mass flow-rate
|
|
||||||
const fvPatchField<scalar>& rhop =
|
|
||||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
|
||||||
|
|
||||||
operator==(n*avgU/rhop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
// mass flow-rate
|
||||||
(
|
const fvPatchField<scalar>& rhop =
|
||||||
"flowRateInletVelocityFvPatchVectorField::updateCoeffs()"
|
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||||
) << "dimensions of " << phiName_ << " are incorrect" << nl
|
|
||||||
<< " on patch " << this->patch().name()
|
operator==(n*avgU/rhop);
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
|
||||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
|
||||||
<< nl << exit(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fixedValueFvPatchField<vector>::updateCoeffs();
|
fixedValueFvPatchField<vector>::updateCoeffs();
|
||||||
@ -163,8 +216,11 @@ void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const
|
|||||||
{
|
{
|
||||||
fvPatchField<vector>::write(os);
|
fvPatchField<vector>::write(os);
|
||||||
flowRate_->writeData(os);
|
flowRate_->writeData(os);
|
||||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
if (!volumetric_)
|
||||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
{
|
||||||
|
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||||
|
os.writeKeyword("rhoInlet") << rhoInlet_ << token::END_STATEMENT << nl;
|
||||||
|
}
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,21 +28,25 @@ Description
|
|||||||
Describes a volumetric/mass flow normal vector boundary condition by its
|
Describes a volumetric/mass flow normal vector boundary condition by its
|
||||||
magnitude as an integral over its area.
|
magnitude as an integral over its area.
|
||||||
|
|
||||||
The basis of the patch (volumetric or mass) is determined by the
|
Either specify 'volumetricFlowRate' or 'massFlowRate' (requires additional
|
||||||
dimensions of the flux, phi.
|
'rho' entry).
|
||||||
|
|
||||||
If the flux is mass-based
|
|
||||||
- the current density is used to correct the velocity
|
|
||||||
- volumetric flow rate can be applied by setting the 'rho' entry to 'none'
|
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
|
volumetricFlowRate 0.2; // Volumetric [m3/s]
|
||||||
rho rho; // none | rho [m3/s or kg/s]
|
}
|
||||||
value uniform (0 0 0); // placeholder
|
\endverbatim
|
||||||
|
|
||||||
|
\verbatim
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type flowRateInletVelocity;
|
||||||
|
volumetricFlowRate 0.2; // mass flow rate [kg/s]
|
||||||
|
rho rho; // rho [m3/s or kg/s]
|
||||||
|
value uniform (0 0 0); // placeholder
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
@ -79,12 +83,15 @@ class flowRateInletVelocityFvPatchVectorField
|
|||||||
//- Inlet integral flow rate
|
//- Inlet integral flow rate
|
||||||
autoPtr<DataEntry<scalar> > flowRate_;
|
autoPtr<DataEntry<scalar> > flowRate_;
|
||||||
|
|
||||||
//- Name of the flux transporting the field
|
//- Is volumetric?
|
||||||
word phiName_;
|
bool volumetric_;
|
||||||
|
|
||||||
//- Name of the density field used to normalize the mass flux
|
//- Name of the density field used to normalize the mass flux
|
||||||
word rhoName_;
|
word rhoName_;
|
||||||
|
|
||||||
|
//- Rho initialisation value (for start; if value not supplied)
|
||||||
|
scalar rhoInlet_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -157,6 +164,10 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
//- Update the coefficients associated with the patch field given
|
||||||
|
// uniform density field
|
||||||
|
void updateCoeffs(const scalar uniformRho);
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
|||||||
@ -81,8 +81,14 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver
|
|||||||
diffusivityPtr_
|
diffusivityPtr_
|
||||||
(
|
(
|
||||||
motionDiffusivity::New(fvMesh_, coeffDict().lookup("diffusivity"))
|
motionDiffusivity::New(fvMesh_, coeffDict().lookup("diffusivity"))
|
||||||
)
|
),
|
||||||
{}
|
solveOnPoints0_(coeffDict().lookupOrDefault("solveOnPoints0", false))
|
||||||
|
{
|
||||||
|
if (solveOnPoints0_)
|
||||||
|
{
|
||||||
|
Info<< type() << " : solving on points0" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
@ -123,11 +129,18 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
|
|||||||
diffusivityPtr_->correct();
|
diffusivityPtr_->correct();
|
||||||
pointDisplacement_.boundaryField().updateCoeffs();
|
pointDisplacement_.boundaryField().updateCoeffs();
|
||||||
|
|
||||||
|
pointField oldPoints;
|
||||||
|
if (solveOnPoints0_)
|
||||||
|
{
|
||||||
|
oldPoints = fvMesh_.points();
|
||||||
|
movePoints(points0());
|
||||||
|
}
|
||||||
|
|
||||||
surfaceScalarField Df(diffusivityPtr_->operator()());
|
surfaceScalarField Df(diffusivityPtr_->operator()());
|
||||||
|
|
||||||
volTensorField gradCd(fvc::grad(cellDisplacement_));
|
volTensorField gradCd(fvc::grad(cellDisplacement_));
|
||||||
|
|
||||||
Foam::solve
|
tmp<fvMatrix<vector> > laplacianDf
|
||||||
(
|
(
|
||||||
fvm::laplacian
|
fvm::laplacian
|
||||||
(
|
(
|
||||||
@ -135,7 +148,16 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
|
|||||||
cellDisplacement_,
|
cellDisplacement_,
|
||||||
"laplacian(diffusivity,cellDisplacement)"
|
"laplacian(diffusivity,cellDisplacement)"
|
||||||
)
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// if (solveOnPoints0_)
|
||||||
|
// {
|
||||||
|
// movePoints(oldPoints);
|
||||||
|
// }
|
||||||
|
|
||||||
|
Foam::solve
|
||||||
|
(
|
||||||
|
laplacianDf
|
||||||
+ fvc::div
|
+ fvc::div
|
||||||
(
|
(
|
||||||
Df
|
Df
|
||||||
@ -173,6 +195,12 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
|
|||||||
)
|
)
|
||||||
*/
|
*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (solveOnPoints0_)
|
||||||
|
{
|
||||||
|
movePoints(points0());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,6 @@ class motionDiffusivity;
|
|||||||
|
|
||||||
class displacementSBRStressFvMotionSolver
|
class displacementSBRStressFvMotionSolver
|
||||||
:
|
:
|
||||||
// public displacementFvMotionSolver
|
|
||||||
public displacementMotionSolver,
|
public displacementMotionSolver,
|
||||||
public fvMotionSolverCore
|
public fvMotionSolverCore
|
||||||
{
|
{
|
||||||
@ -65,6 +64,8 @@ class displacementSBRStressFvMotionSolver
|
|||||||
//- Diffusivity used to control the motion
|
//- Diffusivity used to control the motion
|
||||||
autoPtr<motionDiffusivity> diffusivityPtr_;
|
autoPtr<motionDiffusivity> diffusivityPtr_;
|
||||||
|
|
||||||
|
//- Solve on base mesh
|
||||||
|
Switch solveOnPoints0_;
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
|||||||
@ -99,76 +99,6 @@ void Foam::autoLayerDriver::sumWeights
|
|||||||
|
|
||||||
|
|
||||||
// Smooth field on moving patch
|
// Smooth field on moving patch
|
||||||
//void Foam::autoLayerDriver::smoothField
|
|
||||||
//(
|
|
||||||
// const motionSmoother& meshMover,
|
|
||||||
// const PackedBoolList& isMasterEdge,
|
|
||||||
// const labelList& meshEdges,
|
|
||||||
// const scalarField& fieldMin,
|
|
||||||
// const label nSmoothDisp,
|
|
||||||
// scalarField& field
|
|
||||||
//) const
|
|
||||||
//{
|
|
||||||
// const indirectPrimitivePatch& pp = meshMover.patch();
|
|
||||||
// const edgeList& edges = pp.edges();
|
|
||||||
// const labelList& meshPoints = pp.meshPoints();
|
|
||||||
//
|
|
||||||
// scalarField invSumWeight(pp.nPoints());
|
|
||||||
// sumWeights
|
|
||||||
// (
|
|
||||||
// isMasterEdge,
|
|
||||||
// meshEdges,
|
|
||||||
// meshPoints,
|
|
||||||
// edges,
|
|
||||||
// invSumWeight
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// // Get smoothly varying patch field.
|
|
||||||
// Info<< "shrinkMeshDistance : Smoothing field ..." << endl;
|
|
||||||
//
|
|
||||||
// for (label iter = 0; iter < nSmoothDisp; iter++)
|
|
||||||
// {
|
|
||||||
// scalarField average(pp.nPoints());
|
|
||||||
// averageNeighbours
|
|
||||||
// (
|
|
||||||
// meshMover.mesh(),
|
|
||||||
// isMasterEdge,
|
|
||||||
// meshEdges,
|
|
||||||
// meshPoints,
|
|
||||||
// pp.edges(),
|
|
||||||
// invSumWeight,
|
|
||||||
// field,
|
|
||||||
// average
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// // Transfer to field
|
|
||||||
// forAll(field, pointI)
|
|
||||||
// {
|
|
||||||
// //full smoothing neighbours + point value
|
|
||||||
// average[pointI] = 0.5*(field[pointI]+average[pointI]);
|
|
||||||
//
|
|
||||||
// // perform monotonic smoothing
|
|
||||||
// if
|
|
||||||
// (
|
|
||||||
// average[pointI] < field[pointI]
|
|
||||||
// && average[pointI] >= fieldMin[pointI]
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// field[pointI] = average[pointI];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // Do residual calculation every so often.
|
|
||||||
// if ((iter % 10) == 0)
|
|
||||||
// {
|
|
||||||
// Info<< " Iteration " << iter << " residual "
|
|
||||||
// << gSum(mag(field-average))
|
|
||||||
// /returnReduce(average.size(), sumOp<label>())
|
|
||||||
// << endl;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//XXXXXXXXX
|
|
||||||
void Foam::autoLayerDriver::smoothField
|
void Foam::autoLayerDriver::smoothField
|
||||||
(
|
(
|
||||||
const motionSmoother& meshMover,
|
const motionSmoother& meshMover,
|
||||||
@ -196,15 +126,9 @@ void Foam::autoLayerDriver::smoothField
|
|||||||
// Get smoothly varying patch field.
|
// Get smoothly varying patch field.
|
||||||
Info<< "shrinkMeshDistance : Smoothing field ..." << endl;
|
Info<< "shrinkMeshDistance : Smoothing field ..." << endl;
|
||||||
|
|
||||||
|
for (label iter = 0; iter < nSmoothDisp; iter++)
|
||||||
const scalar lambda = 0.33;
|
|
||||||
const scalar mu = -0.34;
|
|
||||||
|
|
||||||
for (label iter = 0; iter < 90; iter++)
|
|
||||||
{
|
{
|
||||||
scalarField average(pp.nPoints());
|
scalarField average(pp.nPoints());
|
||||||
|
|
||||||
// Calculate average of field
|
|
||||||
averageNeighbours
|
averageNeighbours
|
||||||
(
|
(
|
||||||
meshMover.mesh(),
|
meshMover.mesh(),
|
||||||
@ -217,37 +141,23 @@ void Foam::autoLayerDriver::smoothField
|
|||||||
average
|
average
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(field, i)
|
// Transfer to field
|
||||||
|
forAll(field, pointI)
|
||||||
{
|
{
|
||||||
if (field[i] >= fieldMin[i])
|
//full smoothing neighbours + point value
|
||||||
|
average[pointI] = 0.5*(field[pointI]+average[pointI]);
|
||||||
|
|
||||||
|
// perform monotonic smoothing
|
||||||
|
if
|
||||||
|
(
|
||||||
|
average[pointI] < field[pointI]
|
||||||
|
&& average[pointI] >= fieldMin[pointI]
|
||||||
|
)
|
||||||
{
|
{
|
||||||
field[i] = (1-lambda)*field[i]+lambda*average[i];
|
field[pointI] = average[pointI];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Calculate average of field
|
|
||||||
averageNeighbours
|
|
||||||
(
|
|
||||||
meshMover.mesh(),
|
|
||||||
isMasterEdge,
|
|
||||||
meshEdges,
|
|
||||||
meshPoints,
|
|
||||||
pp.edges(),
|
|
||||||
invSumWeight,
|
|
||||||
field,
|
|
||||||
average
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll(field, i)
|
|
||||||
{
|
|
||||||
if (field[i] >= fieldMin[i])
|
|
||||||
{
|
|
||||||
field[i] = (1-mu)*field[i]+mu*average[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Do residual calculation every so often.
|
// Do residual calculation every so often.
|
||||||
if ((iter % 10) == 0)
|
if ((iter % 10) == 0)
|
||||||
{
|
{
|
||||||
@ -259,6 +169,96 @@ void Foam::autoLayerDriver::smoothField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//XXXXXXXXX
|
//XXXXXXXXX
|
||||||
|
//void Foam::autoLayerDriver::smoothField
|
||||||
|
//(
|
||||||
|
// const motionSmoother& meshMover,
|
||||||
|
// const PackedBoolList& isMasterEdge,
|
||||||
|
// const labelList& meshEdges,
|
||||||
|
// const scalarField& fieldMin,
|
||||||
|
// const label nSmoothDisp,
|
||||||
|
// scalarField& field
|
||||||
|
//) const
|
||||||
|
//{
|
||||||
|
// const indirectPrimitivePatch& pp = meshMover.patch();
|
||||||
|
// const edgeList& edges = pp.edges();
|
||||||
|
// const labelList& meshPoints = pp.meshPoints();
|
||||||
|
//
|
||||||
|
// scalarField invSumWeight(pp.nPoints());
|
||||||
|
// sumWeights
|
||||||
|
// (
|
||||||
|
// isMasterEdge,
|
||||||
|
// meshEdges,
|
||||||
|
// meshPoints,
|
||||||
|
// edges,
|
||||||
|
// invSumWeight
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// // Get smoothly varying patch field.
|
||||||
|
// Info<< "shrinkMeshDistance : (lambda-mu) Smoothing field ..." << endl;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// const scalar lambda = 0.33;
|
||||||
|
// const scalar mu = -0.34;
|
||||||
|
//
|
||||||
|
// for (label iter = 0; iter < 90; iter++)
|
||||||
|
// {
|
||||||
|
// scalarField average(pp.nPoints());
|
||||||
|
//
|
||||||
|
// // Calculate average of field
|
||||||
|
// averageNeighbours
|
||||||
|
// (
|
||||||
|
// meshMover.mesh(),
|
||||||
|
// isMasterEdge,
|
||||||
|
// meshEdges,
|
||||||
|
// meshPoints,
|
||||||
|
// pp.edges(),
|
||||||
|
// invSumWeight,
|
||||||
|
// field,
|
||||||
|
// average
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// forAll(field, i)
|
||||||
|
// {
|
||||||
|
// if (field[i] >= fieldMin[i])
|
||||||
|
// {
|
||||||
|
// field[i] = (1-lambda)*field[i]+lambda*average[i];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// // Calculate average of field
|
||||||
|
// averageNeighbours
|
||||||
|
// (
|
||||||
|
// meshMover.mesh(),
|
||||||
|
// isMasterEdge,
|
||||||
|
// meshEdges,
|
||||||
|
// meshPoints,
|
||||||
|
// pp.edges(),
|
||||||
|
// invSumWeight,
|
||||||
|
// field,
|
||||||
|
// average
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// forAll(field, i)
|
||||||
|
// {
|
||||||
|
// if (field[i] >= fieldMin[i])
|
||||||
|
// {
|
||||||
|
// field[i] = (1-mu)*field[i]+mu*average[i];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// // Do residual calculation every so often.
|
||||||
|
// if ((iter % 10) == 0)
|
||||||
|
// {
|
||||||
|
// Info<< " Iteration " << iter << " residual "
|
||||||
|
// << gSum(mag(field-average))
|
||||||
|
// /returnReduce(average.size(), sumOp<label>())
|
||||||
|
// << endl;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//XXXXXXXXX
|
||||||
|
|
||||||
// Smooth normals on moving patch.
|
// Smooth normals on moving patch.
|
||||||
void Foam::autoLayerDriver::smoothPatchNormals
|
void Foam::autoLayerDriver::smoothPatchNormals
|
||||||
|
|||||||
@ -45,9 +45,6 @@ inline bool Foam::patchEdgeFaceRegion::update
|
|||||||
|
|
||||||
if (w2.region_ == -2 || region_ == -2)
|
if (w2.region_ == -2 || region_ == -2)
|
||||||
{
|
{
|
||||||
|
|
||||||
Pout<< "update : " << *this << " w2:" << w2 << " return FALSE" << endl;
|
|
||||||
|
|
||||||
// Blocked edge/face
|
// Blocked edge/face
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -55,27 +52,18 @@ Pout<< "update : " << *this << " w2:" << w2 << " return FALSE" << endl;
|
|||||||
if (!valid(td))
|
if (!valid(td))
|
||||||
{
|
{
|
||||||
// current not yet set so use any value
|
// current not yet set so use any value
|
||||||
label oldRegion = region_;
|
|
||||||
operator=(w2);
|
operator=(w2);
|
||||||
Pout<< "update : " << *this << " was:" << oldRegion
|
|
||||||
<< " w2:" << w2 << " return TRUE" << endl;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (w2.region_ < region_)
|
if (w2.region_ < region_)
|
||||||
{
|
{
|
||||||
label oldRegion = region_;
|
|
||||||
operator=(w2);
|
operator=(w2);
|
||||||
Pout<< "update : " << *this << " was:" << oldRegion
|
|
||||||
<< " w2:" << w2 << " return TRUE" << endl;
|
|
||||||
return true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "update : " << *this
|
|
||||||
<< " w2:" << w2 << " return FALSE" << endl;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ boundaryField
|
|||||||
burner
|
burner
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.001294; //60kW C3H8
|
massFlowRate constant 0.001294; //60kW C3H8
|
||||||
value uniform (0 0 0);
|
value uniform (0 0 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ boundaryField
|
|||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.1;
|
massFlowRate constant 0.1;
|
||||||
value uniform (0 0 0);
|
value uniform (0 0 0);
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
|
|||||||
@ -43,8 +43,8 @@ boundaryField
|
|||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.1;
|
massFlowRate constant 0.1;
|
||||||
value uniform (0 0 0);
|
rhoInlet 1; // estimate for initial rho
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,7 +17,7 @@ FoamFile
|
|||||||
|
|
||||||
application rhoPimplecFoam;
|
application rhoPimplecFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom latestTime; //startTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ boundaryField
|
|||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.1;
|
massFlowRate constant 0.1;
|
||||||
value uniform (0 0 0);
|
value uniform (0 0 0);
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
|
|||||||
@ -43,7 +43,7 @@ boundaryField
|
|||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.1;
|
massFlowRate constant 0.1;
|
||||||
value uniform (0 0 0);
|
value uniform (0 0 0);
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
|
|||||||
@ -28,8 +28,8 @@ boundaryField
|
|||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.5;
|
massFlowRate constant 0.5;
|
||||||
value uniform (0 0 0);
|
rhoInlet 0.5; // Guess for rho
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,7 +17,7 @@ FoamFile
|
|||||||
|
|
||||||
application rhoSimplecFoam;
|
application rhoSimplecFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom latestTime; //startTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ boundary
|
|||||||
(
|
(
|
||||||
maxY
|
maxY
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
faces
|
faces
|
||||||
(
|
(
|
||||||
(3 7 6 2)
|
(3 7 6 2)
|
||||||
@ -51,7 +51,7 @@ boundary
|
|||||||
|
|
||||||
minX
|
minX
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
faces
|
faces
|
||||||
(
|
(
|
||||||
(0 4 7 3)
|
(0 4 7 3)
|
||||||
@ -60,7 +60,7 @@ boundary
|
|||||||
|
|
||||||
maxX
|
maxX
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
faces
|
faces
|
||||||
(
|
(
|
||||||
(2 6 5 1)
|
(2 6 5 1)
|
||||||
@ -69,7 +69,7 @@ boundary
|
|||||||
|
|
||||||
minY
|
minY
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
faces
|
faces
|
||||||
(
|
(
|
||||||
(1 5 4 0)
|
(1 5 4 0)
|
||||||
@ -87,7 +87,7 @@ boundary
|
|||||||
|
|
||||||
maxZ
|
maxZ
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
faces
|
faces
|
||||||
(
|
(
|
||||||
(4 5 6 7)
|
(4 5 6 7)
|
||||||
|
|||||||
@ -19,25 +19,29 @@ FoamFile
|
|||||||
(
|
(
|
||||||
maxY
|
maxY
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
|
inGroups 1(symmetryPlane);
|
||||||
nFaces 400;
|
nFaces 400;
|
||||||
startFace 22800;
|
startFace 22800;
|
||||||
}
|
}
|
||||||
minX
|
minX
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
|
inGroups 1(symmetryPlane);
|
||||||
nFaces 400;
|
nFaces 400;
|
||||||
startFace 23200;
|
startFace 23200;
|
||||||
}
|
}
|
||||||
maxX
|
maxX
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
|
inGroups 1(symmetryPlane);
|
||||||
nFaces 400;
|
nFaces 400;
|
||||||
startFace 23600;
|
startFace 23600;
|
||||||
}
|
}
|
||||||
minY
|
minY
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
|
inGroups 1(symmetryPlane);
|
||||||
nFaces 400;
|
nFaces 400;
|
||||||
startFace 24000;
|
startFace 24000;
|
||||||
}
|
}
|
||||||
@ -49,7 +53,8 @@ FoamFile
|
|||||||
}
|
}
|
||||||
maxZ
|
maxZ
|
||||||
{
|
{
|
||||||
type empty;
|
type symmetryPlane;
|
||||||
|
inGroups 1(symmetryPlane);
|
||||||
nFaces 400;
|
nFaces 400;
|
||||||
startFace 24800;
|
startFace 24800;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,6 +35,18 @@ geometry
|
|||||||
radius 4;
|
radius 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// // Define floor just so we have feature edges behave correctly
|
||||||
|
// floor
|
||||||
|
// {
|
||||||
|
// type searchablePlane;
|
||||||
|
// planeType pointAndNormal;
|
||||||
|
// pointAndNormalDict
|
||||||
|
// {
|
||||||
|
// basePoint (0 0 0);
|
||||||
|
// normalVector (0 0 1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
box1
|
box1
|
||||||
{
|
{
|
||||||
type searchableBox;
|
type searchableBox;
|
||||||
@ -187,6 +199,11 @@ castellatedMeshControls
|
|||||||
// Surface-wise min and max refinement level
|
// Surface-wise min and max refinement level
|
||||||
level (1 1);
|
level (1 1);
|
||||||
}
|
}
|
||||||
|
// floor
|
||||||
|
// {
|
||||||
|
// // Surface-wise min and max refinement level
|
||||||
|
// level (1 1);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolve sharp angles on fridges
|
// Resolve sharp angles on fridges
|
||||||
@ -235,12 +252,15 @@ snapControls
|
|||||||
{
|
{
|
||||||
//- Number of patch smoothing iterations before finding correspondence
|
//- Number of patch smoothing iterations before finding correspondence
|
||||||
// to surface
|
// to surface
|
||||||
nSmoothPatch 3;
|
// nSmoothPatch 3;
|
||||||
|
//nSmoothPatch 0; //! Only since blockMesh aligned with surfaces it is
|
||||||
|
// actually beneficial to run with 0 smoothing.
|
||||||
|
nSmoothPatch 1;
|
||||||
|
|
||||||
//- Relative distance for points to be attracted by surface feature point
|
//- Relative distance for points to be attracted by surface feature point
|
||||||
// or edge. True distance is this factor times local
|
// or edge. True distance is this factor times local
|
||||||
// maximum edge length.
|
// maximum edge length.
|
||||||
tolerance 4.0;
|
tolerance 2.0;
|
||||||
|
|
||||||
//- Number of mesh displacement relaxation iterations.
|
//- Number of mesh displacement relaxation iterations.
|
||||||
nSolveIter 30;
|
nSolveIter 30;
|
||||||
@ -248,6 +268,19 @@ snapControls
|
|||||||
//- Maximum number of snapping relaxation iterations. Should stop
|
//- Maximum number of snapping relaxation iterations. Should stop
|
||||||
// before upon reaching a correct mesh.
|
// before upon reaching a correct mesh.
|
||||||
nRelaxIter 5;
|
nRelaxIter 5;
|
||||||
|
|
||||||
|
|
||||||
|
// Feature snapping
|
||||||
|
|
||||||
|
//- Number of feature edge snapping iterations.
|
||||||
|
// Leave out altogether to disable.
|
||||||
|
nFeatureSnapIter 10;
|
||||||
|
|
||||||
|
//- Detect (geometric) features by sampling the surface (default=false)
|
||||||
|
implicitFeatureSnap true;
|
||||||
|
|
||||||
|
//- Use castellatedMeshControls::features (default = true)
|
||||||
|
explicitFeatureSnap false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -281,7 +314,7 @@ addLayersControls
|
|||||||
// Relative to undistorted size of cell outside layer.
|
// Relative to undistorted size of cell outside layer.
|
||||||
// is the thickness of the layer furthest away from the wall.
|
// is the thickness of the layer furthest away from the wall.
|
||||||
// See relativeSizes parameter.
|
// See relativeSizes parameter.
|
||||||
finalLayerThickness 0.5;
|
finalLayerThickness 1;
|
||||||
|
|
||||||
//- Minimum thickness of cell layer. If for any reason layer
|
//- Minimum thickness of cell layer. If for any reason layer
|
||||||
// cannot be above minThickness do not add layer.
|
// cannot be above minThickness do not add layer.
|
||||||
@ -342,52 +375,7 @@ addLayersControls
|
|||||||
// where to undo.
|
// where to undo.
|
||||||
meshQualityControls
|
meshQualityControls
|
||||||
{
|
{
|
||||||
//- Maximum non-orthogonality allowed. Set to 180 to disable.
|
#include "meshQualityDict"
|
||||||
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 quality of the tet formed by the face-centre
|
|
||||||
// and variable base point minimum decomposition triangles and
|
|
||||||
// the cell centre. Set to very negative number (e.g. -1E30) to
|
|
||||||
// disable.
|
|
||||||
// <0 = inside out tet,
|
|
||||||
// 0 = flat tet
|
|
||||||
// 1 = regular tet
|
|
||||||
minTetQuality 1e-30;
|
|
||||||
|
|
||||||
//- 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;
|
|
||||||
|
|
||||||
|
|
||||||
// Advanced
|
// Advanced
|
||||||
|
|
||||||
@ -405,7 +393,7 @@ meshQualityControls
|
|||||||
// 1 : write intermediate meshes
|
// 1 : write intermediate meshes
|
||||||
// 2 : write volScalarField with cellLevel for postprocessing
|
// 2 : write volScalarField with cellLevel for postprocessing
|
||||||
// 4 : write current intersections as .obj files
|
// 4 : write current intersections as .obj files
|
||||||
debug 0;
|
debug 7;
|
||||||
|
|
||||||
|
|
||||||
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
|
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
|
||||||
|
|||||||
@ -32,12 +32,14 @@ FoamFile
|
|||||||
front
|
front
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
|
inGroups 1(empty);
|
||||||
nFaces 3072;
|
nFaces 3072;
|
||||||
startFace 6336;
|
startFace 6336;
|
||||||
}
|
}
|
||||||
back
|
back
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
|
inGroups 1(empty);
|
||||||
nFaces 3072;
|
nFaces 3072;
|
||||||
startFace 9408;
|
startFace 9408;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,6 +46,7 @@ boundary
|
|||||||
(
|
(
|
||||||
(3 7 6 2)
|
(3 7 6 2)
|
||||||
);
|
);
|
||||||
|
inGroups (groupWall);
|
||||||
}
|
}
|
||||||
fixedWalls
|
fixedWalls
|
||||||
{
|
{
|
||||||
@ -56,6 +57,7 @@ boundary
|
|||||||
(2 6 5 1)
|
(2 6 5 1)
|
||||||
(1 5 4 0)
|
(1 5 4 0)
|
||||||
);
|
);
|
||||||
|
inGroups (groupWall);
|
||||||
}
|
}
|
||||||
frontAndBack
|
frontAndBack
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,7 +39,7 @@ divSchemes
|
|||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
{
|
{
|
||||||
default Gauss linear corrected;
|
default Gauss linear limited 0.33;
|
||||||
}
|
}
|
||||||
|
|
||||||
interpolationSchemes
|
interpolationSchemes
|
||||||
@ -49,7 +49,7 @@ interpolationSchemes
|
|||||||
|
|
||||||
snGradSchemes
|
snGradSchemes
|
||||||
{
|
{
|
||||||
default corrected;
|
default limited 0.33;
|
||||||
}
|
}
|
||||||
|
|
||||||
fluxRequired
|
fluxRequired
|
||||||
|
|||||||
@ -17,7 +17,7 @@ FoamFile
|
|||||||
|
|
||||||
numberOfSubdomains 8;
|
numberOfSubdomains 8;
|
||||||
|
|
||||||
method hierarchical;
|
method hierarchical; //ptscotch;
|
||||||
|
|
||||||
simpleCoeffs
|
simpleCoeffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,8 +43,7 @@ boundaryField
|
|||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.1;
|
volumetricFlowRate constant 0.1;
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,7 +17,7 @@ FoamFile
|
|||||||
|
|
||||||
application porousSimpleFoam;
|
application porousSimpleFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom latestTime; //startTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,6 @@ functions
|
|||||||
type forces;
|
type forces;
|
||||||
functionObjectLibs ("libforces.so");
|
functionObjectLibs ("libforces.so");
|
||||||
outputControl outputTime;
|
outputControl outputTime;
|
||||||
outputInterval 1;
|
|
||||||
patches (floatingObject);
|
patches (floatingObject);
|
||||||
pName p;
|
pName p;
|
||||||
UName U;
|
UName U;
|
||||||
@ -74,7 +73,7 @@ functions
|
|||||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
enabled true;
|
enabled true;
|
||||||
outputControl timeStep;
|
outputControl timeStep;
|
||||||
timeInteval 1;
|
outputInterval 1;
|
||||||
log true;
|
log true;
|
||||||
valueOutput false;
|
valueOutput false;
|
||||||
source faceZone;
|
source faceZone;
|
||||||
|
|||||||
@ -14,6 +14,8 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
libs ("libincompressibleRASModels.so");
|
||||||
|
|
||||||
application simpleFoam;
|
application simpleFoam;
|
||||||
|
|
||||||
startFrom latestTime;
|
startFrom latestTime;
|
||||||
|
|||||||
@ -32,13 +32,13 @@ boundaryField
|
|||||||
inletCentral
|
inletCentral
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.00379;
|
massFlowRate constant 0.00379;
|
||||||
value uniform (0 14.68 0);
|
value uniform (0 14.68 0);
|
||||||
}
|
}
|
||||||
inletSides
|
inletSides
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.00832;
|
massFlowRate constant 0.00832;
|
||||||
value uniform (0 17.79 0);
|
value uniform (0 17.79 0);
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
|
|||||||
@ -32,13 +32,13 @@ boundaryField
|
|||||||
inletCentral
|
inletCentral
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.00379;
|
massFlowRate constant 0.00379;
|
||||||
value uniform (0 14.68 0);
|
value uniform (0 14.68 0);
|
||||||
}
|
}
|
||||||
inletSides
|
inletSides
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.00832;
|
massFlowRate constant 0.00832;
|
||||||
value uniform (0 17.79 0);
|
value uniform (0 17.79 0);
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
|
|||||||
@ -32,13 +32,13 @@ boundaryField
|
|||||||
inletCentral
|
inletCentral
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.00379;
|
massFlowRate constant 0.00379;
|
||||||
value uniform (0 14.68 0);
|
value uniform (0 14.68 0);
|
||||||
}
|
}
|
||||||
inletSides
|
inletSides
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.00832;
|
massFlowRate constant 0.00832;
|
||||||
value uniform (0 17.79 0);
|
value uniform (0 17.79 0);
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
|
|||||||
@ -32,13 +32,13 @@ boundaryField
|
|||||||
inletCentral
|
inletCentral
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.00379;
|
massFlowRate constant 0.00379;
|
||||||
value uniform (0 14.68 0);
|
value uniform (0 14.68 0);
|
||||||
}
|
}
|
||||||
inletSides
|
inletSides
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 0.00832;
|
massFlowRate constant 0.00832;
|
||||||
value uniform (0 17.79 0);
|
value uniform (0 17.79 0);
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
|
|||||||
@ -83,4 +83,4 @@ solid ascii
|
|||||||
vertex 1.3 -0.9 1
|
vertex 1.3 -0.9 1
|
||||||
endloop
|
endloop
|
||||||
endfacet
|
endfacet
|
||||||
endsolid
|
end solid
|
||||||
|
|||||||
@ -25,6 +25,7 @@ solver displacementSBRStress; //displacementLaplacian;
|
|||||||
|
|
||||||
displacementSBRStressCoeffs
|
displacementSBRStressCoeffs
|
||||||
{
|
{
|
||||||
|
solveOnPoints0 true;
|
||||||
// diffusivity uniform;
|
// diffusivity uniform;
|
||||||
// diffusivity directional (1 200 0);
|
// diffusivity directional (1 200 0);
|
||||||
// diffusivity motionDirectional (1 1000 0);
|
// diffusivity motionDirectional (1 1000 0);
|
||||||
|
|||||||
@ -31,7 +31,8 @@ vertices
|
|||||||
|
|
||||||
blocks
|
blocks
|
||||||
(
|
(
|
||||||
hex (0 1 2 3 4 5 6 7) (20 60 60) simpleGrading (10.0 1 1)
|
// hex (0 1 2 3 4 5 6 7) (20 60 60) simpleGrading (10.0 1 1)
|
||||||
|
hex (0 1 2 3 4 5 6 7) (6 6 6) simpleGrading (10.0 1 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
edges
|
edges
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
FoamFile
|
FoamFile
|
||||||
{
|
{
|
||||||
version 2.0;
|
version 2.0;
|
||||||
format binary;
|
format ascii;
|
||||||
class polyBoundaryMesh;
|
class polyBoundaryMesh;
|
||||||
location "constant/polyMesh";
|
location "constant/polyMesh";
|
||||||
object boundary;
|
object boundary;
|
||||||
@ -20,38 +20,38 @@ FoamFile
|
|||||||
maxX
|
maxX
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 1200;
|
nFaces 36;
|
||||||
startFace 210000;
|
startFace 540;
|
||||||
}
|
}
|
||||||
minZ
|
minZ
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 3600;
|
nFaces 36;
|
||||||
startFace 211200;
|
startFace 576;
|
||||||
}
|
}
|
||||||
maxZ
|
maxZ
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 3600;
|
nFaces 36;
|
||||||
startFace 214800;
|
startFace 612;
|
||||||
}
|
}
|
||||||
minX
|
minX
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 1200;
|
nFaces 36;
|
||||||
startFace 218400;
|
startFace 648;
|
||||||
}
|
}
|
||||||
minY
|
minY
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 1200;
|
nFaces 36;
|
||||||
startFace 219600;
|
startFace 684;
|
||||||
}
|
}
|
||||||
maxY
|
maxY
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 1200;
|
nFaces 36;
|
||||||
startFace 220800;
|
startFace 720;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -17,23 +17,23 @@ FoamFile
|
|||||||
|
|
||||||
application moveDynamicMesh;
|
application moveDynamicMesh;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom latestTime; //startTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|
||||||
stopAt endTime;
|
stopAt endTime;
|
||||||
|
|
||||||
endTime 25;
|
endTime 30;
|
||||||
|
|
||||||
deltaT 1;
|
deltaT 1;
|
||||||
|
|
||||||
writeControl timeStep;
|
writeControl timeStep;
|
||||||
|
|
||||||
writeInterval 5;
|
writeInterval 1;
|
||||||
|
|
||||||
purgeWrite 0;
|
purgeWrite 0;
|
||||||
|
|
||||||
writeFormat binary;
|
writeFormat ascii;//binary;
|
||||||
|
|
||||||
writePrecision 6;
|
writePrecision 6;
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ FoamFile
|
|||||||
|
|
||||||
application icoFoam;
|
application icoFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom latestTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ FoamFile
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Which of the steps to run
|
// Which of the steps to run
|
||||||
castellatedMesh true;
|
castellatedMesh false;
|
||||||
snap true;
|
snap true;
|
||||||
addLayers false;
|
addLayers false;
|
||||||
|
|
||||||
@ -85,10 +85,10 @@ castellatedMeshControls
|
|||||||
// This is a featureEdgeMesh, read from constant/triSurface for now.
|
// This is a featureEdgeMesh, read from constant/triSurface for now.
|
||||||
features
|
features
|
||||||
(
|
(
|
||||||
{
|
// {
|
||||||
file "flange.eMesh";
|
// file "flange.eMesh";
|
||||||
level 0;
|
// level 0;
|
||||||
}
|
// }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -175,9 +175,17 @@ snapControls
|
|||||||
// before upon reaching a correct mesh.
|
// before upon reaching a correct mesh.
|
||||||
nRelaxIter 5;
|
nRelaxIter 5;
|
||||||
|
|
||||||
//- Highly experimental and wip: number of feature edge snapping
|
// Feature snapping
|
||||||
// iterations. Leave out altogether to disable.
|
|
||||||
nFeatureSnapIter 10;
|
//- Number of feature edge snapping iterations.
|
||||||
|
// Leave out altogether to disable.
|
||||||
|
nFeatureSnapIter 10;
|
||||||
|
|
||||||
|
//- Detect (geometric) features by sampling the surface
|
||||||
|
implicitFeatureSnap true;
|
||||||
|
|
||||||
|
//- Use castellatedMeshControls::features
|
||||||
|
explicitFeatureSnap false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,6 @@ functions
|
|||||||
type probes;
|
type probes;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
outputControl outputTime;
|
outputControl outputTime;
|
||||||
outputInterval 1;
|
|
||||||
probeLocations
|
probeLocations
|
||||||
(
|
(
|
||||||
( 0 9.95 19.77 )
|
( 0 9.95 19.77 )
|
||||||
@ -76,9 +75,7 @@ functions
|
|||||||
type surfaces;
|
type surfaces;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
outputControl outputTime;
|
outputControl outputTime;
|
||||||
outputInterval 10;
|
|
||||||
surfaceFormat raw;
|
surfaceFormat raw;
|
||||||
interpolationScheme isThisNeeded;
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
p
|
p
|
||||||
|
|||||||
@ -58,7 +58,6 @@ functions
|
|||||||
type probes;
|
type probes;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
outputControl outputTime;
|
outputControl outputTime;
|
||||||
outputInterval 1;
|
|
||||||
probeLocations
|
probeLocations
|
||||||
(
|
(
|
||||||
( 0 9.95 19.77 )
|
( 0 9.95 19.77 )
|
||||||
@ -75,9 +74,7 @@ functions
|
|||||||
type surfaces;
|
type surfaces;
|
||||||
functionObjectLibs ("libsampling.so");
|
functionObjectLibs ("libsampling.so");
|
||||||
outputControl outputTime;
|
outputControl outputTime;
|
||||||
outputInterval 10;
|
|
||||||
surfaceFormat raw;
|
surfaceFormat raw;
|
||||||
interpolationScheme isThisNeeded;
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
p
|
p
|
||||||
|
|||||||
@ -23,8 +23,7 @@ boundaryField
|
|||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
flowRate constant 50;
|
volumetricFlowRate constant 50;
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
walls
|
walls
|
||||||
|
|||||||
@ -6,7 +6,7 @@ cc = gcc -m64
|
|||||||
|
|
||||||
include $(RULES)/c$(WM_COMPILE_OPTION)
|
include $(RULES)/c$(WM_COMPILE_OPTION)
|
||||||
|
|
||||||
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
|
cFLAGS = -g $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
|
||||||
|
|
||||||
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
|
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ include $(RULES)/c++$(WM_COMPILE_OPTION)
|
|||||||
|
|
||||||
ptFLAGS = -DNoRepository -ftemplate-depth-100
|
ptFLAGS = -DNoRepository -ftemplate-depth-100
|
||||||
|
|
||||||
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
|
c++FLAGS = -g $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
|
||||||
|
|
||||||
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
|
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
|
||||||
cxxtoo = $(Ctoo)
|
cxxtoo = $(Ctoo)
|
||||||
|
|||||||
Reference in New Issue
Block a user