43 const DimensionedField<vector, volMesh>& iF
46 fixedGradientFvPatchVectorField(
p, iF),
47 traction_(
p.size(),
Zero),
48 pressure_(
p.size(),
Zero)
50 fvPatchVectorField::operator=(patchInternalField());
55 tractionDisplacementFvPatchVectorField::
56 tractionDisplacementFvPatchVectorField
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)
70 tractionDisplacementFvPatchVectorField::
71 tractionDisplacementFvPatchVectorField
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());
87 tractionDisplacementFvPatchVectorField::
88 tractionDisplacementFvPatchVectorField
90 const tractionDisplacementFvPatchVectorField& tdpvf
93 fixedGradientFvPatchVectorField(tdpvf),
94 traction_(tdpvf.traction_),
95 pressure_(tdpvf.pressure_)
99 tractionDisplacementFvPatchVectorField::
100 tractionDisplacementFvPatchVectorField
102 const tractionDisplacementFvPatchVectorField& tdpvf,
103 const DimensionedField<vector, volMesh>& iF
106 fixedGradientFvPatchVectorField(tdpvf, iF),
107 traction_(tdpvf.traction_),
108 pressure_(tdpvf.pressure_)
114 void tractionDisplacementFvPatchVectorField::autoMap
116 const fvPatchFieldMapper& m
119 fixedGradientFvPatchVectorField::autoMap(m);
120 traction_.autoMap(m);
121 pressure_.autoMap(m);
125 void tractionDisplacementFvPatchVectorField::rmap
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);
141 void tractionDisplacementFvPatchVectorField::updateCoeffs()
148 const dictionary& mechanicalProperties =
149 db().lookupObject<IOdictionary>(
"mechanicalProperties");
151 const dictionary& thermalProperties =
152 db().lookupObject<IOdictionary>(
"thermalProperties");
155 const fvPatchField<scalar>&
rho =
158 const fvPatchField<scalar>&
rhoE =
161 const fvPatchField<scalar>&
nu =
169 if (mechanicalProperties.get<
bool>(
"planeStress"))
172 threeK = E/(1.0 -
nu);
179 const fvPatchField<symmTensor>& sigmaD =
184 (traction_ - pressure_*
n)/
rho 188 if (thermalProperties.get<
bool>(
"thermalStress"))
190 const fvPatchField<scalar>& threeKalpha=
193 const fvPatchField<scalar>&
T =
196 gradient() +=
n*threeKalpha*
T/twoMuLambda;
199 fixedGradientFvPatchVectorField::updateCoeffs();
206 traction_.writeEntry(
"traction",
os);
207 pressure_.writeEntry(
"pressure",
os);
208 writeEntry(
"value",
os);
217 tractionDisplacementFvPatchVectorField
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
fvPatchField< vector > fvPatchVectorField
tractionDisplacementFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
OBJstream os(runTime.globalPath()/outputName)
const dimensionedScalar mu
Atomic mass unit.
const std::string patch
OpenFOAM patch number as a std::string.
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< label > labelList
A List of labels.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static constexpr const zero Zero
Global zero (0)