mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -30,7 +30,6 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mapDistribute.H"
|
||||
#include "fvCFD.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicReactingCloud.H"
|
||||
|
||||
@ -337,7 +337,7 @@ addLayersControls
|
||||
// Advanced settings
|
||||
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// are perpendicular
|
||||
featureAngle 60;
|
||||
|
||||
// At non-patched sides allow mesh to slip if extrusion direction makes
|
||||
|
||||
@ -112,7 +112,7 @@ DebugSwitches
|
||||
ConeInjection 0;
|
||||
Constant 0;
|
||||
ConstantRateDevolatilisation 0;
|
||||
CrankNicholson 0;
|
||||
CrankNicolson 0;
|
||||
CrossPowerLaw 0;
|
||||
Cs 0;
|
||||
DIC 0;
|
||||
|
||||
@ -28,227 +28,27 @@ License
|
||||
#include "globalMeshData.H"
|
||||
#include "cyclicPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
readField
|
||||
(
|
||||
const BoundaryMesh& bmesh,
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const word& patchFieldType
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField(const BoundaryMesh&, "
|
||||
"const Field<Type>&, const word&)"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set
|
||||
(
|
||||
patchi,
|
||||
PatchField<Type>::New
|
||||
(
|
||||
patchFieldType,
|
||||
bmesh_[patchi],
|
||||
field
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const BoundaryMesh& bmesh,
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const wordList& patchFieldTypes,
|
||||
const wordList& constraintTypes
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField(const BoundaryMesh&, "
|
||||
"const Field<Type>&, const wordList&, const wordList&)"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
patchFieldTypes.size() != this->size()
|
||||
|| (constraintTypes.size() && (constraintTypes.size() != this->size()))
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField(const BoundaryMesh&, "
|
||||
"const Field<Type>&, const wordList&, const wordList&)"
|
||||
) << "Incorrect number of patch type specifications given" << nl
|
||||
<< " Number of patches in mesh = " << bmesh.size()
|
||||
<< " number of patch type specifications = "
|
||||
<< patchFieldTypes.size()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if (constraintTypes.size())
|
||||
{
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set
|
||||
(
|
||||
patchi,
|
||||
PatchField<Type>::New
|
||||
(
|
||||
patchFieldTypes[patchi],
|
||||
constraintTypes[patchi],
|
||||
bmesh_[patchi],
|
||||
field
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set
|
||||
(
|
||||
patchi,
|
||||
PatchField<Type>::New
|
||||
(
|
||||
patchFieldTypes[patchi],
|
||||
bmesh_[patchi],
|
||||
field
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const BoundaryMesh& bmesh,
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const PtrList<PatchField<Type> >& ptfl
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField(const BoundaryMesh&, "
|
||||
"const Field<Type>&, const PatchField<Type>List&)"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set(patchi, ptfl[patchi].clone(field));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const typename GeometricField<Type, PatchField, GeoMesh>::
|
||||
GeometricBoundaryField& btf
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(btf.size()),
|
||||
bmesh_(btf.bmesh_)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField(const GeometricBoundaryField<Type, "
|
||||
"PatchField, BoundaryMesh>&)"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set(patchi, btf[patchi].clone(field));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy
|
||||
// Dangerous because Field may be set to a field which gets deleted.
|
||||
// Need new type of GeometricBoundaryField, one which IS part of a geometric
|
||||
// field for which snGrad etc. may be called and a free standing
|
||||
// GeometricBoundaryField for which such operations are unavailable.
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const typename GeometricField<Type, PatchField, GeoMesh>::
|
||||
GeometricBoundaryField& btf
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(btf),
|
||||
bmesh_(btf.bmesh_)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField(const GeometricBoundaryField<Type, "
|
||||
"PatchField, BoundaryMesh>&)"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const BoundaryMesh& bmesh,
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{
|
||||
this->setSize(bmesh_.size());
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField"
|
||||
"(const BoundaryMesh&, const Field<Type>&, const dictionary&)"
|
||||
"GeometricBoundaryField::readField"
|
||||
"("
|
||||
"const DimensionedField<Type, GeoMesh>&, "
|
||||
"const dictionary&"
|
||||
")"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
// Patch or patch-groups. (using non-wild card entries of dictionaries)
|
||||
forAllConstIter(dictionary, dict, iter)
|
||||
{
|
||||
@ -263,6 +63,7 @@ GeometricBoundaryField
|
||||
forAll(patchIDs, i)
|
||||
{
|
||||
label patchi = patchIDs[i];
|
||||
|
||||
this->set
|
||||
(
|
||||
patchi,
|
||||
@ -326,12 +127,11 @@ GeometricBoundaryField
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"GeometricField<Type, PatchField, GeoMesh>::\n"
|
||||
"GeometricBoundaryField::GeometricBoundaryField\n"
|
||||
"(\n"
|
||||
" const BoundaryMesh&,\n"
|
||||
" const DimensionedField<Type, GeoMesh>&,\n"
|
||||
" const dictionary&\n"
|
||||
"GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::readField"
|
||||
"("
|
||||
"const DimensionedField<Type, GeoMesh>&, "
|
||||
"const dictionary&"
|
||||
")",
|
||||
dict
|
||||
) << "Cannot find patchField entry for cyclic "
|
||||
@ -344,12 +144,11 @@ GeometricBoundaryField
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"GeometricField<Type, PatchField, GeoMesh>::\n"
|
||||
"GeometricBoundaryField::GeometricBoundaryField\n"
|
||||
"(\n"
|
||||
" const BoundaryMesh&,\n"
|
||||
" const DimensionedField<Type, GeoMesh>&,\n"
|
||||
" const dictionary&\n"
|
||||
"GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::readField"
|
||||
"("
|
||||
"const DimensionedField<Type, GeoMesh>&, "
|
||||
"const dictionary&"
|
||||
")",
|
||||
dict
|
||||
) << "Cannot find patchField entry for "
|
||||
@ -360,6 +159,254 @@ GeometricBoundaryField
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const BoundaryMesh& bmesh
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const BoundaryMesh& bmesh,
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const word& patchFieldType
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField(const BoundaryMesh&, "
|
||||
"const DimensionedField<Type>&, const word&)"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set
|
||||
(
|
||||
patchi,
|
||||
PatchField<Type>::New
|
||||
(
|
||||
patchFieldType,
|
||||
bmesh_[patchi],
|
||||
field
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const BoundaryMesh& bmesh,
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const wordList& patchFieldTypes,
|
||||
const wordList& constraintTypes
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField"
|
||||
"("
|
||||
"const BoundaryMesh&, "
|
||||
"const DimensionedField<Type>&, "
|
||||
"const wordList&, "
|
||||
"const wordList&"
|
||||
")"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
patchFieldTypes.size() != this->size()
|
||||
|| (constraintTypes.size() && (constraintTypes.size() != this->size()))
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField"
|
||||
"("
|
||||
"const BoundaryMesh&, "
|
||||
"const DimensionedField<Type>&, "
|
||||
"const wordList&, "
|
||||
"const wordList&"
|
||||
")"
|
||||
) << "Incorrect number of patch type specifications given" << nl
|
||||
<< " Number of patches in mesh = " << bmesh.size()
|
||||
<< " number of patch type specifications = "
|
||||
<< patchFieldTypes.size()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if (constraintTypes.size())
|
||||
{
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set
|
||||
(
|
||||
patchi,
|
||||
PatchField<Type>::New
|
||||
(
|
||||
patchFieldTypes[patchi],
|
||||
constraintTypes[patchi],
|
||||
bmesh_[patchi],
|
||||
field
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set
|
||||
(
|
||||
patchi,
|
||||
PatchField<Type>::New
|
||||
(
|
||||
patchFieldTypes[patchi],
|
||||
bmesh_[patchi],
|
||||
field
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const BoundaryMesh& bmesh,
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const PtrList<PatchField<Type> >& ptfl
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField"
|
||||
"("
|
||||
"const BoundaryMesh&, "
|
||||
"const DimensionedField<Type, GeoMesh>&, "
|
||||
"const PtrLIst<PatchField<Type> >&"
|
||||
")"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set(patchi, ptfl[patchi].clone(field));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const typename GeometricField<Type, PatchField, GeoMesh>::
|
||||
GeometricBoundaryField& btf
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(btf.size()),
|
||||
bmesh_(btf.bmesh_)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField"
|
||||
"("
|
||||
"const DimensionedField<Type, GeoMesh>&, "
|
||||
"const typename GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField&"
|
||||
")"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
forAll(bmesh_, patchi)
|
||||
{
|
||||
this->set(patchi, btf[patchi].clone(field));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy
|
||||
// Dangerous because Field may be set to a field which gets deleted.
|
||||
// Need new type of GeometricBoundaryField, one which IS part of a geometric
|
||||
// field for which snGrad etc. may be called and a free standing
|
||||
// GeometricBoundaryField for which such operations are unavailable.
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const typename GeometricField<Type, PatchField, GeoMesh>::
|
||||
GeometricBoundaryField& btf
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(btf),
|
||||
bmesh_(btf.bmesh_)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField::"
|
||||
"GeometricBoundaryField"
|
||||
"("
|
||||
"const GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"GeometricBoundaryField&"
|
||||
")"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||
GeometricBoundaryField
|
||||
(
|
||||
const BoundaryMesh& bmesh,
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
FieldField<PatchField, Type>(bmesh.size()),
|
||||
bmesh_(bmesh)
|
||||
{
|
||||
readField(field, dict);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,70 +47,49 @@ if ((gf1).mesh() != (gf2).mesh()) \
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp
|
||||
<
|
||||
typename Foam::GeometricField<Type, PatchField, GeoMesh>::
|
||||
GeometricBoundaryField
|
||||
>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::readField
|
||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::readFields
|
||||
(
|
||||
const dictionary& fieldDict
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
DimensionedField<Type, GeoMesh>::readField(fieldDict, "internalField");
|
||||
DimensionedField<Type, GeoMesh>::readField(dict, "internalField");
|
||||
|
||||
tmp<GeometricBoundaryField> tboundaryField
|
||||
(
|
||||
new GeometricBoundaryField
|
||||
(
|
||||
this->mesh().boundary(),
|
||||
*this,
|
||||
fieldDict.subDict("boundaryField")
|
||||
)
|
||||
);
|
||||
boundaryField_.readField(*this, dict.subDict("boundaryField"));
|
||||
|
||||
if (fieldDict.found("referenceLevel"))
|
||||
if (dict.found("referenceLevel"))
|
||||
{
|
||||
Type fieldAverage(pTraits<Type>(fieldDict.lookup("referenceLevel")));
|
||||
Type fieldAverage(pTraits<Type>(dict.lookup("referenceLevel")));
|
||||
|
||||
Field<Type>::operator+=(fieldAverage);
|
||||
|
||||
GeometricBoundaryField& boundaryField = tboundaryField();
|
||||
|
||||
forAll(boundaryField, patchi)
|
||||
forAll(boundaryField_, patchi)
|
||||
{
|
||||
boundaryField[patchi] == boundaryField[patchi] + fieldAverage;
|
||||
boundaryField_[patchi] == boundaryField_[patchi] + fieldAverage;
|
||||
}
|
||||
}
|
||||
|
||||
return tboundaryField;
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp
|
||||
<
|
||||
typename Foam::GeometricField<Type, PatchField, GeoMesh>::
|
||||
GeometricBoundaryField
|
||||
>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::readField(Istream& is)
|
||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::readFields()
|
||||
{
|
||||
return readField
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
this->name(),
|
||||
this->time().timeName(),
|
||||
this->db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
is
|
||||
)
|
||||
this->name(),
|
||||
this->time().timeName(),
|
||||
this->db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->readStream(typeName)
|
||||
);
|
||||
|
||||
this->close();
|
||||
|
||||
readFields(dict);
|
||||
}
|
||||
|
||||
|
||||
@ -132,8 +111,7 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
|
||||
}
|
||||
else if (this->readOpt() == IOobject::READ_IF_PRESENT && this->headerOk())
|
||||
{
|
||||
boundaryField_.transfer(readField(this->readStream(typeName))());
|
||||
this->close();
|
||||
readFields();
|
||||
|
||||
// Check compatibility between field and mesh
|
||||
if (this->size() != GeoMesh::size(this->mesh()))
|
||||
@ -360,9 +338,9 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
||||
timeIndex_(this->time().timeIndex()),
|
||||
field0Ptr_(NULL),
|
||||
fieldPrevIterPtr_(NULL),
|
||||
boundaryField_(*this, readField(this->readStream(typeName)))
|
||||
boundaryField_(mesh.boundary())
|
||||
{
|
||||
this->close();
|
||||
readFields();
|
||||
|
||||
// Check compatibility between field and mesh
|
||||
|
||||
@ -401,8 +379,10 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
||||
timeIndex_(this->time().timeIndex()),
|
||||
field0Ptr_(NULL),
|
||||
fieldPrevIterPtr_(NULL),
|
||||
boundaryField_(*this, readField(dict))
|
||||
boundaryField_(mesh.boundary())
|
||||
{
|
||||
readFields(dict);
|
||||
|
||||
// Check compatibility between field and mesh
|
||||
|
||||
if (this->size() != GeoMesh::size(this->mesh()))
|
||||
|
||||
@ -117,6 +117,9 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a BoundaryMesh
|
||||
GeometricBoundaryField(const BoundaryMesh&);
|
||||
|
||||
//- Construct from a BoundaryMesh,
|
||||
// reference to the internal field
|
||||
// and a patch type
|
||||
@ -177,6 +180,13 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Read the boundary field
|
||||
void readField
|
||||
(
|
||||
const DimensionedField<Type, GeoMesh>& field,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Update the boundary condition coefficients
|
||||
void updateCoeffs();
|
||||
|
||||
@ -247,10 +257,10 @@ private:
|
||||
// Private Member Functions
|
||||
|
||||
//- Read the field from the dictionary
|
||||
tmp<GeometricBoundaryField> readField(const dictionary&);
|
||||
void readFields(const dictionary&);
|
||||
|
||||
//- Read the field from the given stream
|
||||
tmp<GeometricBoundaryField> readField(Istream& is);
|
||||
//- Read the field - create the field dictionary on-the-fly
|
||||
void readFields();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -45,7 +45,7 @@ namespace Foam
|
||||
template<>
|
||||
const char* NamedEnum<fixedTemperatureSource::temperatureMode, 2>::names[] =
|
||||
{
|
||||
"constant",
|
||||
"uniform",
|
||||
"lookup"
|
||||
};
|
||||
}
|
||||
@ -66,14 +66,17 @@ Foam::fixedTemperatureSource::fixedTemperatureSource
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
mode_(temperatureModeNames_.read(coeffs_.lookup("mode"))),
|
||||
Tconstant_(0.0),
|
||||
Tuniform_(NULL),
|
||||
TName_("T")
|
||||
{
|
||||
switch (mode_)
|
||||
{
|
||||
case tmConstant:
|
||||
case tmUniform:
|
||||
{
|
||||
coeffs_.lookup("temperature") >> Tconstant_;
|
||||
Tuniform_.reset
|
||||
(
|
||||
DataEntry<scalar>::New("temperature", coeffs_).ptr()
|
||||
);
|
||||
break;
|
||||
}
|
||||
case tmLookup:
|
||||
@ -114,10 +117,11 @@ void Foam::fixedTemperatureSource::setValue
|
||||
{
|
||||
switch (mode_)
|
||||
{
|
||||
case tmConstant:
|
||||
case tmUniform:
|
||||
{
|
||||
scalarField Tconst(cells_.size(), Tconstant_);
|
||||
eqn.setValues(cells_, thermo.he(thermo.p(), Tconst, cells_));
|
||||
const scalar t = mesh_.time().value();
|
||||
scalarField Tuni(cells_.size(), Tuniform_->value(t));
|
||||
eqn.setValues(cells_, thermo.he(thermo.p(), Tuni, cells_));
|
||||
|
||||
break;
|
||||
}
|
||||
@ -126,8 +130,8 @@ void Foam::fixedTemperatureSource::setValue
|
||||
const volScalarField& T =
|
||||
mesh().lookupObject<volScalarField>(TName_);
|
||||
|
||||
scalarField Tlookup(T, cells_);
|
||||
eqn.setValues(cells_, thermo.he(thermo.p(), Tlookup, cells_));
|
||||
scalarField Tlkp(T, cells_);
|
||||
eqn.setValues(cells_, thermo.he(thermo.p(), Tlkp, cells_));
|
||||
|
||||
break;
|
||||
}
|
||||
@ -152,7 +156,14 @@ bool Foam::fixedTemperatureSource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("temperature", Tconstant_);
|
||||
if (coeffs_.found(Tuniform_->name()))
|
||||
{
|
||||
Tuniform_.reset
|
||||
(
|
||||
DataEntry<scalar>::New(Tuniform_->name(), dict).ptr()
|
||||
);
|
||||
}
|
||||
|
||||
coeffs_.readIfPresent("TName", TName_);
|
||||
|
||||
return true;
|
||||
|
||||
@ -33,15 +33,18 @@ Description
|
||||
fixedTemperatureSourceCoeffs
|
||||
{
|
||||
fieldNames (h e hs); // names of fields to apply source
|
||||
mode constant; // constant or lookup
|
||||
mode uniform; // constant or lookup
|
||||
|
||||
// constant option
|
||||
temperature 500; // fixed temperature [K]
|
||||
// uniform option
|
||||
temperature constant 500; // fixed temperature [K]
|
||||
|
||||
// loolup option
|
||||
// TName T; // optional temperature field name
|
||||
}
|
||||
|
||||
Note:
|
||||
The 'uniform' option allows the use of a time-varying uniform temperature
|
||||
by means of the DataEntry type.
|
||||
|
||||
SourceFiles
|
||||
basicSource.C
|
||||
@ -53,6 +56,7 @@ SourceFiles
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "NamedEnum.H"
|
||||
#include "DataEntry.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -73,7 +77,7 @@ public:
|
||||
//- Temperature mode
|
||||
enum temperatureMode
|
||||
{
|
||||
tmConstant,
|
||||
tmUniform,
|
||||
tmLookup
|
||||
};
|
||||
|
||||
@ -89,8 +93,8 @@ protected:
|
||||
//- Operation mode
|
||||
temperatureMode mode_;
|
||||
|
||||
//- Constant temperature [K]
|
||||
scalar Tconstant_;
|
||||
//- Uniform temperature [K]
|
||||
autoPtr<DataEntry<scalar> > Tuniform_;
|
||||
|
||||
//- Temperature field name
|
||||
word TName_;
|
||||
|
||||
@ -310,7 +310,7 @@ $(ddtSchemes)/localEulerDdtScheme/localEulerDdtSchemes.C
|
||||
$(ddtSchemes)/backwardDdtScheme/backwardDdtSchemes.C
|
||||
$(ddtSchemes)/boundedBackwardDdtScheme/boundedBackwardDdtScheme.C
|
||||
$(ddtSchemes)/boundedBackwardDdtScheme/boundedBackwardDdtSchemes.C
|
||||
$(ddtSchemes)/CrankNicholsonDdtScheme/CrankNicholsonDdtSchemes.C
|
||||
$(ddtSchemes)/CrankNicolsonDdtScheme/CrankNicolsonDdtSchemes.C
|
||||
$(ddtSchemes)/boundedDdtScheme/boundedDdtSchemes.C
|
||||
|
||||
d2dt2Schemes = finiteVolume/d2dt2Schemes
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "EulerDdtScheme.H"
|
||||
#include "CrankNicholsonDdtScheme.H"
|
||||
#include "CrankNicolsonDdtScheme.H"
|
||||
#include "backwardDdtScheme.H"
|
||||
|
||||
|
||||
@ -229,7 +229,7 @@ void Foam::advectiveFvPatchField<Type>::updateCoeffs()
|
||||
if
|
||||
(
|
||||
ddtScheme == fv::EulerDdtScheme<scalar>::typeName
|
||||
|| ddtScheme == fv::CrankNicholsonDdtScheme<scalar>::typeName
|
||||
|| ddtScheme == fv::CrankNicolsonDdtScheme<scalar>::typeName
|
||||
)
|
||||
{
|
||||
this->refValue() =
|
||||
@ -266,7 +266,7 @@ void Foam::advectiveFvPatchField<Type>::updateCoeffs()
|
||||
if
|
||||
(
|
||||
ddtScheme == fv::EulerDdtScheme<scalar>::typeName
|
||||
|| ddtScheme == fv::CrankNicholsonDdtScheme<scalar>::typeName
|
||||
|| ddtScheme == fv::CrankNicolsonDdtScheme<scalar>::typeName
|
||||
)
|
||||
{
|
||||
this->refValue() = field.oldTime().boundaryField()[patchi];
|
||||
|
||||
@ -31,7 +31,7 @@ Description
|
||||
This boundary condition provides an advective outflow condition, based on
|
||||
solving DDt(psi, U) = 0 at the boundary.
|
||||
|
||||
The standard (Euler, backward, CrankNicholson) time schemes are
|
||||
The standard (Euler, backward, CrankNicolson) time schemes are
|
||||
supported. Additionally an optional mechanism to relax the value at
|
||||
the boundary to a specified far-field value is provided which is
|
||||
switched on by specifying the relaxation length-scale \c lInf and the
|
||||
|
||||
@ -62,8 +62,13 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
|
||||
)
|
||||
:
|
||||
jumpCyclicFvPatchField<Type>(p, iF),
|
||||
jump_("jump", dict, p.size())
|
||||
jump_(p.size(), pTraits<Type>::zero)
|
||||
{
|
||||
if (this->cyclicPatch().owner())
|
||||
{
|
||||
jump_ = Field<Type>("jump", dict, p.size());
|
||||
}
|
||||
|
||||
if (dict.found("value"))
|
||||
{
|
||||
fvPatchField<Type>::operator=
|
||||
@ -152,7 +157,12 @@ void Foam::fixedJumpFvPatchField<Type>::write(Ostream& os) const
|
||||
fvPatchField<Type>::write(os);
|
||||
os.writeKeyword("patchType") << this->interfaceFieldType()
|
||||
<< token::END_STATEMENT << nl;
|
||||
jump_.writeEntry("jump", os);
|
||||
|
||||
if (this->cyclicPatch().owner())
|
||||
{
|
||||
jump_.writeEntry("jump", os);
|
||||
}
|
||||
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
@ -62,8 +62,13 @@ Foam::fixedJumpAMIFvPatchField<Type>::fixedJumpAMIFvPatchField
|
||||
)
|
||||
:
|
||||
jumpCyclicAMIFvPatchField<Type>(p, iF),
|
||||
jump_("jump", dict, p.size())
|
||||
jump_(p.size(), pTraits<Type>::zero)
|
||||
{
|
||||
if (this->cyclicAMIPatch().owner())
|
||||
{
|
||||
jump_ = Field<Type>("jump", dict, p.size());
|
||||
}
|
||||
|
||||
if (dict.found("value"))
|
||||
{
|
||||
fvPatchField<Type>::operator=
|
||||
@ -155,7 +160,12 @@ void Foam::fixedJumpAMIFvPatchField<Type>::write(Ostream& os) const
|
||||
fvPatchField<Type>::write(os);
|
||||
os.writeKeyword("patchType") << this->interfaceFieldType()
|
||||
<< token::END_STATEMENT << nl;
|
||||
jump_.writeEntry("jump", os);
|
||||
|
||||
if (this->cyclicAMIPatch().owner())
|
||||
{
|
||||
jump_.writeEntry("jump", os);
|
||||
}
|
||||
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,7 +41,8 @@ pressureInletOutletParSlipVelocityFvPatchVectorField
|
||||
:
|
||||
mixedFvPatchVectorField(p, iF),
|
||||
phiName_("phi"),
|
||||
rhoName_("rho")
|
||||
rhoName_("rho"),
|
||||
UName_("U")
|
||||
{
|
||||
refValue() = *this;
|
||||
refGrad() = vector::zero;
|
||||
@ -60,7 +61,8 @@ pressureInletOutletParSlipVelocityFvPatchVectorField
|
||||
:
|
||||
mixedFvPatchVectorField(ptf, p, iF, mapper),
|
||||
phiName_(ptf.phiName_),
|
||||
rhoName_(ptf.rhoName_)
|
||||
rhoName_(ptf.rhoName_),
|
||||
UName_(ptf.UName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -74,7 +76,8 @@ pressureInletOutletParSlipVelocityFvPatchVectorField
|
||||
:
|
||||
mixedFvPatchVectorField(p, iF),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U"))
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
refValue() = *this;
|
||||
@ -91,7 +94,8 @@ pressureInletOutletParSlipVelocityFvPatchVectorField
|
||||
:
|
||||
mixedFvPatchVectorField(pivpvf),
|
||||
phiName_(pivpvf.phiName_),
|
||||
rhoName_(pivpvf.rhoName_)
|
||||
rhoName_(pivpvf.rhoName_),
|
||||
UName_(pivpvf.UName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -104,7 +108,8 @@ pressureInletOutletParSlipVelocityFvPatchVectorField
|
||||
:
|
||||
mixedFvPatchVectorField(pivpvf, iF),
|
||||
phiName_(pivpvf.phiName_),
|
||||
rhoName_(pivpvf.rhoName_)
|
||||
rhoName_(pivpvf.rhoName_),
|
||||
UName_(pivpvf.UName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -128,7 +133,7 @@ void Foam::pressureInletOutletParSlipVelocityFvPatchVectorField::updateCoeffs()
|
||||
tmp<vectorField> n = patch().nf();
|
||||
const Field<scalar>& magS = patch().magSf();
|
||||
|
||||
const volVectorField& U = db().lookupObject<volVectorField>("U");
|
||||
const volVectorField& U = db().lookupObject<volVectorField>(UName_);
|
||||
|
||||
vectorField Uc(U.boundaryField()[patchI].patchInternalField());
|
||||
Uc -= n()*(Uc & n());
|
||||
@ -169,8 +174,9 @@ void Foam::pressureInletOutletParSlipVelocityFvPatchVectorField::write
|
||||
) const
|
||||
{
|
||||
fvPatchVectorField::write(os);
|
||||
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ Description
|
||||
Property | Description | Required | Default value
|
||||
phi | flux field name | no | phi
|
||||
rho | density field name | no | rho
|
||||
U | velocity field name | no | U
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
@ -48,8 +49,6 @@ Description
|
||||
myPatch
|
||||
{
|
||||
type pressureInletOutletParSlipVelocity;
|
||||
phi phi;
|
||||
rho rho;
|
||||
value uniform 0;
|
||||
}
|
||||
\endverbatim
|
||||
@ -96,6 +95,9 @@ class pressureInletOutletParSlipVelocityFvPatchVectorField
|
||||
//- Density field name
|
||||
word rhoName_;
|
||||
|
||||
//- Velocity field name
|
||||
word UName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ License
|
||||
#include "surfaceFields.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "EulerDdtScheme.H"
|
||||
#include "CrankNicholsonDdtScheme.H"
|
||||
#include "CrankNicolsonDdtScheme.H"
|
||||
#include "backwardDdtScheme.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -45,7 +45,7 @@ namespace Foam
|
||||
>::names[] =
|
||||
{
|
||||
fv::EulerDdtScheme<scalar>::typeName_(),
|
||||
fv::CrankNicholsonDdtScheme<scalar>::typeName_(),
|
||||
fv::CrankNicolsonDdtScheme<scalar>::typeName_(),
|
||||
fv::backwardDdtScheme<scalar>::typeName_()
|
||||
};
|
||||
}
|
||||
@ -183,7 +183,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs()
|
||||
switch (timeScheme)
|
||||
{
|
||||
case tsEuler:
|
||||
case tsCrankNicholson:
|
||||
case tsCrankNicolson:
|
||||
{
|
||||
zetap = zeta.oldTime().boundaryField()[patchI] + dZetap;
|
||||
|
||||
@ -197,7 +197,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs()
|
||||
scalar c00 = dt*dt/(dt0*(dt + dt0));
|
||||
scalar c0 = c + c00;
|
||||
|
||||
zetap =
|
||||
zetap =
|
||||
(
|
||||
c0*zeta.oldTime().boundaryField()[patchI]
|
||||
- c00*zeta.oldTime().oldTime().boundaryField()[patchI]
|
||||
@ -239,7 +239,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::write(Ostream& os) const
|
||||
fvPatchScalarField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntryIfDifferent<word>(os, "zeta", "zeta", zetaName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", zetaName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ Description
|
||||
local volumetric flux.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
phi | flux field name | no | phi
|
||||
@ -103,7 +103,7 @@ public:
|
||||
enum timeSchemeType
|
||||
{
|
||||
tsEuler,
|
||||
tsCrankNicholson,
|
||||
tsCrankNicolson,
|
||||
tsBackward
|
||||
};
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "EulerDdtScheme.H"
|
||||
#include "CrankNicholsonDdtScheme.H"
|
||||
#include "CrankNicolsonDdtScheme.H"
|
||||
#include "backwardDdtScheme.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "CrankNicholsonDdtScheme.H"
|
||||
#include "CrankNicolsonDdtScheme.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvMatrices.H"
|
||||
@ -42,7 +42,7 @@ namespace fv
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||
CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||
(
|
||||
const IOobject& io,
|
||||
const fvMesh& mesh
|
||||
@ -60,7 +60,7 @@ CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||
CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||
(
|
||||
const IOobject& io,
|
||||
const fvMesh& mesh,
|
||||
@ -74,7 +74,7 @@ CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
label CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||
label CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||
startTimeIndex() const
|
||||
{
|
||||
return startTimeIndex_;
|
||||
@ -83,7 +83,7 @@ startTimeIndex() const
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
GeoField& CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||
GeoField& CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||
operator()()
|
||||
{
|
||||
return *this;
|
||||
@ -92,7 +92,7 @@ operator()()
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
void CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||
void CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||
operator=(const GeoField& gf)
|
||||
{
|
||||
GeoField::operator=(gf);
|
||||
@ -101,8 +101,8 @@ operator=(const GeoField& gf)
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>&
|
||||
CrankNicholsonDdtScheme<Type>::ddt0_
|
||||
CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>&
|
||||
CrankNicolsonDdtScheme<Type>::ddt0_
|
||||
(
|
||||
const word& name,
|
||||
const dimensionSet& dims
|
||||
@ -183,7 +183,7 @@ CrankNicholsonDdtScheme<Type>::ddt0_
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
bool CrankNicholsonDdtScheme<Type>::evaluate
|
||||
bool CrankNicolsonDdtScheme<Type>::evaluate
|
||||
(
|
||||
const DDt0Field<GeoField>& ddt0
|
||||
) const
|
||||
@ -193,7 +193,7 @@ bool CrankNicholsonDdtScheme<Type>::evaluate
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
scalar CrankNicholsonDdtScheme<Type>::coef_
|
||||
scalar CrankNicolsonDdtScheme<Type>::coef_
|
||||
(
|
||||
const DDt0Field<GeoField>& ddt0
|
||||
) const
|
||||
@ -211,7 +211,7 @@ scalar CrankNicholsonDdtScheme<Type>::coef_
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
scalar CrankNicholsonDdtScheme<Type>::coef0_
|
||||
scalar CrankNicolsonDdtScheme<Type>::coef0_
|
||||
(
|
||||
const DDt0Field<GeoField>& ddt0
|
||||
) const
|
||||
@ -229,7 +229,7 @@ scalar CrankNicholsonDdtScheme<Type>::coef0_
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
dimensionedScalar CrankNicholsonDdtScheme<Type>::rDtCoef_
|
||||
dimensionedScalar CrankNicolsonDdtScheme<Type>::rDtCoef_
|
||||
(
|
||||
const DDt0Field<GeoField>& ddt0
|
||||
) const
|
||||
@ -240,7 +240,7 @@ dimensionedScalar CrankNicholsonDdtScheme<Type>::rDtCoef_
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
dimensionedScalar CrankNicholsonDdtScheme<Type>::rDtCoef0_
|
||||
dimensionedScalar CrankNicolsonDdtScheme<Type>::rDtCoef0_
|
||||
(
|
||||
const DDt0Field<GeoField>& ddt0
|
||||
) const
|
||||
@ -251,7 +251,7 @@ dimensionedScalar CrankNicholsonDdtScheme<Type>::rDtCoef0_
|
||||
|
||||
template<class Type>
|
||||
template<class GeoField>
|
||||
tmp<GeoField> CrankNicholsonDdtScheme<Type>::offCentre_
|
||||
tmp<GeoField> CrankNicolsonDdtScheme<Type>::offCentre_
|
||||
(
|
||||
const GeoField& ddt0
|
||||
) const
|
||||
@ -281,7 +281,7 @@ const FieldField<fvPatchField, Type>& ff
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||
CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||
CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
const dimensioned<Type>& dt
|
||||
)
|
||||
@ -343,7 +343,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||
CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||
CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
@ -432,7 +432,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||
CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||
CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
const dimensionedScalar& rho,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
@ -522,7 +522,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||
CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||
CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
const volScalarField& rho,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
@ -622,7 +622,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||
|
||||
template<class Type>
|
||||
tmp<fvMatrix<Type> >
|
||||
CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||
CrankNicolsonDdtScheme<Type>::fvmDdt
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
@ -705,7 +705,7 @@ CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||
|
||||
template<class Type>
|
||||
tmp<fvMatrix<Type> >
|
||||
CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||
CrankNicolsonDdtScheme<Type>::fvmDdt
|
||||
(
|
||||
const dimensionedScalar& rho,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
@ -787,7 +787,7 @@ CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||
|
||||
template<class Type>
|
||||
tmp<fvMatrix<Type> >
|
||||
CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||
CrankNicolsonDdtScheme<Type>::fvmDdt
|
||||
(
|
||||
const volScalarField& rho,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
@ -877,8 +877,8 @@ CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<typename CrankNicholsonDdtScheme<Type>::fluxFieldType>
|
||||
CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
tmp<typename CrankNicolsonDdtScheme<Type>::fluxFieldType>
|
||||
CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
(
|
||||
const volScalarField& rA,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& U,
|
||||
@ -964,8 +964,8 @@ CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<typename CrankNicholsonDdtScheme<Type>::fluxFieldType>
|
||||
CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
tmp<typename CrankNicolsonDdtScheme<Type>::fluxFieldType>
|
||||
CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
(
|
||||
const volScalarField& rA,
|
||||
const volScalarField& rho,
|
||||
@ -1158,7 +1158,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr"
|
||||
"CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr"
|
||||
) << "dimensions of phi are not correct"
|
||||
<< abort(FatalError);
|
||||
|
||||
@ -1169,7 +1169,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<surfaceScalarField> CrankNicholsonDdtScheme<Type>::meshPhi
|
||||
tmp<surfaceScalarField> CrankNicolsonDdtScheme<Type>::meshPhi
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
@ -22,19 +22,19 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::fv::CrankNicholsonDdtScheme
|
||||
Foam::fv::CrankNicolsonDdtScheme
|
||||
|
||||
Description
|
||||
Second-oder CrankNicholson implicit ddt using the current and
|
||||
Second-oder CrankNicolson implicit ddt using the current and
|
||||
previous time-step fields as well as the previous time-step ddt.
|
||||
|
||||
SourceFiles
|
||||
CrankNicholsonDdtScheme.C
|
||||
CrankNicolsonDdtScheme.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef CrankNicholsonDdtScheme_H
|
||||
#define CrankNicholsonDdtScheme_H
|
||||
#ifndef CrankNicolsonDdtScheme_H
|
||||
#define CrankNicolsonDdtScheme_H
|
||||
|
||||
#include "ddtScheme.H"
|
||||
|
||||
@ -49,11 +49,11 @@ namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class CrankNicholsonDdtScheme Declaration
|
||||
Class CrankNicolsonDdtScheme Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class CrankNicholsonDdtScheme
|
||||
class CrankNicolsonDdtScheme
|
||||
:
|
||||
public fv::ddtScheme<Type>
|
||||
{
|
||||
@ -105,10 +105,10 @@ class CrankNicholsonDdtScheme
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
CrankNicholsonDdtScheme(const CrankNicholsonDdtScheme&);
|
||||
CrankNicolsonDdtScheme(const CrankNicolsonDdtScheme&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const CrankNicholsonDdtScheme&);
|
||||
void operator=(const CrankNicolsonDdtScheme&);
|
||||
|
||||
template<class GeoField>
|
||||
DDt0Field<GeoField>& ddt0_
|
||||
@ -149,20 +149,20 @@ class CrankNicholsonDdtScheme
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("CrankNicholson");
|
||||
TypeName("CrankNicolson");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
CrankNicholsonDdtScheme(const fvMesh& mesh)
|
||||
CrankNicolsonDdtScheme(const fvMesh& mesh)
|
||||
:
|
||||
ddtScheme<Type>(mesh),
|
||||
ocCoeff_(1.0)
|
||||
{}
|
||||
|
||||
//- Construct from mesh and Istream
|
||||
CrankNicholsonDdtScheme(const fvMesh& mesh, Istream& is)
|
||||
CrankNicolsonDdtScheme(const fvMesh& mesh, Istream& is)
|
||||
:
|
||||
ddtScheme<Type>(mesh, is),
|
||||
ocCoeff_(readScalar(is))
|
||||
@ -171,7 +171,7 @@ public:
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"CrankNicholsonDdtScheme(const fvMesh& mesh, Istream& is)",
|
||||
"CrankNicolsonDdtScheme(const fvMesh& mesh, Istream& is)",
|
||||
is
|
||||
) << "coefficient = " << ocCoeff_
|
||||
<< " should be >= 0 and <= 1"
|
||||
@ -253,7 +253,7 @@ public:
|
||||
|
||||
|
||||
template<>
|
||||
tmp<surfaceScalarField> CrankNicholsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||
tmp<surfaceScalarField> CrankNicolsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||
(
|
||||
const volScalarField& rA,
|
||||
const volScalarField& U,
|
||||
@ -262,7 +262,7 @@ tmp<surfaceScalarField> CrankNicholsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||
|
||||
|
||||
template<>
|
||||
tmp<surfaceScalarField> CrankNicholsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||
tmp<surfaceScalarField> CrankNicolsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||
(
|
||||
const volScalarField& rA,
|
||||
const volScalarField& rho,
|
||||
@ -282,7 +282,7 @@ tmp<surfaceScalarField> CrankNicholsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "CrankNicholsonDdtScheme.C"
|
||||
# include "CrankNicolsonDdtScheme.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "CrankNicholsonDdtScheme.H"
|
||||
#include "CrankNicolsonDdtScheme.H"
|
||||
#include "fvMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -32,7 +32,7 @@ namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
makeFvDdtScheme(CrankNicholsonDdtScheme)
|
||||
makeFvDdtScheme(CrankNicolsonDdtScheme)
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ Description
|
||||
matrix.
|
||||
|
||||
Temporal derivatives are calculated using Euler-implicit, backward
|
||||
differencing or Crank-Nicholson. Spatial derivatives are calculated
|
||||
differencing or Crank-Nicolson. Spatial derivatives are calculated
|
||||
using Gauss' Theorem.
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,61 +42,11 @@ defineTypeNameAndDebug(pyrolysisModel, 0);
|
||||
defineRunTimeSelectionTable(pyrolysisModel, mesh);
|
||||
defineRunTimeSelectionTable(pyrolysisModel, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
void pyrolysisModel::constructMeshObjects()
|
||||
{
|
||||
// construct filmDelta field if coupled to film model
|
||||
if (filmCoupled_)
|
||||
{
|
||||
filmDeltaPtr_.reset
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"filmDelta",
|
||||
time_.timeName(),
|
||||
regionMesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
regionMesh()
|
||||
)
|
||||
);
|
||||
|
||||
const volScalarField& filmDelta = filmDeltaPtr_();
|
||||
|
||||
bool foundCoupledPatch = false;
|
||||
forAll(filmDelta.boundaryField(), patchI)
|
||||
{
|
||||
const fvPatchField<scalar>& fvp = filmDelta.boundaryField()[patchI];
|
||||
if (isA<mappedFieldFvPatchField<scalar> >(fvp))
|
||||
{
|
||||
foundCoupledPatch = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundCoupledPatch)
|
||||
{
|
||||
WarningIn("void pyrolysisModels::constructMeshObjects()")
|
||||
<< "filmCoupled flag set to true, but no "
|
||||
<< mappedFieldFvPatchField<scalar>::typeName
|
||||
<< " patches found on " << filmDelta.name() << " field"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void pyrolysisModel::readPyrolysisControls()
|
||||
{
|
||||
filmCoupled_ = readBool(coeffs_.lookup("filmCoupled"));
|
||||
reactionDeltaMin_ =
|
||||
coeffs_.lookupOrDefault<scalar>("reactionDeltaMin", 0.0);
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
@ -132,24 +82,17 @@ bool pyrolysisModel::read(const dictionary& dict)
|
||||
|
||||
pyrolysisModel::pyrolysisModel(const fvMesh& mesh)
|
||||
:
|
||||
regionModel1D(mesh),
|
||||
filmCoupled_(false),
|
||||
filmDeltaPtr_(NULL),
|
||||
reactionDeltaMin_(0.0)
|
||||
regionModel1D(mesh)
|
||||
{}
|
||||
|
||||
|
||||
pyrolysisModel::pyrolysisModel(const word& modelType, const fvMesh& mesh)
|
||||
:
|
||||
regionModel1D(mesh, "pyrolysis", modelType),
|
||||
filmCoupled_(false),
|
||||
filmDeltaPtr_(NULL),
|
||||
reactionDeltaMin_(0.0)
|
||||
regionModel1D(mesh, "pyrolysis", modelType)
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
read();
|
||||
constructMeshObjects();
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,15 +104,11 @@ pyrolysisModel::pyrolysisModel
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
regionModel1D(mesh, "pyrolysis", modelType, dict),
|
||||
filmCoupled_(false),
|
||||
filmDeltaPtr_(NULL),
|
||||
reactionDeltaMin_(0.0)
|
||||
regionModel1D(mesh, "pyrolysis", modelType, dict)
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
read(dict);
|
||||
constructMeshObjects();
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,15 +131,6 @@ scalar pyrolysisModel::addMassSources
|
||||
}
|
||||
|
||||
|
||||
void pyrolysisModel::preEvolveRegion()
|
||||
{
|
||||
if (filmCoupled_)
|
||||
{
|
||||
filmDeltaPtr_->correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
scalar pyrolysisModel::solidRegionDiffNo() const
|
||||
{
|
||||
return -GREAT;
|
||||
|
||||
@ -80,18 +80,6 @@ private:
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Data
|
||||
|
||||
//- Flag to indicate whether pyrolysis region coupled to a film region
|
||||
bool filmCoupled_;
|
||||
|
||||
//- Pointer to film thickness field
|
||||
autoPtr<volScalarField> filmDeltaPtr_;
|
||||
|
||||
//- Film height below which reactions can occur [m]
|
||||
scalar reactionDeltaMin_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Read control parameters
|
||||
@ -115,8 +103,8 @@ public:
|
||||
pyrolysisModel,
|
||||
mesh,
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh
|
||||
const word& modelType,
|
||||
const fvMesh& mesh
|
||||
),
|
||||
(modelType, mesh)
|
||||
);
|
||||
@ -127,9 +115,9 @@ public:
|
||||
pyrolysisModel,
|
||||
dictionary,
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
),
|
||||
(modelType, mesh, dict)
|
||||
);
|
||||
@ -234,12 +222,6 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Pre-evolve region
|
||||
virtual void preEvolveRegion();
|
||||
|
||||
|
||||
// Helper function
|
||||
|
||||
//- Mean diffusion number of the solid region
|
||||
|
||||
@ -42,15 +42,15 @@ namespace RASModels
|
||||
|
||||
tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcNut() const
|
||||
{
|
||||
const label patchi = patch().index();
|
||||
const label patchI = patch().index();
|
||||
|
||||
const turbulenceModel& turbModel =
|
||||
db().lookupObject<turbulenceModel>("turbulenceModel");
|
||||
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
|
||||
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchI];
|
||||
const scalarField magGradU(mag(Uw.snGrad()));
|
||||
const tmp<volScalarField> tnu = turbModel.nu();
|
||||
const volScalarField& nu = tnu();
|
||||
const scalarField& nuw = nu.boundaryField()[patchi];
|
||||
const scalarField& nuw = nu.boundaryField()[patchI];
|
||||
|
||||
return max
|
||||
(
|
||||
@ -65,23 +65,27 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
||||
const scalarField& magGradU
|
||||
) const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
const turbulenceModel& turbModel =
|
||||
db().lookupObject<turbulenceModel>("turbulenceModel");
|
||||
const scalarField& y = turbModel.y()[patch().index()];
|
||||
const scalarField& y = turbModel.y()[patchI];
|
||||
|
||||
const fvPatchVectorField& Uw =
|
||||
turbModel.U().boundaryField()[patch().index()];
|
||||
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchI];
|
||||
const scalarField magUp(mag(Uw.patchInternalField() - Uw));
|
||||
|
||||
const scalarField& nuw = turbModel.nu()().boundaryField()[patch().index()];
|
||||
const tmp<volScalarField> tnu = turbModel.nu();
|
||||
const volScalarField& nu = tnu();
|
||||
const scalarField& nuw = nu.boundaryField()[patchI];
|
||||
|
||||
const scalarField& nutw = *this;
|
||||
|
||||
tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
|
||||
scalarField& uTau = tuTau();
|
||||
|
||||
forAll(uTau, facei)
|
||||
forAll(uTau, faceI)
|
||||
{
|
||||
scalar ut = sqrt((nutw[facei] + nuw[facei])*magGradU[facei]);
|
||||
scalar ut = sqrt((nutw[faceI] + nuw[faceI])*magGradU[faceI]);
|
||||
|
||||
if (ut > ROOTVSMALL)
|
||||
{
|
||||
@ -90,17 +94,17 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
||||
|
||||
do
|
||||
{
|
||||
scalar kUu = min(kappa_*magUp[facei]/ut, 50);
|
||||
scalar kUu = min(kappa_*magUp[faceI]/ut, 50);
|
||||
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
||||
|
||||
scalar f =
|
||||
- ut*y[facei]/nuw[facei]
|
||||
+ magUp[facei]/ut
|
||||
- ut*y[faceI]/nuw[faceI]
|
||||
+ magUp[faceI]/ut
|
||||
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
||||
|
||||
scalar df =
|
||||
y[facei]/nuw[facei]
|
||||
+ magUp[facei]/sqr(ut)
|
||||
y[faceI]/nuw[faceI]
|
||||
+ magUp[faceI]/sqr(ut)
|
||||
+ 1/E_*kUu*fkUu/ut;
|
||||
|
||||
scalar uTauNew = ut + f/df;
|
||||
@ -109,7 +113,7 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
||||
|
||||
} while (ut > ROOTVSMALL && err > 0.01 && ++iter < 10);
|
||||
|
||||
uTau[facei] = max(0.0, ut);
|
||||
uTau[faceI] = max(0.0, ut);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,8 +27,6 @@ FoamFile
|
||||
|
||||
reactingOneDimCoeffs
|
||||
{
|
||||
filmCoupled false;
|
||||
|
||||
radFluxName Qr;
|
||||
|
||||
minimumDelta 1e-12;
|
||||
|
||||
@ -28,8 +28,6 @@ FoamFile
|
||||
|
||||
reactingOneDimCoeffs
|
||||
{
|
||||
filmCoupled false;
|
||||
|
||||
radFluxName Qr;
|
||||
|
||||
minimumDelta 1e-8;
|
||||
|
||||
@ -28,8 +28,6 @@ FoamFile
|
||||
|
||||
reactingOneDimCoeffs
|
||||
{
|
||||
filmCoupled false;
|
||||
|
||||
radFluxName Qr;
|
||||
|
||||
minimumDelta 1e-8;
|
||||
|
||||
@ -26,7 +26,7 @@ source1
|
||||
|
||||
fixedTemperatureSourceCoeffs
|
||||
{
|
||||
mode constant;
|
||||
mode uniform;
|
||||
temperature 350;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ source1
|
||||
|
||||
fixedTemperatureSourceCoeffs
|
||||
{
|
||||
mode constant;
|
||||
mode uniform;
|
||||
temperature 350;
|
||||
}
|
||||
}
|
||||
|
||||
@ -256,35 +256,34 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.0;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.5;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// See relativeSizes parameter.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// See relativeSizes parameter.
|
||||
minThickness 0.25;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 60;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 5;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -58,37 +58,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
char
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -49,36 +49,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
char
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -49,36 +49,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
char
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -58,37 +58,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -49,36 +49,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -49,36 +49,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -285,31 +285,30 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.3;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
finalLayerThickness 1;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
minThickness 0.1;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 30;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 3;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -58,37 +58,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -49,36 +49,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -49,36 +49,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -81,36 +81,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -72,36 +72,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -72,36 +72,6 @@ dictionaryReplacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -335,33 +335,33 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.0;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.3;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
minThickness 0.1;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 30;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 3;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -189,34 +189,33 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.3;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.7;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// See relativeSizes parameter.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// See relativeSizes parameter.
|
||||
minThickness 0.25;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 60;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 5;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -204,30 +204,30 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.0;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.3;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
minThickness 0.1;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
nGrow 0;
|
||||
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 60;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 3;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -38,6 +38,7 @@ FoamFile
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
inGroups 1(empty);
|
||||
nFaces 800;
|
||||
startFace 840;
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default CrankNicholson 0.9;
|
||||
default CrankNicolson 0.9;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
|
||||
@ -227,37 +227,37 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.0;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.3;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
minThickness 0.1;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 60;
|
||||
|
||||
//- At non-patched sides allow mesh to slip if extrusion direction makes
|
||||
// angle larger than slipFeatureAngle.
|
||||
// At non-patched sides allow mesh to slip if extrusion direction makes
|
||||
// angle larger than slipFeatureAngle.
|
||||
slipFeatureAngle 30;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 3;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -277,31 +277,31 @@ addLayersControls
|
||||
expansionRatio 1.0;
|
||||
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.3;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// See relativeSizes parameter.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// See relativeSizes parameter.
|
||||
minThickness 0.25;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 60;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 5;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -26,7 +26,7 @@ source1
|
||||
|
||||
fixedTemperatureSourceCoeffs
|
||||
{
|
||||
mode constant;
|
||||
mode uniform;
|
||||
temperature 2000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,33 +216,32 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.5;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.02;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
minThickness 0.005;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 90;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 3;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -216,33 +216,32 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.5;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.0003;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
minThickness 0.0001;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 90;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 3;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -214,30 +214,30 @@ addLayersControls
|
||||
expansionRatio 1.0;
|
||||
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.3;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// See relativeSizes parameter.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// See relativeSizes parameter.
|
||||
minThickness 0.25;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
nGrow 0;
|
||||
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 30;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 5;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -228,31 +228,31 @@ addLayersControls
|
||||
expansionRatio 1.0;
|
||||
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the thickness of the layer furthest away from the wall.
|
||||
// See relativeSizes parameter.
|
||||
finalLayerThickness 0.3;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// See relativeSizes parameter.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// See relativeSizes parameter.
|
||||
minThickness 0.25;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 60;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 5;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
@ -210,32 +210,32 @@ addLayersControls
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.0;
|
||||
|
||||
//- Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Wanted thickness of final added cell layer. If multiple layers
|
||||
// is the
|
||||
// thickness of the layer furthest away from the wall.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
finalLayerThickness 0.3;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
minThickness 0.1;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
|
||||
nGrow 0;
|
||||
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
// When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// are perpendicular
|
||||
featureAngle 30;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
// Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 3;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
|
||||
Reference in New Issue
Block a user