db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
54 lines
976 B
C
54 lines
976 B
C
Info<< "Reading displacement field D\n" << endl;
|
|
volVectorField D
|
|
(
|
|
IOobject
|
|
(
|
|
"D",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
Info<< "Reading/setting displacement correction field Dcorr\n" << endl;
|
|
volVectorField Dcorr
|
|
(
|
|
IOobject
|
|
(
|
|
"Dcorr",
|
|
runTime.timeName(),
|
|
mesh
|
|
),
|
|
D
|
|
);
|
|
Dcorr *= 0.0;
|
|
|
|
Info<< "Calculating stress field sigmaD\n" << endl;
|
|
volSymmTensorField sigmaD
|
|
(
|
|
IOobject
|
|
(
|
|
"sigmaD",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
mu*twoSymm(fvc::grad(D)) + (lambda*I)*tr(fvc::grad(D))
|
|
);
|
|
|
|
volTensorField sigmaExp
|
|
(
|
|
IOobject
|
|
(
|
|
"sigmaExp",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
(lambda - mu)*fvc::grad(Dcorr) + mu*fvc::grad(Dcorr)().T()
|
|
+ (lambda*I)*tr(fvc::grad(Dcorr))
|
|
);
|