1 if (runTime.outputTime())
3 volScalarField epsilonEq
13 sqrt((2.0/3.0)*magSqr(dev(epsilon)))
16 Info<< "Max epsilonEq = " << max(epsilonEq).value()
19 volScalarField sigmaEq
29 sqrt((3.0/2.0)*magSqr(dev(sigma)))
32 Info<< "Max sigmaEq = " << max(sigmaEq).value()
35 pointMesh pMesh(mesh);
36 pointScalarField contactPointGap
47 dimensionedScalar("zero", dimless, 0.0)
50 forAll(mesh.boundary(), patchi)
52 if(DU.boundaryField()[patchi].type() == solidContactFvPatchVectorField::typeName)
54 const solidContactFvPatchVectorField& DUpatch =
55 refCast<const solidContactFvPatchVectorField>
56 (DU.boundaryField()[patchi]);
60 const labelList& meshPoints = mesh.boundaryMesh()[patchi].meshPoints();
61 const scalarField gap = DUpatch.normalContactModelPtr()->slaveContactPointGap();
62 forAll(meshPoints, pointi)
64 contactPointGap[meshPoints[pointi]] = gap[pointi];
72 /* forAll(mesh.boundary(), patchi)
74 Info << "Patch " << mesh.boundary()[patchi].name() << endl;
75 vectorField totalForce = mesh.Sf().boundaryField()[patchi] & sigma.boundaryField()[patchi];
77 vector force = sum( totalForce );
78 Info << "\ttotal force is " << force << " N" << endl;
80 tensorField F = I + gradDU.boundaryField()[patchi];
81 tensorField Finv = inv(F);
82 //vectorField nCurrent = Finv & n.boundaryField()[patchi];
83 //nCurrent /= mag(nCurrent);
84 //scalar normalForce = sum( nCurrent & totalForce );
85 scalar normalForce = sum( n.boundaryField()[patchi] & totalForce );
86 Info << "\tnormal force is " << normalForce << " N" << endl;
87 //scalar shearForce = mag(sum( (I - sqr(nCurrent)) & totalForce ));
88 scalar shearForce = mag(sum( (I - sqr(n.boundaryField()[patchi])) & totalForce ));
89 Info << "\tshear force is " << shearForce << " N" << endl;
91 // if(mesh.boundary()[patchi].type() != "empty")
93 // vector Sf0 = Sf.boundaryField()[patchi][0];
94 // symmTensor sigma0 = sigma.boundaryField()[patchi][0];
95 // Info << "sigmab[0] is " << sigma0 << nl
96 // << "Sfb is " << Sf0 << nl
97 // << "force is " << (Sf.boundaryField()[patchi][0]&sigma.boundaryField()[patchi][0]) << nl
98 // << "Sfx*sigmaxx " << (Sf0[vector::X]*sigma0[symmTensor::XX]) << nl
99 // << "Sfy*sigmaxy " << (Sf0[vector::Y]*sigma0[symmTensor::XY]) << nl
100 // << "Sfx*sigmayx " << (Sf0[vector::X]*sigma0[symmTensor::XY]) << nl
101 // << "Sfy*sigmayy " << (Sf0[vector::Y]*sigma0[symmTensor::YY]) << nl
103 //vector SfTL(-0.000137451, 0.00383599, -4.76878e-20);
104 // vector SfTL = Finv[0] & vector(0,0.004,0);
105 // Info << "SfTLx*sigmaxx " << (SfTL[vector::X]*sigma0[symmTensor::XX]) << nl
106 // << "SfTLy*sigmaxy " << (SfTL[vector::Y]*sigma0[symmTensor::XY]) << nl
107 // << "SfTLx*sigmayx " << (SfTL[vector::X]*sigma0[symmTensor::XY]) << nl
108 // << "SfTLy*sigmayy " << (SfTL[vector::Y]*sigma0[symmTensor::YY]) << nl