2 if (runTime.outputTime() || topoChange)
14 sqrt((3.0/2.0)*magSqr(dev(sigma)))
17 Info<< "Max sigmaEq = " << max(sigmaEq).value()
20 volScalarField epsilonEq
30 sqrt((2.0/3.0)*magSqr(dev(epsilon)))
33 Info<< "Max epsilonEq = " << max(epsilonEq).value()
36 // Info << "\nCalculate maximal principal stress ..." << flush;
37 // // Principal stresses
38 // volVectorField sigmaMax
43 // runTime.timeName(),
46 // IOobject::AUTO_WRITE
49 // dimensionedVector("sigmaMax", dimPressure, vector::zero)
51 // vectorField& sigmaMaxI = sigmaMax.internalField();
53 // forAll (sigmaMaxI, cellI)
55 // vector eValues = eigenValues(sigma.internalField()[cellI]);
56 // tensor eVectors = eigenVectors(sigma.internalField()[cellI]);
58 // scalar maxEValue = 0;
62 // if (eValues[i] > maxEValue)
64 // maxEValue = eValues[i];
73 // sigmaMaxI[cellI] = eVectors.x()*eValues.x();
75 // else if (iMax == 1)
77 // sigmaMaxI[cellI] = eVectors.y()*eValues.y();
79 // else if (iMax == 2)
81 // sigmaMaxI[cellI] = eVectors.z()*eValues.z();
86 // //- boundary traction
87 // volVectorField tractionBoundary
91 // "tractionBoundary",
92 // runTime.timeName(),
95 // IOobject::AUTO_WRITE
98 // dimensionedVector("zero", dimForce/dimArea, vector::zero)
100 // surfaceVectorField n = mesh.Sf()/mesh.magSf();
101 // forAll(tractionBoundary.boundaryField(), patchi)
103 // if(mesh.boundaryMesh()[patchi].type() != processorPolyPatch::typeName)
105 // tractionBoundary.boundaryField()[patchi] =
106 // n.boundaryField()[patchi] & sigma.boundaryField()[patchi];
111 //- cohesive damage and cracking, and GII and GII
112 volScalarField damageAndCracks
123 dimensionedScalar("zero", dimless, 0.0),
124 calculatedFvPatchVectorField::typeName
138 dimensionedScalar("zero", dimless, 0.0),
139 calculatedFvPatchVectorField::typeName
153 dimensionedScalar("zero", dimless, 0.0),
154 calculatedFvPatchVectorField::typeName
157 forAll(DU.boundaryField(), patchi)
159 // if(DU.boundaryField()[patchi].type() == cohesiveLawMultiMatFvPatchVectorField::typeName)
160 if(DU.boundaryField()[patchi].type() == solidCohesiveFvPatchVectorField::typeName)
162 // cohesiveLawMultiMatFvPatchVectorField& DUpatch =
163 // refCast<cohesiveLawMultiMatFvPatchVectorField>(DU.boundaryField()[patchi]);
164 solidCohesiveFvPatchVectorField& DUpatch =
165 refCast<solidCohesiveFvPatchVectorField>(DU.boundaryField()[patchi]);
167 GI.boundaryField()[patchi] = DUpatch.GI();
168 GII.boundaryField()[patchi] = DUpatch.GII();
169 damageAndCracks.boundaryField()[patchi] = DUpatch.crackingAndDamage();
173 //Info << "done" << endl;