diff --git a/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C index f8b206c57..b66a430df 100644 --- a/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C +++ b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C @@ -46,7 +46,7 @@ ersPointSource::ersPointSource alpha_(readScalar(dict.lookup("alpha"))), direction_(dict.lookup("direction")) { - q() = -alpha_*qmax_*min(direction_ & p.Sf()/p.magSf(), 0.0); + q() = -alpha_*qmax_*min(direction_ & p.Sf()/p.magSf(), scalar(0)); } diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/contactStressFoam/contactPatchPair.C b/applications/solvers/solidMechanics/deprecatedSolvers/contactStressFoam/contactPatchPair.C index 4804383a1..2af8a4675 100644 --- a/applications/solvers/solidMechanics/deprecatedSolvers/contactStressFoam/contactPatchPair.C +++ b/applications/solvers/solidMechanics/deprecatedSolvers/contactStressFoam/contactPatchPair.C @@ -30,18 +30,10 @@ Description #include "contactPatchPair.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from components -contactPatchPair::contactPatchPair + Foam::contactPatchPair::contactPatchPair ( const fvMesh& m, const label master, @@ -75,6 +67,4 @@ contactPatchPair::contactPatchPair {} -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/newContactStressFoam/contactPatchPair.C b/applications/solvers/solidMechanics/deprecatedSolvers/newContactStressFoam/contactPatchPair.C index 9e5cf7992..59a70f0e4 100644 --- a/applications/solvers/solidMechanics/deprecatedSolvers/newContactStressFoam/contactPatchPair.C +++ b/applications/solvers/solidMechanics/deprecatedSolvers/newContactStressFoam/contactPatchPair.C @@ -302,7 +302,7 @@ void Foam::contactPatchPair::correct ( slavePressure ), - 0.0 + scalar(0) ); // Calculate master traction, using the positive part of diff --git a/applications/solvers/solidMechanics/elasticAcpSolidFoam/updateCrack.H b/applications/solvers/solidMechanics/elasticAcpSolidFoam/updateCrack.H index 50bb49ddd..a9f4c0b83 100644 --- a/applications/solvers/solidMechanics/elasticAcpSolidFoam/updateCrack.H +++ b/applications/solvers/solidMechanics/elasticAcpSolidFoam/updateCrack.H @@ -6,13 +6,15 @@ nCoupledFacesToBreak = 0; // scalarField effTraction = // cohesiveZone.internalField() * // mag(traction.internalField()); - scalarField normalTraction = - cohesiveZone.internalField() * - ( n.internalField() & traction.internalField() ); - normalTraction = max(normalTraction, 0.0); // only consider tensile tractions - scalarField shearTraction = - cohesiveZone.internalField() * - mag( (I - Foam::sqr(n.internalField())) & traction.internalField() ); + scalarField normalTraction = + cohesiveZone.internalField()* + ( n.internalField() & traction.internalField() ); + + // only consider tensile tractions + normalTraction = max(normalTraction, scalar(0)); + scalarField shearTraction = + cohesiveZone.internalField() * + mag( (I - Foam::sqr(n.internalField())) & traction.internalField() ); // the traction fraction is monitored to decide which faces to break: // ie (tN/tNC)^2 + (tS/tSC)^2 >1 to crack a face @@ -27,16 +29,18 @@ nCoupledFacesToBreak = 0; scalarField effTractionFraction(normalTraction.size(), 0.0); if(cohesivePatchUPtr) - { - effTractionFraction = - (normalTraction/sigmaMaxI)*(normalTraction/sigmaMaxI) + (shearTraction/tauMaxI)*(shearTraction/tauMaxI); - } + { + effTractionFraction = + (normalTraction/sigmaMaxI)*(normalTraction/sigmaMaxI) + + (shearTraction/tauMaxI)*(shearTraction/tauMaxI); + } else - { - // solidCohesiveFixedModeMix only uses sigmaMax - effTractionFraction = - (normalTraction/sigmaMaxI)*(normalTraction/sigmaMaxI) + (shearTraction/sigmaMaxI)*(shearTraction/sigmaMaxI); - } + { + // solidCohesiveFixedModeMix only uses sigmaMax + effTractionFraction = + (normalTraction/sigmaMaxI)*(normalTraction/sigmaMaxI) + + (shearTraction/sigmaMaxI)*(shearTraction/sigmaMaxI); + } maxEffTractionFraction = gMax(effTractionFraction); SLList