Merge commit 'OpenCFD/master' into olesenm
This commit is contained in:
commit
3d9329bf35
@ -35,12 +35,13 @@ template
|
||||
template<class> class SlicedPatchField,
|
||||
class GeoMesh
|
||||
>
|
||||
Foam::tmp<Foam::FieldField<PatchField, Type> >
|
||||
Foam::tmp<Foam::FieldField<PatchField, Type> >
|
||||
Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
|
||||
slicedBoundaryField
|
||||
(
|
||||
const Mesh& mesh,
|
||||
const Field<Type>& completeField
|
||||
const Field<Type>& completeField,
|
||||
const bool preserveCouples
|
||||
)
|
||||
{
|
||||
tmp<FieldField<PatchField, Type> > tbf
|
||||
@ -52,7 +53,7 @@ slicedBoundaryField
|
||||
|
||||
forAll (mesh.boundary(), patchi)
|
||||
{
|
||||
if (mesh.boundary()[patchi].coupled())
|
||||
if (preserveCouples && mesh.boundary()[patchi].coupled())
|
||||
{
|
||||
// For coupled patched construct the correct patch field type
|
||||
bf.set
|
||||
@ -143,7 +144,8 @@ SlicedGeometricField
|
||||
const IOobject& io,
|
||||
const Mesh& mesh,
|
||||
const dimensionSet& ds,
|
||||
const Field<Type>& completeField
|
||||
const Field<Type>& completeField,
|
||||
const bool preserveCouples
|
||||
)
|
||||
:
|
||||
GeometricField<Type, PatchField, GeoMesh>
|
||||
@ -152,7 +154,7 @@ SlicedGeometricField
|
||||
mesh,
|
||||
ds,
|
||||
Field<Type>(),
|
||||
slicedBoundaryField(mesh, completeField)
|
||||
slicedBoundaryField(mesh, completeField, preserveCouples)
|
||||
)
|
||||
{
|
||||
// Set the internalField to the slice of the complete field
|
||||
@ -179,7 +181,8 @@ SlicedGeometricField
|
||||
const Mesh& mesh,
|
||||
const dimensionSet& ds,
|
||||
const Field<Type>& completeIField,
|
||||
const Field<Type>& completeBField
|
||||
const Field<Type>& completeBField,
|
||||
const bool preserveCouples
|
||||
)
|
||||
:
|
||||
GeometricField<Type, PatchField, GeoMesh>
|
||||
@ -188,7 +191,7 @@ SlicedGeometricField
|
||||
mesh,
|
||||
ds,
|
||||
Field<Type>(),
|
||||
slicedBoundaryField(mesh, completeBField)
|
||||
slicedBoundaryField(mesh, completeBField, preserveCouples)
|
||||
)
|
||||
{
|
||||
// Set the internalField to the slice of the complete field
|
||||
|
@ -28,11 +28,11 @@ Class
|
||||
Description
|
||||
Specialization of GeometricField which holds slices of given complete
|
||||
fields in a form that they act as a GeometricField.
|
||||
|
||||
|
||||
The destructor is wrapped to avoid deallocation of the storage of the
|
||||
complete fields when this is destroyed.
|
||||
|
||||
SlicedGeometricField can only be instantiated with a valid form of
|
||||
SlicedGeometricField can only be instantiated with a valid form of
|
||||
SlicedPatchField to handle the slicing and storage deallocation of the
|
||||
boundary field.
|
||||
|
||||
@ -83,7 +83,8 @@ private:
|
||||
tmp<FieldField<PatchField, Type> > slicedBoundaryField
|
||||
(
|
||||
const Mesh& mesh,
|
||||
const Field<Type>& completeField
|
||||
const Field<Type>& completeField,
|
||||
const bool preserveCouples
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -111,7 +112,8 @@ public:
|
||||
const IOobject&,
|
||||
const Mesh&,
|
||||
const dimensionSet&,
|
||||
const Field<Type>& completeField
|
||||
const Field<Type>& completeField,
|
||||
const bool preserveCouples=true
|
||||
);
|
||||
|
||||
//- Construct from components and separate fields to slice for the
|
||||
@ -122,7 +124,8 @@ public:
|
||||
const Mesh&,
|
||||
const dimensionSet&,
|
||||
const Field<Type>& completeIField,
|
||||
const Field<Type>& completeBField
|
||||
const Field<Type>& completeBField,
|
||||
const bool preserveCouples=true
|
||||
);
|
||||
|
||||
|
||||
|
@ -55,6 +55,7 @@ void Foam::MULES::explicitSolve
|
||||
Info<< "MULES: Solving for " << psi.name() << endl;
|
||||
|
||||
const fvMesh& mesh = psi.mesh();
|
||||
psi.correctBoundaryConditions();
|
||||
|
||||
surfaceScalarField phiBD = upwind<scalar>(psi.mesh(), phi).flux(psi);
|
||||
|
||||
@ -76,7 +77,8 @@ void Foam::MULES::explicitSolve
|
||||
),
|
||||
mesh,
|
||||
dimless,
|
||||
allLambda
|
||||
allLambda,
|
||||
false // Use slices for the couples
|
||||
);
|
||||
|
||||
limiter
|
||||
@ -183,7 +185,8 @@ void Foam::MULES::implicitSolve
|
||||
),
|
||||
mesh,
|
||||
dimless,
|
||||
allCoLambda
|
||||
allCoLambda,
|
||||
false // Use slices for the couples
|
||||
);
|
||||
|
||||
CoLambda == 1.0/max(CoCoeff*Cof, scalar(1));
|
||||
@ -205,7 +208,8 @@ void Foam::MULES::implicitSolve
|
||||
),
|
||||
mesh,
|
||||
dimless,
|
||||
allLambda
|
||||
allLambda,
|
||||
false // Use slices for the couples
|
||||
);
|
||||
|
||||
linear<scalar> CDs(mesh);
|
||||
@ -347,7 +351,8 @@ void Foam::MULES::limiter
|
||||
),
|
||||
mesh,
|
||||
dimless,
|
||||
allLambda
|
||||
allLambda,
|
||||
false // Use slices for the couples
|
||||
);
|
||||
|
||||
scalarField& lambdaIf = lambda;
|
||||
|
@ -29,14 +29,9 @@ License
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicGammaContactAngleFvPatchScalarField::
|
||||
Foam::dynamicGammaContactAngleFvPatchScalarField::
|
||||
dynamicGammaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
@ -51,7 +46,7 @@ dynamicGammaContactAngleFvPatchScalarField
|
||||
{}
|
||||
|
||||
|
||||
dynamicGammaContactAngleFvPatchScalarField::
|
||||
Foam::dynamicGammaContactAngleFvPatchScalarField::
|
||||
dynamicGammaContactAngleFvPatchScalarField
|
||||
(
|
||||
const dynamicGammaContactAngleFvPatchScalarField& gcpsf,
|
||||
@ -64,11 +59,11 @@ dynamicGammaContactAngleFvPatchScalarField
|
||||
theta0_(gcpsf.theta0_),
|
||||
uTheta_(gcpsf.uTheta_),
|
||||
thetaA_(gcpsf.thetaA_),
|
||||
thetaR_(gcpsf.thetaA_)
|
||||
thetaR_(gcpsf.thetaR_)
|
||||
{}
|
||||
|
||||
|
||||
dynamicGammaContactAngleFvPatchScalarField::
|
||||
Foam::dynamicGammaContactAngleFvPatchScalarField::
|
||||
dynamicGammaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
@ -86,7 +81,7 @@ dynamicGammaContactAngleFvPatchScalarField
|
||||
}
|
||||
|
||||
|
||||
dynamicGammaContactAngleFvPatchScalarField::
|
||||
Foam::dynamicGammaContactAngleFvPatchScalarField::
|
||||
dynamicGammaContactAngleFvPatchScalarField
|
||||
(
|
||||
const dynamicGammaContactAngleFvPatchScalarField& gcpsf
|
||||
@ -100,7 +95,7 @@ dynamicGammaContactAngleFvPatchScalarField
|
||||
{}
|
||||
|
||||
|
||||
dynamicGammaContactAngleFvPatchScalarField::
|
||||
Foam::dynamicGammaContactAngleFvPatchScalarField::
|
||||
dynamicGammaContactAngleFvPatchScalarField
|
||||
(
|
||||
const dynamicGammaContactAngleFvPatchScalarField& gcpsf,
|
||||
@ -117,7 +112,8 @@ dynamicGammaContactAngleFvPatchScalarField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<scalarField> dynamicGammaContactAngleFvPatchScalarField::theta
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::dynamicGammaContactAngleFvPatchScalarField::theta
|
||||
(
|
||||
const fvPatchVectorField& Up,
|
||||
const fvsPatchVectorField& nHat
|
||||
@ -133,22 +129,22 @@ tmp<scalarField> dynamicGammaContactAngleFvPatchScalarField::theta
|
||||
// Calculated the component of the velocity parallel to the wall
|
||||
vectorField Uwall = Up.patchInternalField() - Up;
|
||||
Uwall -= (nf & Uwall)*nf;
|
||||
|
||||
|
||||
// Find the direction of the interface parallel to the wall
|
||||
vectorField nWall = nHat - (nf & nHat)*nf;
|
||||
|
||||
|
||||
// Normalise nWall
|
||||
nWall /= (mag(nWall) + SMALL);
|
||||
|
||||
|
||||
// Calculate Uwall resolved normal to the interface parallel to
|
||||
// the interface
|
||||
scalarField uwall = nWall & Uwall;
|
||||
|
||||
|
||||
return theta0_ + (thetaA_ - thetaR_)*tanh(uwall/uTheta_);
|
||||
}
|
||||
|
||||
|
||||
void dynamicGammaContactAngleFvPatchScalarField::write(Ostream& os) const
|
||||
void Foam::dynamicGammaContactAngleFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl;
|
||||
@ -161,10 +157,14 @@ void dynamicGammaContactAngleFvPatchScalarField::write(Ostream& os) const
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField(fvPatchScalarField, dynamicGammaContactAngleFvPatchScalarField);
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
dynamicGammaContactAngleFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
Loading…
Reference in New Issue
Block a user