Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
solvers
stressAnalysis
solidDisplacementFoam
createFields.H
Go to the documentation of this file.
1
Info
<<
"Reading field D\n"
<<
endl
;
2
volVectorField
D
3
(
4
IOobject
5
(
6
"D"
,
7
runTime.timeName(),
8
mesh
,
9
IOobject::MUST_READ,
10
IOobject::AUTO_WRITE
11
),
12
mesh
13
);
14
15
16
autoPtr<volScalarField>
Tptr
(NULL);
17
18
if
(thermalStress)
19
{
20
Info
<<
"Reading field T\n"
<<
endl
;
21
Tptr
.reset
22
(
23
new
volScalarField
24
(
25
IOobject
26
(
27
"T"
,
28
runTime.timeName(),
29
mesh
,
30
IOobject::MUST_READ,
31
IOobject::AUTO_WRITE
32
),
33
mesh
34
)
35
);
36
}
37
38
39
Info
<<
"Calculating stress field sigmaD\n"
<<
endl
;
40
volSymmTensorField
sigmaD
41
(
42
IOobject
43
(
44
"sigmaD"
,
45
runTime.timeName(),
46
mesh
,
47
IOobject::NO_READ,
48
IOobject::NO_WRITE
49
),
50
mu
*
twoSymm
(
fvc::grad
(D)) + lambda*(
I
*
tr
(
fvc::grad
(D)))
51
);
52
53
Info
<<
"Calculating explicit part of div(sigma) divSigmaExp\n"
<<
endl
;
54
volVectorField
divSigmaExp
55
(
56
IOobject
57
(
58
"divSigmaExp"
,
59
runTime.timeName(),
60
mesh
,
61
IOobject::NO_READ,
62
IOobject::NO_WRITE
63
),
64
fvc::div
(sigmaD)
65
);
66
67
if
(
compactNormalStress
)
68
{
69
divSigmaExp -=
fvc::laplacian
(2*
mu
+ lambda, D,
"laplacian(DD,D)"
);
70
}
71
else
72
{
73
divSigmaExp -=
fvc::div
((2*
mu
+ lambda)*
fvc::grad
(D),
"div(sigmaD)"
);
74
}
75
76
// ************************ vim: set sw=4 sts=4 et: ************************ //