This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/solidMechanics/viscoElasticSolidFoam/createFields.H

116 lines
2.6 KiB
C

Info<< "Reading displacement increment field DU\n" << endl;
volVectorField DU
(
IOobject
(
"DU",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volTensorField gradDU = fvc::grad(DU);
// gradDU.checkOut();
// gradDU.checkIn();
Info<< "Reading velocity increment field DV\n" << endl;
volVectorField DV
(
IOobject
(
"DV",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedVector("zero", dimVelocity, vector::zero)
);
Info<< "Reading stress increment field DSigma\n" << endl;
volSymmTensorField DSigma
(
IOobject
(
"DSigma",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
);
Info<< "Reading strain increment field Depsilon\n" << endl;
volSymmTensorField Depsilon
(
IOobject
(
"Depsilon",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
);
Info<< "Reading accumulated displacement field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedVector("zero", dimLength, vector::zero)
);
Info<< "Reading stress field sigma\n" << endl;
volSymmTensorField sigma
(
IOobject
(
"sigma",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
);
Info<< "Reading stress increment field DSigmaCorr\n" << endl;
volSymmTensorField DSigmaCorr
(
IOobject
(
"DSigmaCorr",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
);
constitutiveModel rheology(sigma, DU);
volScalarField rho = rheology.rho();