41 const DimensionedField<vector, volMesh>& iF
44 fixedGradientFvPatchVectorField(
p, iF),
45 traction_(
p.size(),
vector::zero),
46 pressure_(
p.size(), 0.0)
48 fvPatchVectorField::operator=(patchInternalField());
49 gradient() = vector::zero;
53 tractionDisplacementFvPatchVectorField::
54 tractionDisplacementFvPatchVectorField
56 const tractionDisplacementFvPatchVectorField& tdpvf,
58 const DimensionedField<vector, volMesh>& iF,
59 const fvPatchFieldMapper& mapper
62 fixedGradientFvPatchVectorField(tdpvf,
p, iF, mapper),
63 traction_(tdpvf.traction_, mapper),
64 pressure_(tdpvf.pressure_, mapper)
68 tractionDisplacementFvPatchVectorField::
69 tractionDisplacementFvPatchVectorField
72 const DimensionedField<vector, volMesh>& iF,
73 const dictionary&
dict
76 fixedGradientFvPatchVectorField(
p, iF),
77 traction_(
"traction",
dict,
p.size()),
78 pressure_(
"pressure",
dict,
p.size())
80 fvPatchVectorField::operator=(patchInternalField());
81 gradient() = vector::zero;
85 tractionDisplacementFvPatchVectorField::
86 tractionDisplacementFvPatchVectorField
88 const tractionDisplacementFvPatchVectorField& tdpvf
91 fixedGradientFvPatchVectorField(tdpvf),
92 traction_(tdpvf.traction_),
93 pressure_(tdpvf.pressure_)
97 tractionDisplacementFvPatchVectorField::
98 tractionDisplacementFvPatchVectorField
100 const tractionDisplacementFvPatchVectorField& tdpvf,
101 const DimensionedField<vector, volMesh>& iF
104 fixedGradientFvPatchVectorField(tdpvf, iF),
105 traction_(tdpvf.traction_),
106 pressure_(tdpvf.pressure_)
112 void tractionDisplacementFvPatchVectorField::autoMap
114 const fvPatchFieldMapper& m
117 fixedGradientFvPatchVectorField::autoMap(m);
118 traction_.autoMap(m);
119 pressure_.autoMap(m);
123 void tractionDisplacementFvPatchVectorField::rmap
129 fixedGradientFvPatchVectorField::rmap(ptf, addr);
131 const tractionDisplacementFvPatchVectorField& dmptf =
132 refCast<const tractionDisplacementFvPatchVectorField>(ptf);
134 traction_.rmap(dmptf.traction_, addr);
135 pressure_.rmap(dmptf.pressure_, addr);
139 void tractionDisplacementFvPatchVectorField::updateCoeffs()
146 const dictionary& mechanicalProperties =
147 db().lookupObject<IOdictionary>(
"mechanicalProperties");
149 const dictionary& thermalProperties =
150 db().lookupObject<IOdictionary>(
"thermalProperties");
153 const fvPatchField<scalar>&
rho =
156 const fvPatchField<scalar>&
rhoE =
159 const fvPatchField<scalar>&
nu =
167 Switch planeStress(mechanicalProperties.lookup(
"planeStress"));
172 threeK = E/(1.0 -
nu);
179 const fvPatchField<symmTensor>& sigmaD =
184 (traction_ - pressure_*
n)/
rho
188 Switch thermalStress(thermalProperties.lookup(
"thermalStress"));
192 const fvPatchField<scalar>& threeKalpha=
195 const fvPatchField<scalar>&
T =
198 gradient() +=
n*threeKalpha*
T/twoMuLambda;
201 fixedGradientFvPatchVectorField::updateCoeffs();
208 traction_.writeEntry(
"traction", os);
209 pressure_.writeEntry(
"pressure", os);
210 writeEntry(
"value", os);
219 tractionDisplacementFvPatchVectorField