createFieldsSolidDisplacement.H
Go to the documentation of this file.
2 
3 Info << "Reading field D\n"
4  << endl;
5 DPtr_.reset(
6  new volVectorField(
7  IOobject(
8  "D",
9  runTime.timeName(),
10  mesh,
11  IOobject::MUST_READ,
12  IOobject::AUTO_WRITE),
13  mesh));
14 volVectorField& D = DPtr_();
15 
16 Info << "Calculating stress field sigmaD\n"
17  << endl;
18 
19 sigmaDPtr_.reset(
20  new volSymmTensorField(
21  IOobject(
22  "sigmaD",
23  runTime.timeName(),
24  mesh,
25  IOobject::NO_READ,
26  IOobject::NO_WRITE),
27  muPtr_() * twoSymm(fvc::grad(D)) + lambdaPtr_() * (I * tr(fvc::grad(D)))));
28 volSymmTensorField& sigmaD = sigmaDPtr_();
29 
30 // gradD is used in the tractionDisplacement BC
31 gradDPtr_.reset(
32  new volTensorField(
33  IOobject(
34  "gradD",
35  runTime.timeName(),
36  mesh,
37  IOobject::NO_READ,
38  IOobject::NO_WRITE),
39  fvc::grad(D)));
40 
41 Info << "Calculating explicit part of div(sigma) divSigmaExp\n"
42  << endl;
43 divSigmaExpPtr_.reset(
44  new volVectorField(
45  IOobject(
46  "divSigmaExp",
47  runTime.timeName(),
48  mesh,
49  IOobject::NO_READ,
50  IOobject::NO_WRITE),
51  fvc::div(sigmaD)));
52 volVectorField& divSigmaExp = divSigmaExpPtr_();
53 
54 if (compactNormalStress_)
55 {
56  divSigmaExp -= fvc::laplacian(2 * muPtr_() + lambdaPtr_(), D, "laplacian(DD,D)");
57 }
58 else
59 {
60  divSigmaExp -= fvc::div((2 * muPtr_() + lambdaPtr_()) * fvc::grad(D), "div(sigmaD)");
61 }
62 
63 mesh.setFluxRequired(D.name());
divSigmaExp
volVectorField & divSigmaExp
Definition: createRefsSolidDisplacement.H:11
readMechanicalPropertiesSolidDisplacement.H
D
volVectorField & D
Definition: createRefsSolidDisplacement.H:8
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
sigmaD
volSymmTensorField & sigmaD
Definition: createRefsSolidDisplacement.H:9
runTime
Time & runTime
Definition: createRefsHeatTransfer.H:1