39tractionDisplacementCorrectionFvPatchVectorField::
40tractionDisplacementCorrectionFvPatchVectorField
43 const DimensionedField<vector, volMesh>& iF
46 fixedGradientFvPatchVectorField(
p, iF),
47 traction_(
p.size(),
Zero),
48 pressure_(
p.size(),
Zero)
50 fvPatchVectorField::operator=(patchInternalField());
55tractionDisplacementCorrectionFvPatchVectorField::
56tractionDisplacementCorrectionFvPatchVectorField
58 const tractionDisplacementCorrectionFvPatchVectorField& tdpvf,
60 const DimensionedField<vector, volMesh>& iF,
61 const fvPatchFieldMapper& mapper
64 fixedGradientFvPatchVectorField(tdpvf,
p, iF, mapper),
65 traction_(tdpvf.traction_, mapper),
66 pressure_(tdpvf.pressure_, mapper)
70tractionDisplacementCorrectionFvPatchVectorField::
71tractionDisplacementCorrectionFvPatchVectorField
74 const DimensionedField<vector, volMesh>& iF,
75 const dictionary&
dict
78 fixedGradientFvPatchVectorField(
p, iF),
79 traction_(
"traction",
dict,
p.size()),
80 pressure_(
"pressure",
dict,
p.size())
82 fvPatchVectorField::operator=(patchInternalField());
87tractionDisplacementCorrectionFvPatchVectorField::
88tractionDisplacementCorrectionFvPatchVectorField
90 const tractionDisplacementCorrectionFvPatchVectorField& tdpvf
93 fixedGradientFvPatchVectorField(tdpvf),
94 traction_(tdpvf.traction_),
95 pressure_(tdpvf.pressure_)
99tractionDisplacementCorrectionFvPatchVectorField::
100tractionDisplacementCorrectionFvPatchVectorField
102 const tractionDisplacementCorrectionFvPatchVectorField& tdpvf,
103 const DimensionedField<vector, volMesh>& iF
106 fixedGradientFvPatchVectorField(tdpvf, iF),
107 traction_(tdpvf.traction_),
108 pressure_(tdpvf.pressure_)
114void tractionDisplacementCorrectionFvPatchVectorField::autoMap
116 const fvPatchFieldMapper& m
120 traction_.autoMap(m);
121 pressure_.autoMap(m);
126void tractionDisplacementCorrectionFvPatchVectorField::rmap
128 const fvPatchVectorField& ptf,
129 const labelList& addr
134 const tractionDisplacementCorrectionFvPatchVectorField& dmptf =
135 refCast<const tractionDisplacementCorrectionFvPatchVectorField>(ptf);
137 traction_.rmap(dmptf.traction_, addr);
138 pressure_.rmap(dmptf.pressure_, addr);
143void tractionDisplacementCorrectionFvPatchVectorField::updateCoeffs()
150 const dictionary& mechanicalProperties = db().lookupObject<IOdictionary>
152 "mechanicalProperties"
155 const fvPatchField<scalar>&
rho =
158 const fvPatchField<scalar>&
rhoE =
161 const fvPatchField<scalar>&
nu =
168 if (mechanicalProperties.get<
bool>(
"planeStress"))
175 const fvPatchField<symmTensor>& sigmaD =
178 const fvPatchField<tensor>& sigmaExp =
183 (traction_ + pressure_*
n)/
rho - (
n & (sigmaD + sigmaExp))
191void tractionDisplacementCorrectionFvPatchVectorField::write(Ostream&
os)
const
193 fvPatchVectorField::write(
os);
194 traction_.writeEntry(
"traction",
os);
195 pressure_.writeEntry(
"pressure",
os);
196 writeEntry(
"value",
os);
205 tractionDisplacementCorrectionFvPatchVectorField
Macros for easy insertion into run-time selection tables.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
void rmap(const atmBoundaryLayer &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Tensor of scalars, i.e. Tensor<scalar>.
const volScalarField & mu
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
const std::string patch
OpenFOAM patch number as a std::string.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
static constexpr const zero Zero
Global zero (0)
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)