46 fixedGradientFvPatchVectorField(
p, iF),
47 traction_(
p.size(),
Zero),
48 pressure_(
p.size(),
Zero)
50 extrapolateInternal();
55tractionDisplacementFvPatchVectorField::
56tractionDisplacementFvPatchVectorField
58 const tractionDisplacementFvPatchVectorField& 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)
70tractionDisplacementFvPatchVectorField::
71tractionDisplacementFvPatchVectorField
74 const DimensionedField<vector, volMesh>& iF,
78 fixedGradientFvPatchVectorField(
p, iF),
79 traction_(
"traction",
dict,
p.size()),
80 pressure_(
"pressure",
dict,
p.size())
82 extrapolateInternal();
87tractionDisplacementFvPatchVectorField::
88tractionDisplacementFvPatchVectorField
90 const tractionDisplacementFvPatchVectorField& tdpvf
93 fixedGradientFvPatchVectorField(tdpvf),
94 traction_(tdpvf.traction_),
95 pressure_(tdpvf.pressure_)
99tractionDisplacementFvPatchVectorField::
100tractionDisplacementFvPatchVectorField
102 const tractionDisplacementFvPatchVectorField& tdpvf,
103 const DimensionedField<vector, volMesh>& iF
106 fixedGradientFvPatchVectorField(tdpvf, iF),
107 traction_(tdpvf.traction_),
108 pressure_(tdpvf.pressure_)
114void tractionDisplacementFvPatchVectorField::autoMap
116 const fvPatchFieldMapper& m
119 fixedGradientFvPatchVectorField::autoMap(m);
120 traction_.autoMap(m);
121 pressure_.autoMap(m);
125void tractionDisplacementFvPatchVectorField::rmap
127 const fvPatchVectorField& ptf,
128 const labelList& addr
131 fixedGradientFvPatchVectorField::rmap(ptf, addr);
133 const tractionDisplacementFvPatchVectorField& dmptf =
134 refCast<const tractionDisplacementFvPatchVectorField>(ptf);
136 traction_.rmap(dmptf.traction_, addr);
137 pressure_.rmap(dmptf.pressure_, addr);
141void tractionDisplacementFvPatchVectorField::updateCoeffs()
149 db().lookupObject<IOdictionary>(
"mechanicalProperties");
152 db().lookupObject<IOdictionary>(
"thermalProperties");
164 if (mechanicalProperties.get<
bool>(
"planeStress"))
167 threeK = E/(1.0 -
nu);
178 (traction_ - pressure_*
n)/
rho
179 + twoMuLambda*fvPatchField<vector>::snGrad() - (
n & sigmaD)
182 if (thermalProperties.get<
bool>(
"thermalStress"))
184 const auto& threeKalpha =
189 gradient() +=
n*threeKalpha*
T/twoMuLambda;
192 fixedGradientFvPatchVectorField::updateCoeffs();
196void tractionDisplacementFvPatchVectorField::write(Ostream&
os)
const
198 fvPatchField<vector>::write(
os);
199 traction_.writeEntry(
"traction",
os);
200 pressure_.writeEntry(
"pressure",
os);
201 fvPatchField<vector>::writeValueEntry(
os);
210 tractionDisplacementFvPatchVectorField
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
tractionDisplacementFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
const std::string patch
OpenFOAM patch number as a std::string.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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)