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 tractionDisplacementCorrectionFvPatchVectorField::
54 tractionDisplacementCorrectionFvPatchVectorField
56 const tractionDisplacementCorrectionFvPatchVectorField& 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 tractionDisplacementCorrectionFvPatchVectorField::
69 tractionDisplacementCorrectionFvPatchVectorField
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 tractionDisplacementCorrectionFvPatchVectorField::
86 tractionDisplacementCorrectionFvPatchVectorField
88 const tractionDisplacementCorrectionFvPatchVectorField& tdpvf
91 fixedGradientFvPatchVectorField(tdpvf),
92 traction_(tdpvf.traction_),
93 pressure_(tdpvf.pressure_)
97 tractionDisplacementCorrectionFvPatchVectorField::
98 tractionDisplacementCorrectionFvPatchVectorField
100 const tractionDisplacementCorrectionFvPatchVectorField& tdpvf,
101 const DimensionedField<vector, volMesh>& iF
104 fixedGradientFvPatchVectorField(tdpvf, iF),
105 traction_(tdpvf.traction_),
106 pressure_(tdpvf.pressure_)
112 void tractionDisplacementCorrectionFvPatchVectorField::autoMap
114 const fvPatchFieldMapper& m
117 fixedGradientFvPatchVectorField::autoMap(m);
118 traction_.autoMap(m);
119 pressure_.autoMap(m);
124 void tractionDisplacementCorrectionFvPatchVectorField::rmap
130 fixedGradientFvPatchVectorField::rmap(ptf, addr);
132 const tractionDisplacementCorrectionFvPatchVectorField& dmptf =
133 refCast<const tractionDisplacementCorrectionFvPatchVectorField>(ptf);
135 traction_.rmap(dmptf.traction_, addr);
136 pressure_.rmap(dmptf.pressure_, addr);
141 void tractionDisplacementCorrectionFvPatchVectorField::updateCoeffs()
148 const dictionary& mechanicalProperties = db().lookupObject<IOdictionary>
150 "mechanicalProperties"
161 Switch planeStress(mechanicalProperties.lookup(
"planeStress"));
165 lambda =
nu*E/((1.0 +
nu)*(1.0 -
nu));
170 const fvPatchField<symmTensor>& sigmaD =
173 const fvPatchField<tensor>& sigmaExp =
178 (traction_ + pressure_*n)/
rho.value() - (n & (sigmaD + sigmaExp))
179 )/(2.0*mu + lambda).value();
181 fixedGradientFvPatchVectorField::updateCoeffs();
186 void tractionDisplacementCorrectionFvPatchVectorField::write(Ostream& os)
const
188 fvPatchVectorField::write(os);
189 traction_.writeEntry(
"traction", os);
190 pressure_.writeEntry(
"pressure", os);
191 writeEntry(
"value", os);
200 tractionDisplacementCorrectionFvPatchVectorField