Remove trailing whitespace systematically
This commit is contained in:
parent
dd542da6e1
commit
c458150bfc
293 changed files with 1301 additions and 1301 deletions
|
@ -7,19 +7,19 @@ then
|
|||
echo "Error: Current directory is not \$WM_PROJECT_DIR"
|
||||
echo " The environment variables are not consistent with the installation."
|
||||
echo " Please source configuration files."
|
||||
echo
|
||||
echo
|
||||
echo "Examples:"
|
||||
echo " bash: . etc/bashrc"
|
||||
echo " tcsh: source etc/cshrc"
|
||||
echo
|
||||
echo " If you sourced the configuration files, please check the 'foamInstall' entry."
|
||||
echo
|
||||
echo " If you sourced the configuration files, please check the 'foamInstall' entry."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$PARAVIEW_SYSTEM" ] && [ -z "$QT_BIN_DIR" ]
|
||||
then
|
||||
echo
|
||||
echo
|
||||
echo "\$QT_BIN_DIR not set. To compile Paraview from sources"
|
||||
echo "the command \$QT_BIN_DIR/qmake needs to be valid."
|
||||
echo
|
||||
|
@ -27,13 +27,13 @@ then
|
|||
echo " Ubuntu: \"export QT_BIN_DIR=/usr/bin\""
|
||||
echo " Fedora: \"export QT_BIN_DIR=/usr/lib64/qt4/bin\""
|
||||
echo " openSuse: \"export QT_BIN_DIR=/usr/bin\""
|
||||
echo
|
||||
echo
|
||||
read -r -p "Proceed without compiling ParaView [Y/n] " response
|
||||
if [[ $response =~ ^([nN][oO]|[nN])$ ]]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether we will be compiling cudaSolvers
|
||||
if [ -f $CUDA_BIN_DIR/nvcc ]
|
||||
|
@ -43,12 +43,12 @@ then
|
|||
echo "cudaSolvers will be compiled by default."
|
||||
echo
|
||||
|
||||
# If yes, check presence of $CUDA_ARCH
|
||||
# If yes, check presence of $CUDA_ARCH
|
||||
if [ -z "$CUDA_ARCH" ]
|
||||
then
|
||||
echo
|
||||
echo "\$CUDA_ARCH is required by nvcc compiler but not set."
|
||||
echo "Check section '-gpu-architecture' in 'man nvcc' for details."
|
||||
echo "Check section '-gpu-architecture' in 'man nvcc' for details."
|
||||
echo
|
||||
read -r -p "Proceed without compiling cudaSolvers? [Y/n] " response
|
||||
if [[ $response =~ ^([nN][oO]|[nN])$ ]]
|
||||
|
|
|
@ -16,7 +16,7 @@ Contents:
|
|||
|
||||
* List of Contributors
|
||||
|
||||
(If your name is missing in the list, please contact the maintainers at
|
||||
(If your name is missing in the list, please contact the maintainers at
|
||||
and it will be added asap.)
|
||||
|
||||
Henry Weller
|
||||
|
|
|
@ -3,7 +3,7 @@ EXE_INC = \
|
|||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
|
|
|
@ -3,7 +3,7 @@ EXE_INC = \
|
|||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
|
|
|
@ -3,7 +3,7 @@ EXE_INC = \
|
|||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
|
|
|
@ -4,8 +4,8 @@ set -x
|
|||
|
||||
wmake libso conjugateHeatTransfer
|
||||
|
||||
wmake blockCoupledScalarTransportFoam
|
||||
wmake blockCoupledScalarTransportFoam
|
||||
wmake conjugateHeatFoam
|
||||
wmake conjugateHeatSimpleFoam
|
||||
wmake conjugateHeatSimpleFoam
|
||||
wmake pUCoupledFoam
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
}
|
||||
|
||||
// Force recalculation of weights
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
}
|
||||
|
||||
// Force recalculation of weights
|
||||
solidMesh.surfaceInterpolation::movePoints();
|
||||
solidMesh.surfaceInterpolation::movePoints();
|
||||
}
|
||||
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
}
|
||||
|
||||
// Force recalculation of weights
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
|
||||
// Density [kg/m^3]
|
||||
dimensionedScalar rho(laminarTransport.lookup("rho"));
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
conjugateHeatSimpleFoam.C
|
||||
conjugateHeatSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/conjugateHeatSimpleFoam
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
}
|
||||
|
||||
// Force recalculation of weights
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
}
|
||||
|
||||
// Force recalculation of weights
|
||||
solidMesh.surfaceInterpolation::movePoints();
|
||||
solidMesh.surfaceInterpolation::movePoints();
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
|
||||
// Force recalculation of weights
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
}
|
||||
/*
|
||||
{
|
||||
|
@ -33,6 +33,6 @@
|
|||
}
|
||||
|
||||
// Force recalculation of weights
|
||||
solidMesh.surfaceInterpolation::movePoints();
|
||||
solidMesh.surfaceInterpolation::movePoints();
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
|
||||
// Density [kg/m^3]
|
||||
dimensionedScalar rho(laminarTransport.lookup("rho"));
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
thermalModel/thermalModel.C
|
||||
thermalLaws = thermalModel/thermalLaws
|
||||
|
||||
$(thermalLaws)/thermalLaw/thermalLaw.C
|
||||
$(thermalLaws)/thermalLaw/thermalLaw.C
|
||||
$(thermalLaws)/thermalLaw/newThermalLaw.C
|
||||
$(thermalLaws)/constantThermal/constantThermal.C
|
||||
$(thermalLaws)/multiMaterialThermal/multiMaterialThermal.C
|
||||
|
@ -9,7 +9,7 @@ $(thermalLaws)/multiMaterialZonesThermal/multiMaterialZonesThermal.C
|
|||
|
||||
thermalGaps = thermalModel/thermalGaps
|
||||
|
||||
$(thermalGaps)/thermalGap/thermalGap.C
|
||||
$(thermalGaps)/thermalGap/thermalGap.C
|
||||
$(thermalGaps)/thermalGap/newThermalGap.C
|
||||
$(thermalGaps)/constantThermalGap/constantThermalGap.C
|
||||
$(thermalGaps)/constantResistanceThermalGap/constantResistanceThermalGap.C
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
}
|
||||
|
||||
// Force recalculation of weights
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
mesh.surfaceInterpolation::movePoints();
|
||||
}
|
||||
|
|
|
@ -82,11 +82,11 @@ Foam::heatFlux::~heatFlux()
|
|||
|
||||
void Foam::heatFlux::calcAndPrint()
|
||||
{
|
||||
const volScalarField& T =
|
||||
const volScalarField& T =
|
||||
obr_.lookupObject<volScalarField>("T");
|
||||
const volScalarField& kappaEff =
|
||||
const volScalarField& kappaEff =
|
||||
obr_.lookupObject<volScalarField>(Kfluid_);
|
||||
//const surfaceScalarField& kappaEff =
|
||||
//const surfaceScalarField& kappaEff =
|
||||
// obr_.lookupObject<surfaceScalarField>(Kfluid_);
|
||||
|
||||
scalar rho = 1.2;
|
||||
|
@ -103,8 +103,8 @@ void Foam::heatFlux::calcAndPrint()
|
|||
//const surfaceScalarField::GeometricBoundaryField& patchHeatFluxD =
|
||||
// heatFluxC.boundaryField();
|
||||
|
||||
//surfaceScalarField::GeometricBoundaryField patchHeatFluxC =
|
||||
|
||||
//surfaceScalarField::GeometricBoundaryField patchHeatFluxC =
|
||||
|
||||
scalar sumConduction = 0.0;
|
||||
scalar sumConvection = 0.0;
|
||||
scalar sumRadiation = 0.0;
|
||||
|
@ -143,7 +143,7 @@ void Foam::heatFlux::calcAndPrint()
|
|||
|
||||
if(obr_.foundObject<surfaceScalarField>("phi"))
|
||||
{
|
||||
const surfaceScalarField& phi =
|
||||
const surfaceScalarField& phi =
|
||||
obr_.lookupObject<surfaceScalarField>("phi");
|
||||
|
||||
convection = gSum
|
||||
|
|
|
@ -213,9 +213,9 @@ chtRcThermalDiffusivityFvPatchScalarField::calcThermalDiffusivity
|
|||
|
||||
//Info << "Qr = " << Qr << endl;
|
||||
//Info << "kOwn + kNei = " << (kOwn + kNei) << endl;
|
||||
|
||||
|
||||
//Info << "k = " << k << endl;
|
||||
|
||||
|
||||
k = kOwn*(TwOwn*(kNei*(TcNei - TcOwn) + Qr + fourQro) - TcOwn*fourQro);
|
||||
k /= stabilise((fourQro + TwOwn*(kOwn + kNei))*(TcNei - TcOwn), SMALL);
|
||||
k /= p.deltaCoeffs();
|
||||
|
|
|
@ -260,7 +260,7 @@ chtRcThermalDiffusivityResistanceFvPatchScalarField::calcThermalDiffusivity
|
|||
k /= stabilise(TcOwn - TcNei, SMALL)*p.deltaCoeffs();
|
||||
*/
|
||||
|
||||
// Expression is equivalent to the one above
|
||||
// Expression is equivalent to the one above
|
||||
k = kOwn*
|
||||
(
|
||||
TwOwn*
|
||||
|
|
|
@ -25,7 +25,7 @@ Class
|
|||
regionCouplingResistanceFvPatchField
|
||||
|
||||
Description
|
||||
Region couple patch field jump resistance on the surface taking
|
||||
Region couple patch field jump resistance on the surface taking
|
||||
radiation into account
|
||||
|
||||
Author
|
||||
|
|
|
@ -85,7 +85,7 @@ controlledParabolicVelocityFvPatchVectorField::controlledParabolicVelocityFvPatc
|
|||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
Umean_(readScalar(dict.lookup("Umean"))),
|
||||
n_(dict.lookup("n")),
|
||||
n_(dict.lookup("n")),
|
||||
y_(dict.lookup("y")),
|
||||
target_(readScalar(dict.lookup("target"))),
|
||||
obsFieldName_(dict.lookup("obsFieldName")),
|
||||
|
@ -168,7 +168,7 @@ void controlledParabolicVelocityFvPatchVectorField::updateCoeffs()
|
|||
const vectorField& c = patch().Cf();
|
||||
|
||||
// Calculate local 1-D coordinate for the parabolic profile
|
||||
scalarField coord =
|
||||
scalarField coord =
|
||||
0.5 - ((c - ctr) & y_)/((bb.max() - bb.min()) & y_);
|
||||
|
||||
operator==(n_*3/2*Umean_*(1.0 - sqr(coord)));
|
||||
|
|
|
@ -58,7 +58,7 @@ class controlledParabolicVelocityFvPatchVectorField
|
|||
{
|
||||
// Private data
|
||||
|
||||
//- Volumetric flow rate
|
||||
//- Volumetric flow rate
|
||||
scalar Umean_;
|
||||
|
||||
//- Flow direction
|
||||
|
|
|
@ -204,7 +204,7 @@ void Foam::extendedWallHeatTransferFvPatchScalarField::write(Ostream& os) const
|
|||
|
||||
os << nl << indent << "radiationSources" << nl
|
||||
<< indent << token::BEGIN_LIST << incrIndent << nl;
|
||||
|
||||
|
||||
forAll(radSources_, rsI)
|
||||
{
|
||||
os << indent << radSources_[rsI].name() << nl
|
||||
|
|
|
@ -27,7 +27,7 @@ Class
|
|||
Description
|
||||
helper class to sum up external radiation sources
|
||||
|
||||
|
||||
|
||||
SourceFiles
|
||||
viewFactorRadiation.C
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Class
|
|||
Description
|
||||
helper class to sum up external radiation sources
|
||||
|
||||
|
||||
|
||||
SourceFiles
|
||||
ersConstantFlux.C
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Class
|
|||
Description
|
||||
helper class to sum up external radiation sources
|
||||
|
||||
|
||||
|
||||
SourceFiles
|
||||
ersPlaneToCylinder.C
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Class
|
|||
Description
|
||||
helper class to sum up external radiation sources
|
||||
|
||||
|
||||
|
||||
SourceFiles
|
||||
ersPointSource.C
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Class
|
|||
Description
|
||||
helper class to sum up external radiation sources
|
||||
|
||||
|
||||
|
||||
SourceFiles
|
||||
ersViewFactor.C
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Class
|
|||
Description
|
||||
Virtual base class for external radiation sources
|
||||
|
||||
|
||||
|
||||
SourceFiles
|
||||
externalRadiationSource.C
|
||||
|
||||
|
|
|
@ -75,14 +75,14 @@ protected:
|
|||
|
||||
// Protected member functions
|
||||
|
||||
//- Check that the laws and the material field are okay
|
||||
//- Check that the laws and the material field are okay
|
||||
void readLaws
|
||||
(
|
||||
const volScalarField& T,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Check that the laws and the material field are okay
|
||||
//- Check that the laws and the material field are okay
|
||||
void checkLaws() const;
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
pUCoupledFoam.C
|
||||
pUCoupledFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/pUCoupledFoam
|
||||
|
|
|
@ -12,4 +12,4 @@ EXE_LIBS = \
|
|||
-lfiniteVolume \
|
||||
-llduSolvers \
|
||||
-lVectorN
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
equationReaderDemo.C
|
||||
equationReaderDemo.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/equationReaderDemo
|
||||
|
|
|
@ -3,18 +3,18 @@
|
|||
// We could try addSource(runTime), but since runTime.name()
|
||||
// constantly changes, we assign it our own name:
|
||||
eqns.scalarSources().addSource(runTime.value(), "t", dimTime);
|
||||
|
||||
|
||||
// Add mesh coordinates (cell centres) gives variable names:
|
||||
// C.x, C.y, C.z
|
||||
eqns.vectorSources().addSource(mesh.C());
|
||||
|
||||
|
||||
// Add mesh volumes
|
||||
eqns.scalarSources().addSource(mesh.V());
|
||||
|
||||
|
||||
// Add simpleFoam's existing variables
|
||||
eqns.scalarSources().addSource(p);
|
||||
eqns.vectorSources().addSource(U);
|
||||
|
||||
|
||||
// Adding a "derived" variable - one that exists only temporarily e.g.:
|
||||
// turbulence->R() - since it does not permanently exist, this won't
|
||||
// work:
|
||||
|
@ -49,18 +49,18 @@
|
|||
);
|
||||
|
||||
eqns.addSource(equationDict);
|
||||
|
||||
|
||||
// Generic sources for demo purposes:
|
||||
|
||||
|
||||
// Scalars
|
||||
scalar sA(1.0);
|
||||
scalar sB(2.0);
|
||||
scalar sC(3.0);
|
||||
|
||||
|
||||
eqns.scalarSources().addSource(sA, "sA");
|
||||
eqns.scalarSources().addSource(sB, "sB");
|
||||
eqns.scalarSources().addSource(sC, "sC");
|
||||
|
||||
|
||||
// Dimensioned scalars
|
||||
dimensionedScalar dsA("dsA", dimless, 4.0);
|
||||
dimensionedScalar dsB("dsB", dimless, 5.0);
|
||||
|
@ -131,7 +131,7 @@
|
|||
eqns.vectorSources().addSource(vA, "vA");
|
||||
eqns.vectorSources().addSource(vB, "vB");
|
||||
eqns.vectorSources().addSource(vC, "vC");
|
||||
|
||||
|
||||
dimensionedVector dvA("dvA", dimless, vector(400.0, 400.0, 400.0));
|
||||
dimensionedVector dvB("dvB", dimless, vector(500.0, -500.0, 500.0));
|
||||
dimensionedVector dvC("dvC", dimless, vector(600.0, 600.0, -600.0));
|
||||
|
@ -382,7 +382,7 @@
|
|||
eqns.readEquation(equationDict, "dsOut");
|
||||
eqns.readEquation(equationDict, "dsfOut");
|
||||
eqns.readEquation(equationDict, "volSfOut");
|
||||
|
||||
|
||||
// vector equations
|
||||
eqns.readEquation(equationDict, "vOut.x");
|
||||
eqns.readEquation(equationDict, "vOut.y");
|
||||
|
@ -396,7 +396,7 @@
|
|||
eqns.readEquation(equationDict, "volVfOut.x");
|
||||
eqns.readEquation(equationDict, "volVfOut.y");
|
||||
eqns.readEquation(equationDict, "volVfOut.z");
|
||||
|
||||
|
||||
// tensor equations
|
||||
eqns.readEquation(equationDict, "tOut.xx");
|
||||
eqns.readEquation(equationDict, "tOut.xy");
|
||||
|
@ -449,7 +449,7 @@
|
|||
IOobject::AUTO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// scalars
|
||||
scalar scalarOut;
|
||||
dimensionedScalar dimensionedScalarOut
|
||||
|
|
|
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
|
|||
// Only necessary if we revisit the same solver domain twice in the same
|
||||
// superLoop (scalarTransportFoam, in this case)
|
||||
multiRun++;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * icoFoam2 * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info << "*** Switching to icoFoam2 ***\n" << endl;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
volScalarField rUA = 1.0/UEqn.A();
|
||||
|
||||
U = rUA*UEqn.H();
|
||||
phi = (fvc::interpolate(U) & mesh.Sf())
|
||||
phi = (fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, U, phi);
|
||||
|
||||
adjustPhi(phi, U, p);
|
||||
|
|
|
@ -22,7 +22,7 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
|
|
|
@ -25,7 +25,7 @@ Class
|
|||
contactPatchPair
|
||||
|
||||
Description
|
||||
|
||||
|
||||
SourceFiles
|
||||
contactPatchPair.C
|
||||
contactPatchPairSlavePressure.C
|
||||
|
|
|
@ -22,7 +22,7 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "contactPatchPair.H"
|
||||
|
|
|
@ -22,7 +22,7 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "contactPatchPair.H"
|
||||
|
|
|
@ -25,7 +25,7 @@ Application
|
|||
stressedFoam
|
||||
|
||||
Description
|
||||
Transient/steady-state solver of linear-elastic, small-strain deformation
|
||||
Transient/steady-state solver of linear-elastic, small-strain deformation
|
||||
of solid bodies in contact.
|
||||
|
||||
Simple linear elasticity structural analysis code.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tractionDisplacement/tractionDisplacementFvPatchVectorField.C
|
||||
icoFsiFoam.C
|
||||
icoFsiFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/icoFsiFoam
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
// Setting mesh motion
|
||||
|
||||
pointVectorField solidPointsDispl =
|
||||
pointVectorField solidPointsDispl =
|
||||
cpi.interpolate(Usolid - Usolid.oldTime());
|
||||
|
||||
vectorField newPoints =
|
||||
stressMesh.points()
|
||||
stressMesh.points()
|
||||
+ solidPointsDispl.internalField();
|
||||
|
||||
stressMesh.movePoints(newPoints);
|
||||
|
@ -28,8 +28,8 @@
|
|||
|
||||
# include "volContinuity.H"
|
||||
|
||||
Info << "Motion magnitude: mean = "
|
||||
Info << "Motion magnitude: mean = "
|
||||
<< average(mag(Usolid.boundaryField()[solidPatchID]))
|
||||
<< " max = "
|
||||
<< " max = "
|
||||
<< max(mag(Usolid.boundaryField()[solidPatchID])) << endl;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
);
|
||||
|
||||
solidPatchPressure *= rhoFluid.value();
|
||||
|
||||
|
||||
tForce.pressure() = solidPatchPressure;
|
||||
|
||||
|
||||
|
@ -20,6 +20,6 @@
|
|||
mesh.Sf().boundaryField()[fluidPatchID]
|
||||
);
|
||||
|
||||
|
||||
|
||||
Info << "Total pressure force = " << totalPressureForce << endl;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ $(rheologyLaws)/PronyViscoelastic/PronyViscoelastic.C
|
|||
thermalModel/thermalModel.C
|
||||
thermalLaws = thermalModel/thermalLaws
|
||||
|
||||
$(thermalLaws)/thermalLaw/thermalLaw.C
|
||||
$(thermalLaws)/thermalLaw/thermalLaw.C
|
||||
$(thermalLaws)/thermalLaw/newThermalLaw.C
|
||||
$(thermalLaws)/constantThermal/constantThermal.C
|
||||
$(thermalLaws)/multiMaterialThermal/multiMaterialThermal.C
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
DugdaleCohesiveLaw
|
||||
(
|
||||
const word& cohesiveLawName,
|
||||
const dictionary& dict
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
|
|
|
@ -73,7 +73,7 @@ Foam::autoPtr<Foam::cohesiveLaw> Foam::cohesiveLaw::New
|
|||
Foam::cohesiveLaw::cohesiveLaw
|
||||
(
|
||||
const word& cohesiveLawName,
|
||||
const dictionary& dict
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
cohesiveLawCoeffs_(dict.subDict(cohesiveLawName + "Coeffs")),
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
static autoPtr<cohesiveLaw> New
|
||||
(
|
||||
const word& cohesiveLawName,
|
||||
const dictionary& dict
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
cohesiveLaw
|
||||
(
|
||||
const word& cohesiveLawName,
|
||||
const dictionary& dict
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
//- Return cohesive law coefficients
|
||||
const dictionary& cohesiveLawCoeffs() const
|
||||
{
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
linearCohesiveLaw
|
||||
(
|
||||
const word& cohesiveLawName,
|
||||
const dictionary& dict
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
|
|
|
@ -170,7 +170,7 @@ public:
|
|||
{
|
||||
checkPatchFace(mesh);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//- Construct from dictionary
|
||||
componentReference
|
||||
|
|
|
@ -244,7 +244,7 @@ void cohesiveLawFvPatchVectorField::write(Ostream& os) const
|
|||
{
|
||||
fvPatchVectorField::write(os);
|
||||
traction_.writeEntry("traction", os);
|
||||
os.writeKeyword("cohesiveLaw") << law().type()
|
||||
os.writeKeyword("cohesiveLaw") << law().type()
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeKeyword("relaxationFactor") << relaxationFactor_
|
||||
<< token::END_STATEMENT << nl;
|
||||
|
|
|
@ -98,7 +98,7 @@ cohesiveZoneFvPatchVectorField::cohesiveZoneFvPatchVectorField
|
|||
{
|
||||
this->refValue() = vector::zero;
|
||||
}
|
||||
|
||||
|
||||
if (dict.found("refGradient"))
|
||||
{
|
||||
this->refGrad() = vectorField("refGradient", dict, p.size());
|
||||
|
@ -110,7 +110,7 @@ cohesiveZoneFvPatchVectorField::cohesiveZoneFvPatchVectorField
|
|||
|
||||
if (dict.found("valueFraction"))
|
||||
{
|
||||
this->valueFraction() =
|
||||
this->valueFraction() =
|
||||
symmTensorField("valueFraction", dict, p.size());
|
||||
}
|
||||
else
|
||||
|
@ -205,7 +205,7 @@ void cohesiveZoneFvPatchVectorField::updateCoeffs()
|
|||
const rheologyModel& rheology =
|
||||
this->db().objectRegistry::lookupObject<rheologyModel>(rheologyName_);
|
||||
|
||||
const scalarField mu =
|
||||
const scalarField mu =
|
||||
rheology.mu()().boundaryField()[patch().index()];
|
||||
|
||||
const scalarField lambda =
|
||||
|
@ -275,17 +275,17 @@ void cohesiveZoneFvPatchVectorField::updateCoeffs()
|
|||
|
||||
if(magSqr(valueFraction()[faceI]) < SMALL)
|
||||
{
|
||||
cohesiveTraction =
|
||||
relaxationFactor_*cohesiveTraction
|
||||
cohesiveTraction =
|
||||
relaxationFactor_*cohesiveTraction
|
||||
+ (1.0 - relaxationFactor_)*sigmaN[faceI]*n[faceI];
|
||||
|
||||
refGrad()[faceI] =
|
||||
(
|
||||
cohesiveTraction
|
||||
- (
|
||||
n[faceI]
|
||||
n[faceI]
|
||||
& (
|
||||
mu[faceI]*gradU[faceI].T()
|
||||
mu[faceI]*gradU[faceI].T()
|
||||
- (mu[faceI] + lambda[faceI])*gradU[faceI]
|
||||
)
|
||||
)
|
||||
|
@ -305,7 +305,7 @@ void cohesiveZoneFvPatchVectorField::write(Ostream& os) const
|
|||
directionMixedFvPatchVectorField::write(os);
|
||||
os.writeKeyword("U") << UName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("rheology") << rheologyName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("cohesiveLaw") << law().type()
|
||||
os.writeKeyword("cohesiveLaw") << law().type()
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeKeyword("relaxationFactor") << relaxationFactor_
|
||||
<< token::END_STATEMENT << nl;
|
||||
|
|
|
@ -173,7 +173,7 @@ public:
|
|||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
|
|
|
@ -106,7 +106,7 @@ Foam::tmp<Foam::volScalarField> Foam::BurgersViscoelastic::E(scalar t) const
|
|||
+ eta2_.value()/k2_.value();
|
||||
|
||||
scalar p2 = eta1_.value()*eta2_.value()/(k1_.value()*k2_.value());
|
||||
|
||||
|
||||
scalar q1 = eta1_.value();
|
||||
|
||||
scalar q2 = eta1_.value()*eta2_.value()/k2_.value();
|
||||
|
@ -119,7 +119,7 @@ Foam::tmp<Foam::volScalarField> Foam::BurgersViscoelastic::E(scalar t) const
|
|||
|
||||
E = (q1 - q2*r1)*exp(-r1*t)/A - (q1 - q2*r2)*exp(-r2*t)/A;
|
||||
}
|
||||
|
||||
|
||||
|
||||
tmp<volScalarField> tresult
|
||||
(
|
||||
|
@ -177,7 +177,7 @@ Foam::tmp<Foam::volScalarField> Foam::BurgersViscoelastic::J(scalar t) const
|
|||
|
||||
if(t >= 0)
|
||||
{
|
||||
J = 1.0/k1_.value()
|
||||
J = 1.0/k1_.value()
|
||||
+ (1 - exp(-k2_.value()*t/eta2_.value()))/k2_.value()
|
||||
+ t/eta1_.value();
|
||||
}
|
||||
|
|
|
@ -101,14 +101,14 @@ Foam::tmp<Foam::volScalarField> Foam::KelvinSLSViscoelastic::E(scalar t) const
|
|||
if(t>=0)
|
||||
{
|
||||
scalar p1 = eta2_.value()/(k1_.value() + k2_.value());
|
||||
|
||||
|
||||
scalar q0 = k1_.value()*k2_.value()/(k1_.value() + k2_.value());
|
||||
|
||||
scalar q1 = k1_.value()*eta2_.value()/(k1_.value() + k2_.value());
|
||||
|
||||
E = q0 + (q1/p1 - q0)*exp(-t/p1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
tmp<volScalarField> tresult
|
||||
(
|
||||
|
@ -167,7 +167,7 @@ Foam::tmp<Foam::volScalarField> Foam::KelvinSLSViscoelastic::J(scalar t) const
|
|||
if(t >= 0)
|
||||
{
|
||||
scalar p1 = eta2_.value()/(k1_.value() + k2_.value());
|
||||
|
||||
|
||||
scalar q0 = k1_.value()*k2_.value()/(k1_.value() + k2_.value());
|
||||
|
||||
scalar q1 = k1_.value()*eta2_.value()/(k1_.value() + k2_.value());
|
||||
|
|
|
@ -182,8 +182,8 @@ Foam::MaxwellElasticViscoelastic::J(scalar t) const
|
|||
mesh(),
|
||||
dimensionedScalar
|
||||
(
|
||||
"J",
|
||||
dimless/k_.dimensions(),
|
||||
"J",
|
||||
dimless/k_.dimensions(),
|
||||
1.0/k_.value() + t/eta_.value()
|
||||
),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
|
|
|
@ -100,7 +100,7 @@ Foam::tmp<Foam::volScalarField> Foam::MaxwellSLSViscoelastic::E(scalar t) const
|
|||
{
|
||||
E = k2_.value() + k1_.value()*exp(-k1_.value()*t/eta1_.value());
|
||||
}
|
||||
|
||||
|
||||
|
||||
tmp<volScalarField> tresult
|
||||
(
|
||||
|
|
|
@ -168,8 +168,8 @@ Foam::tmp<Foam::volScalarField> Foam::MaxwellViscoelastic::J(scalar t) const
|
|||
mesh(),
|
||||
dimensionedScalar
|
||||
(
|
||||
"J",
|
||||
dimless/k_.dimensions(),
|
||||
"J",
|
||||
dimless/k_.dimensions(),
|
||||
1.0/k_.value() + t/eta_.value()
|
||||
),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
|
|
|
@ -104,7 +104,7 @@ Foam::tmp<Foam::volScalarField> Foam::PronyViscoelastic::E(scalar t) const
|
|||
{
|
||||
E += k_[i]*exp(-t/tau_[i]);
|
||||
}
|
||||
|
||||
|
||||
if(t < 0)
|
||||
{
|
||||
E = 0;
|
||||
|
@ -161,7 +161,7 @@ Foam::tmp<Foam::volScalarField> Foam::PronyViscoelastic::nu(scalar t) const
|
|||
Foam::tmp<Foam::volScalarField> Foam::PronyViscoelastic::J(scalar t) const
|
||||
{
|
||||
notImplemented(type() + "::J(scalar t)");
|
||||
|
||||
|
||||
return 1.0/E(t);
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ Foam::contactPatchPair::contactPatchPair
|
|||
cp.mesh().boundaryMesh()[slavePatch_.index()], // to patch
|
||||
intersection::algorithmNames_.read(dict.lookup("projectionAlgo")),
|
||||
intersection::directionNames_.read(dict.lookup("projectionDir"))
|
||||
|
||||
|
||||
),
|
||||
slaveToMasterInterpolate_
|
||||
(
|
||||
|
@ -111,7 +111,7 @@ Foam::contactPatchPair::contactPatchPair
|
|||
cp.mesh().boundaryMesh()[masterPatch_.index()], // to patch
|
||||
intersection::algorithmNames_.read(dict.lookup("projectionAlgo")),
|
||||
intersection::directionNames_.read(dict.lookup("projectionDir"))
|
||||
|
||||
|
||||
)
|
||||
{}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ Class
|
|||
|
||||
Description
|
||||
A pair of surfaces in contact.
|
||||
|
||||
|
||||
SourceFiles
|
||||
contactPatchPair.C
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ void contactProblem::correct()
|
|||
(
|
||||
lambdaPatches[patchI]*tr(gradUpatches[patchI])
|
||||
)
|
||||
|
||||
|
||||
)/(2.0*muPatches[patchI] + lambdaPatches[patchI]);
|
||||
|
||||
// Set the value fractions
|
||||
|
|
|
@ -176,7 +176,7 @@ void tractionDisplacementFvPatchVectorField::updateCoeffs()
|
|||
gradient() =
|
||||
(
|
||||
(traction_ + pressure_*n)/rho.value()
|
||||
+ twoMuLambda*fvPatchField<vector>::snGrad() - (n & sigmaD)
|
||||
+ twoMuLambda*fvPatchField<vector>::snGrad() - (n & sigmaD)
|
||||
)/twoMuLambda;
|
||||
|
||||
Switch thermalStress(thermalProperties.lookup("thermalStress"));
|
||||
|
@ -186,7 +186,7 @@ void tractionDisplacementFvPatchVectorField::updateCoeffs()
|
|||
dimensionedScalar alpha(thermalProperties.lookup("alpha"));
|
||||
dimensionedScalar threeKalpha = threeK*alpha;
|
||||
|
||||
const fvPatchField<scalar>& T =
|
||||
const fvPatchField<scalar>& T =
|
||||
patch().lookupPatchField<volScalarField, scalar>("T");
|
||||
|
||||
gradient() += n*threeKalpha.value()*T/twoMuLambda;
|
||||
|
|
|
@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
volTensorField gradDcorr = fvc::grad(Dcorr);
|
||||
|
||||
sigmaExp =
|
||||
sigmaExp =
|
||||
(lambda - mu)*gradDcorr + mu*gradDcorr.T()
|
||||
+ (lambda*I)*tr(gradDcorr);
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ void tractionDisplacementCorrectionFvPatchVectorField::updateCoeffs()
|
|||
const fvPatchField<symmTensor>& sigmaD =
|
||||
patch().lookupPatchField<volSymmTensorField, symmTensor>("sigmaD");
|
||||
|
||||
const fvPatchField<tensor>& sigmaExp =
|
||||
const fvPatchField<tensor>& sigmaExp =
|
||||
patch().lookupPatchField<volTensorField, tensor>("sigmaExp");
|
||||
|
||||
gradient() =
|
||||
|
|
|
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
|||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nCalculating displacement field\n" << endl;
|
||||
|
||||
|
||||
for (runTime++; !runTime.end(); runTime++)
|
||||
{
|
||||
Info<< "Iteration: " << runTime.timeName() << nl << endl;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// aitken acceleration
|
||||
// aitken acceleration
|
||||
aitkenDelta.storePrevIter();
|
||||
|
||||
// update delta
|
||||
|
|
|
@ -7,7 +7,7 @@ if(divSigmaExpMethod == "standard")
|
|||
);
|
||||
}
|
||||
else if(divSigmaExpMethod == "surface")
|
||||
{
|
||||
{
|
||||
divSigmaExp = fvc::div
|
||||
(
|
||||
muf*(mesh.Sf() & fvc::interpolate(gradU.T()))
|
||||
|
@ -21,7 +21,7 @@ if(divSigmaExpMethod == "standard")
|
|||
|
||||
surfaceTensorField shearGradU =
|
||||
((I - n*n)&fvc::interpolate(gradU));
|
||||
|
||||
|
||||
divSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
// traction = (n&fvc::interpolate(sigma));
|
||||
|
||||
// surfaceTensorField sGradU =
|
||||
// surfaceTensorField sGradU =
|
||||
// ((I - n*n)&fvc::interpolate(gradU));
|
||||
|
||||
// traction =
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Cczm[i] -= Cczm[sizeByTwo + i];
|
||||
Cczm[sizeByTwo + i] = Cczm[i];
|
||||
}
|
||||
|
||||
|
||||
scalar error = sum(mag(Cczm));
|
||||
|
||||
if(error < SMALL)
|
||||
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
Info << "Cohesive patch face ordering: error (" << error << ")"
|
||||
Info << "Cohesive patch face ordering: error (" << error << ")"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
// (
|
||||
// U.boundaryField()[cohesivePatchID]
|
||||
// );
|
||||
|
||||
|
||||
// philipc: I have moved cohesive stuff to constitutiveModel
|
||||
|
||||
// cohesiveZone is an index field
|
||||
|
@ -67,18 +67,18 @@
|
|||
{
|
||||
const dictionary& stressControl =
|
||||
mesh.solutionDict().subDict("solidMechanics");
|
||||
|
||||
|
||||
List<boundBox> userBoxes(stressControl.lookup("crackLimitingBoxes"));
|
||||
const surfaceVectorField& Cf = mesh.Cf();
|
||||
forAll(cohesiveZone.internalField(), faceI)
|
||||
{
|
||||
bool faceInsideBox = false;
|
||||
|
||||
|
||||
forAll(userBoxes, boxi)
|
||||
{
|
||||
if(userBoxes[boxi].contains(Cf.internalField()[faceI])) faceInsideBox = true;
|
||||
}
|
||||
|
||||
|
||||
if(faceInsideBox)
|
||||
{
|
||||
cohesiveZone.internalField()[faceI] = 1.0;
|
||||
|
@ -93,12 +93,12 @@
|
|||
forAll(cohesiveZone.boundaryField()[patchI], faceI)
|
||||
{
|
||||
bool faceInsideBox = false;
|
||||
|
||||
|
||||
forAll(userBoxes, boxi)
|
||||
{
|
||||
if(userBoxes[boxi].contains(Cf.boundaryField()[patchI][faceI])) faceInsideBox = true;
|
||||
}
|
||||
|
||||
|
||||
if(faceInsideBox)
|
||||
{
|
||||
cohesiveZone.boundaryField()[patchI][faceI] = 1.0;
|
||||
|
@ -149,7 +149,7 @@
|
|||
|
||||
Switch initialiseSolution(false);
|
||||
|
||||
if
|
||||
if
|
||||
(
|
||||
mesh.solutionDict().subDict("solidMechanics")
|
||||
.found("initialiseSolution")
|
||||
|
@ -168,7 +168,7 @@
|
|||
|
||||
Switch breakOnlyOneFacePerTopologyChange(true);
|
||||
|
||||
if
|
||||
if
|
||||
(
|
||||
mesh.solutionDict().subDict("solidMechanics")
|
||||
.found("breakOnlyOneFacePerTopologyChange")
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
);
|
||||
|
||||
constitutiveModel rheology(sigma, U);
|
||||
|
||||
|
||||
surfaceVectorField traction
|
||||
(
|
||||
IOobject
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
{
|
||||
if (needRef[regI])
|
||||
{
|
||||
UEqn.source()[refCells[regI]] +=
|
||||
UEqn.source()[refCells[regI]] +=
|
||||
UEqn.diag()[refCells[regI]]*vector::zero;
|
||||
|
||||
UEqn.diag()[refCells[regI]] +=
|
||||
UEqn.diag()[refCells[regI]] +=
|
||||
UEqn.diag()[refCells[regI]];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
// Check internal faces
|
||||
|
||||
// scalarField effTraction =
|
||||
// scalarField effTraction =
|
||||
// cohesiveZone.internalField() *
|
||||
// mag(traction.internalField());
|
||||
scalarField normalTraction =
|
||||
|
@ -13,7 +13,7 @@ nCoupledFacesToBreak = 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
|
||||
|
||||
|
@ -25,7 +25,7 @@ nCoupledFacesToBreak = 0;
|
|||
|
||||
//scalarField effTractionFraction = effTraction/sigmaMax;
|
||||
scalarField effTractionFraction(normalTraction.size(), 0.0);
|
||||
|
||||
|
||||
if(cohesivePatchUPtr)
|
||||
{
|
||||
effTractionFraction =
|
||||
|
@ -74,7 +74,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
}
|
||||
|
||||
scalar gMaxEffTractionFraction =
|
||||
scalar gMaxEffTractionFraction =
|
||||
returnReduce(faceToBreakEffTractionFraction, maxOp<scalar>());
|
||||
|
||||
if (Pstream::parRun())
|
||||
|
@ -114,7 +114,7 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
if (mesh.boundary()[patchI].coupled())
|
||||
{
|
||||
// scalarField pEffTraction =
|
||||
// scalarField pEffTraction =
|
||||
// cohesiveZone.boundaryField()[patchI] *
|
||||
// mag(traction.boundaryField()[patchI]);
|
||||
// scalarField pEffTractionFraction = pEffTraction/sigmaMax.boundaryField()[patchI];
|
||||
|
@ -126,12 +126,12 @@ nCoupledFacesToBreak = 0;
|
|||
scalarField pShearTraction =
|
||||
cohesiveZone.boundaryField()[patchI] *
|
||||
mag( (I - Foam::sqr(n.boundaryField()[patchI])) & traction.boundaryField()[patchI] );
|
||||
|
||||
|
||||
// the traction fraction is monitored to decide which faces to break:
|
||||
// ie (tN/tNC)^2 + (tS/tSC)^2 >1 to crack a face
|
||||
const scalarField& pSigmaMax = sigmaMax.boundaryField()[patchI];
|
||||
const scalarField& pTauMax = tauMax.boundaryField()[patchI];
|
||||
|
||||
|
||||
scalarField pEffTractionFraction(pNormalTraction.size(), 0.0);
|
||||
if(cohesivePatchUPtr)
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
maxEffTractionFraction = pEffTractionFraction[faceI];
|
||||
}
|
||||
|
||||
|
||||
if (pEffTractionFraction[faceI] > 1.0)
|
||||
{
|
||||
coupledFacesToBreakList.insert(start + faceI);
|
||||
|
@ -162,7 +162,7 @@ nCoupledFacesToBreak = 0;
|
|||
pEffTractionFraction[faceI]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,19 +185,19 @@ nCoupledFacesToBreak = 0;
|
|||
scalar coupledFaceToBreakEffTractionFraction = 0;
|
||||
forAll(coupledFacesToBreakEffTractionFraction, faceI)
|
||||
{
|
||||
if
|
||||
if
|
||||
(
|
||||
coupledFacesToBreakEffTractionFraction[faceI]
|
||||
coupledFacesToBreakEffTractionFraction[faceI]
|
||||
> coupledFaceToBreakEffTractionFraction
|
||||
)
|
||||
{
|
||||
coupledFaceToBreakEffTractionFraction =
|
||||
coupledFaceToBreakEffTractionFraction =
|
||||
coupledFacesToBreakEffTractionFraction[faceI];
|
||||
coupledFaceToBreakIndex = coupledFacesToBreak[faceI];
|
||||
}
|
||||
}
|
||||
|
||||
scalar gMaxCoupledEffTractionFraction =
|
||||
scalar gMaxCoupledEffTractionFraction =
|
||||
returnReduce(coupledFaceToBreakEffTractionFraction, maxOp<scalar>());
|
||||
|
||||
if (Pstream::parRun())
|
||||
|
@ -208,8 +208,8 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
if
|
||||
(
|
||||
mag(gMaxCoupledEffTractionFraction - coupledFaceToBreakEffTractionFraction)
|
||||
< SMALL
|
||||
mag(gMaxCoupledEffTractionFraction - coupledFaceToBreakEffTractionFraction)
|
||||
< SMALL
|
||||
)
|
||||
{
|
||||
// Maximum traction fraction is on this processor
|
||||
|
@ -226,11 +226,11 @@ nCoupledFacesToBreak = 0;
|
|||
|
||||
label minProcID =
|
||||
returnReduce<label>(procID, minOp<label>());
|
||||
|
||||
|
||||
if (procID != minProcID)
|
||||
{
|
||||
nCoupledFacesToBreak = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gMaxCoupledEffTractionFraction > gMaxEffTractionFraction)
|
||||
|
@ -249,7 +249,7 @@ nCoupledFacesToBreak = 0;
|
|||
labelList index(Pstream::nProcs(), -1);
|
||||
if (nCoupledFacesToBreak)
|
||||
{
|
||||
label patchID =
|
||||
label patchID =
|
||||
mesh.boundaryMesh().whichPatch(coupledFaceToBreakIndex);
|
||||
|
||||
label start = mesh.boundaryMesh()[patchID].start();
|
||||
|
@ -288,10 +288,10 @@ nCoupledFacesToBreak = 0;
|
|||
mesh.boundaryMesh()[patchI]
|
||||
);
|
||||
label ngbProcNo = procPatch.neighbProcNo();
|
||||
|
||||
|
||||
if (ngbProcNo == procI)
|
||||
{
|
||||
label start =
|
||||
label start =
|
||||
mesh.boundaryMesh()[patchI].start();
|
||||
coupledFaceToBreakIndex = start + index[procI];
|
||||
nCoupledFacesToBreak = 1;
|
||||
|
@ -345,14 +345,14 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
else if (nCoupledFacesToBreak > 0)
|
||||
{
|
||||
label patchID =
|
||||
label patchID =
|
||||
mesh.boundaryMesh().whichPatch(coupledFaceToBreakIndex);
|
||||
label start = mesh.boundaryMesh()[patchID].start();
|
||||
label localIndex = coupledFaceToBreakIndex - start;
|
||||
|
||||
faceToBreakTraction = traction.boundaryField()[patchID][localIndex];
|
||||
faceToBreakNormal = n.boundaryField()[patchID][localIndex];
|
||||
|
||||
|
||||
// Scale broken face traction
|
||||
faceToBreakSigmaMax = sigmaMax.boundaryField()[patchID][localIndex];
|
||||
faceToBreakTauMax = tauMax.boundaryField()[patchID][localIndex];
|
||||
|
@ -428,11 +428,11 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
// Local crack displacement
|
||||
vectorField UpI =
|
||||
vectorField UpI =
|
||||
U.boundaryField()[cohesivePatchID].patchInternalField();
|
||||
vectorField oldUpI =
|
||||
vectorField oldUpI =
|
||||
U.oldTime().boundaryField()[cohesivePatchID].patchInternalField();
|
||||
|
||||
|
||||
// Global crack displacement
|
||||
vectorField globalUpI = mesh.globalCrackField(UpI);
|
||||
vectorField globalOldUpI = mesh.globalCrackField(oldUpI);
|
||||
|
@ -445,7 +445,7 @@ nCoupledFacesToBreak = 0;
|
|||
|
||||
// cohesivePatchU.size()
|
||||
int cohesivePatchSize(cohesivePatchUPtr ? cohesivePatchUPtr->size() : cohesivePatchUFixedModePtr->size());
|
||||
|
||||
|
||||
// Initialise U for new cohesive face
|
||||
const labelList& gcfa = mesh.globalCrackFaceAddressing();
|
||||
label globalIndex = mesh.localCrackStart();
|
||||
|
@ -460,13 +460,13 @@ nCoupledFacesToBreak = 0;
|
|||
U.boundaryField()[cohesivePatchID][i] =
|
||||
0.5
|
||||
*(
|
||||
globalUpI[globalIndex]
|
||||
globalUpI[globalIndex]
|
||||
+ globalUpI[gcfa[globalIndex]]
|
||||
);
|
||||
U.oldTime().boundaryField()[cohesivePatchID][i] =
|
||||
0.5
|
||||
*(
|
||||
globalOldUpI[globalIndex]
|
||||
globalOldUpI[globalIndex]
|
||||
+ globalOldUpI[gcfa[globalIndex]]
|
||||
);
|
||||
|
||||
|
@ -499,7 +499,7 @@ nCoupledFacesToBreak = 0;
|
|||
# include "calculateTraction.H"
|
||||
//if (nFacesToBreak || nCoupledFacesToBreak) mesh.write(); traction.write();
|
||||
|
||||
// Initialise initiation traction for new cohesive patch face
|
||||
// Initialise initiation traction for new cohesive patch face
|
||||
// for (label i=0; i<cohesivePatchU.size(); i++)
|
||||
for (label i=0; i<cohesivePatchSize; i++)
|
||||
{
|
||||
|
@ -512,7 +512,7 @@ nCoupledFacesToBreak = 0;
|
|||
|| (oldFaceIndex == coupledFaceToBreakIndex)
|
||||
)
|
||||
{
|
||||
vector n0 =
|
||||
vector n0 =
|
||||
mesh.Sf().boundaryField()[cohesivePatchID][i]
|
||||
/mesh.magSf().boundaryField()[cohesivePatchID][i];
|
||||
//vector n1 = -n0;
|
||||
|
|
|
@ -140,7 +140,7 @@ if (runTime.outputTime() || topoChange)
|
|||
GII.boundaryField()[patchi] = Upatch.GII();
|
||||
damageAndCracks.boundaryField()[patchi] = Upatch.crackingAndDamage();
|
||||
}
|
||||
}
|
||||
}
|
||||
volScalarField GTotal("GTotal", GI + GII);
|
||||
GTotal.write();
|
||||
|
||||
|
|
|
@ -6,15 +6,15 @@ if(historyPatchID != -1)
|
|||
|
||||
//- for small strain or moving mesh
|
||||
vector force = gSum(mesh.boundary()[historyPatchID].Sf() & sigma.boundaryField()[historyPatchID]);
|
||||
|
||||
|
||||
//- for large strain total lagrangian
|
||||
// tensorField F = I + gradU.boundaryField()[historyPatchID];
|
||||
// vectorField totalForce = mesh.Sf().boundaryField()[historyPatchID] & (sigma.boundaryField()[historyPatchID] & F);
|
||||
|
||||
|
||||
//vector force = sum( totalForce );
|
||||
|
||||
|
||||
//scalar force = force[vector::Y];
|
||||
|
||||
|
||||
//- patchIntegrate utility integrates it this way but this is worng because the sigma tensor should
|
||||
//- be dotted with the surface normal to give the actual traction/force
|
||||
//- you cannot just take the component of the sigma tensor
|
||||
|
@ -22,9 +22,9 @@ if(historyPatchID != -1)
|
|||
// mesh.magSf().boundaryField()[historyPatchID]
|
||||
// *sigma.boundaryField()[historyPatchID].component(symmTensor::XY)
|
||||
// );
|
||||
|
||||
|
||||
vector avDisp = gAverage(U.boundaryField()[historyPatchID]);
|
||||
|
||||
|
||||
//- write to file
|
||||
if(Pstream::master())
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// aitken acceleration
|
||||
// aitken acceleration
|
||||
aitkenDelta.storePrevIter();
|
||||
|
||||
// update delta
|
||||
|
|
|
@ -7,7 +7,7 @@ if(divDSigmaExpMethod == "standard")
|
|||
);
|
||||
}
|
||||
else if(divDSigmaExpMethod == "surface")
|
||||
{
|
||||
{
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
muf*(mesh.Sf() & fvc::interpolate(gradDU.T()))
|
||||
|
@ -21,7 +21,7 @@ if(divDSigmaExpMethod == "standard")
|
|||
|
||||
surfaceTensorField shearGradDU =
|
||||
((I - n*n)&fvc::interpolate(gradDU));
|
||||
|
||||
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
// traction = (n&fvc::interpolate(sigma));
|
||||
|
||||
// surfaceTensorField sGradU =
|
||||
// surfaceTensorField sGradU =
|
||||
// ((I - n*n)&fvc::interpolate(gradU));
|
||||
|
||||
// traction =
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Cczm[i] -= Cczm[sizeByTwo + i];
|
||||
Cczm[sizeByTwo + i] = Cczm[i];
|
||||
}
|
||||
|
||||
|
||||
scalar error = sum(mag(Cczm));
|
||||
|
||||
if(error < SMALL)
|
||||
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
Info << "Cohesive patch face ordering: error (" << error << ")"
|
||||
Info << "Cohesive patch face ordering: error (" << error << ")"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,19 +67,19 @@
|
|||
{
|
||||
const dictionary& stressControl =
|
||||
mesh.solutionDict().subDict("solidMechanics");
|
||||
|
||||
|
||||
List<boundBox> userBoxes(stressControl.lookup("crackLimitingBoxes"));
|
||||
const surfaceVectorField& Cf = mesh.Cf();
|
||||
//int numPossibleCrackFaces = 0;
|
||||
forAll(cohesiveZone.internalField(), faceI)
|
||||
{
|
||||
bool faceInsideBox = false;
|
||||
|
||||
|
||||
forAll(userBoxes, boxi)
|
||||
{
|
||||
if(userBoxes[boxi].contains(Cf.internalField()[faceI])) faceInsideBox = true;
|
||||
}
|
||||
|
||||
|
||||
if(faceInsideBox)
|
||||
{
|
||||
cohesiveZone.internalField()[faceI] = 1.0;
|
||||
|
@ -96,18 +96,18 @@
|
|||
forAll(cohesiveZone.boundaryField()[patchI], faceI)
|
||||
{
|
||||
bool faceInsideBox = false;
|
||||
|
||||
|
||||
forAll(userBoxes, boxi)
|
||||
{
|
||||
if(userBoxes[boxi].contains(Cf.boundaryField()[patchI][faceI])) faceInsideBox = true;
|
||||
}
|
||||
|
||||
|
||||
if(faceInsideBox)
|
||||
{
|
||||
cohesiveZone.boundaryField()[patchI][faceI] = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// numPossibleCrackFaces += int(sum(cohesiveZone.boundaryField()[patchI]));
|
||||
// philipc multiMat cracks not working on proc boundaries yet... disable for now
|
||||
// found the problem: solidInterface needs to know about mesh changes so
|
||||
|
@ -168,7 +168,7 @@
|
|||
|
||||
Switch initialiseSolution(false);
|
||||
|
||||
if
|
||||
if
|
||||
(
|
||||
mesh.solutionDict().subDict("solidMechanics")
|
||||
.found("initialiseSolution")
|
||||
|
@ -187,7 +187,7 @@
|
|||
|
||||
Switch breakOnlyOneFacePerTopologyChange(true);
|
||||
|
||||
if
|
||||
if
|
||||
(
|
||||
mesh.solutionDict().subDict("solidMechanics")
|
||||
.found("breakOnlyOneFacePerTopologyChange")
|
||||
|
|
|
@ -15,7 +15,7 @@ scalar deltaTmin(readScalar(stressControl.lookup("deltaTmin")));
|
|||
scalar deltaTmax(readScalar(stressControl.lookup("deltaTmax")));
|
||||
|
||||
int infoFrequency(readInt(stressControl.lookup("infoFrequency")));
|
||||
//Info << "\nFrequency of info statements is " << infoFrequency << endl;
|
||||
//Info << "\nFrequency of info statements is " << infoFrequency << endl;
|
||||
|
||||
Switch aitkenRelax(stressControl.lookup("aitkenRelaxation"));
|
||||
Switch predictor(stressControl.lookup("predictor"));
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
{
|
||||
if (needRef[regI])
|
||||
{
|
||||
UEqn.source()[refCells[regI]] +=
|
||||
UEqn.source()[refCells[regI]] +=
|
||||
UEqn.diag()[refCells[regI]]*vector::zero;
|
||||
|
||||
UEqn.diag()[refCells[regI]] +=
|
||||
UEqn.diag()[refCells[regI]] +=
|
||||
UEqn.diag()[refCells[regI]];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
// Check internal faces
|
||||
|
||||
// scalarField effTraction =
|
||||
// scalarField effTraction =
|
||||
// cohesiveZone.internalField() *
|
||||
// mag(traction.internalField());
|
||||
scalarField normalTraction =
|
||||
|
@ -26,7 +26,7 @@ nCoupledFacesToBreak = 0;
|
|||
// scalarField effTractionFraction =
|
||||
// (normalTraction/sigmaMaxI)*(normalTraction/sigmaMaxI) + (shearTraction/tauMaxI)*(shearTraction/tauMaxI);
|
||||
scalarField effTractionFraction(normalTraction.size(), 0.0);
|
||||
|
||||
|
||||
if(cohesivePatchDUPtr)
|
||||
{
|
||||
effTractionFraction =
|
||||
|
@ -75,7 +75,7 @@ nCoupledFacesToBreak = 0;
|
|||
faceToBreakIndex = facesToBreak[faceI];
|
||||
}
|
||||
}
|
||||
scalar gMaxEffTractionFraction =
|
||||
scalar gMaxEffTractionFraction =
|
||||
returnReduce(faceToBreakEffTractionFraction, maxOp<scalar>());
|
||||
|
||||
if (Pstream::parRun())
|
||||
|
@ -91,7 +91,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
// Check if maximum is present on more then one processors
|
||||
|
||||
|
||||
label procID = Pstream::nProcs();
|
||||
if (procHasFaceToBreak)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
if (mesh.boundary()[patchI].coupled())
|
||||
{
|
||||
// scalarField pEffTraction =
|
||||
// scalarField pEffTraction =
|
||||
// cohesiveZone.boundaryField()[patchI] *
|
||||
// mag(traction.boundaryField()[patchI]);
|
||||
// scalarField pEffTractionFraction = pEffTraction/sigmaMax.boundaryField()[patchI];
|
||||
|
@ -129,12 +129,12 @@ nCoupledFacesToBreak = 0;
|
|||
scalarField pShearTraction =
|
||||
cohesiveZone.boundaryField()[patchI] *
|
||||
mag( (I - Foam::sqr(n.boundaryField()[patchI])) & traction.boundaryField()[patchI] );
|
||||
|
||||
|
||||
// the traction fraction is monitored to decide which faces to break:
|
||||
// ie (tN/tNC)^2 + (tS/tSC)^2 >1 to crack a face
|
||||
const scalarField& pSigmaMax = sigmaMax.boundaryField()[patchI];
|
||||
const scalarField& pTauMax = tauMax.boundaryField()[patchI];
|
||||
|
||||
|
||||
// scalarField pEffTractionFraction =
|
||||
// (pNormalTraction/pSigmaMax)*(pNormalTraction/pSigmaMax) + (pShearTraction/pTauMax)*(pShearTraction/pTauMax);
|
||||
scalarField pEffTractionFraction(pNormalTraction.size(), 0.0);
|
||||
|
@ -158,7 +158,7 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
maxEffTractionFraction = pEffTractionFraction[faceI];
|
||||
}
|
||||
|
||||
|
||||
if (pEffTractionFraction[faceI] > 1.0)
|
||||
{
|
||||
//Pout << "coupled face to break " << faceI << endl;
|
||||
|
@ -168,7 +168,7 @@ nCoupledFacesToBreak = 0;
|
|||
pEffTractionFraction[faceI]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,26 +186,26 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
nCoupledFacesToBreak = 1;
|
||||
}
|
||||
|
||||
|
||||
// Select coupled face with maximum effective traction fraction
|
||||
label coupledFaceToBreakIndex = -1;
|
||||
scalar coupledFaceToBreakEffTractionFraction = 0;
|
||||
forAll(coupledFacesToBreakEffTractionFraction, faceI)
|
||||
{
|
||||
if
|
||||
if
|
||||
(
|
||||
coupledFacesToBreakEffTractionFraction[faceI]
|
||||
coupledFacesToBreakEffTractionFraction[faceI]
|
||||
> coupledFaceToBreakEffTractionFraction
|
||||
)
|
||||
{
|
||||
coupledFaceToBreakEffTractionFraction =
|
||||
coupledFaceToBreakEffTractionFraction =
|
||||
coupledFacesToBreakEffTractionFraction[faceI];
|
||||
coupledFaceToBreakIndex = coupledFacesToBreak[faceI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
scalar gMaxCoupledEffTractionFraction =
|
||||
scalar gMaxCoupledEffTractionFraction =
|
||||
returnReduce(coupledFaceToBreakEffTractionFraction, maxOp<scalar>());
|
||||
|
||||
if (Pstream::parRun())
|
||||
|
@ -216,8 +216,8 @@ nCoupledFacesToBreak = 0;
|
|||
{
|
||||
if
|
||||
(
|
||||
mag(gMaxCoupledEffTractionFraction - coupledFaceToBreakEffTractionFraction)
|
||||
< SMALL
|
||||
mag(gMaxCoupledEffTractionFraction - coupledFaceToBreakEffTractionFraction)
|
||||
< SMALL
|
||||
)
|
||||
{
|
||||
// Maximum traction fraction is on this processor
|
||||
|
@ -226,7 +226,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
// Check if maximum is present on more then one processors
|
||||
|
||||
|
||||
label procID = Pstream::nProcs();
|
||||
if (procHasCoupledFaceToBreak)
|
||||
{
|
||||
|
@ -235,11 +235,11 @@ nCoupledFacesToBreak = 0;
|
|||
|
||||
label minProcID =
|
||||
returnReduce<label>(procID, minOp<label>());
|
||||
|
||||
|
||||
if (procID != minProcID)
|
||||
{
|
||||
nCoupledFacesToBreak = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gMaxCoupledEffTractionFraction > gMaxEffTractionFraction)
|
||||
|
@ -258,7 +258,7 @@ nCoupledFacesToBreak = 0;
|
|||
labelList index(Pstream::nProcs(), -1);
|
||||
if (nCoupledFacesToBreak)
|
||||
{
|
||||
label patchID =
|
||||
label patchID =
|
||||
mesh.boundaryMesh().whichPatch(coupledFaceToBreakIndex);
|
||||
label start = mesh.boundaryMesh()[patchID].start();
|
||||
label localIndex = coupledFaceToBreakIndex - start;
|
||||
|
@ -296,10 +296,10 @@ nCoupledFacesToBreak = 0;
|
|||
mesh.boundaryMesh()[patchI]
|
||||
);
|
||||
label ngbProcNo = procPatch.neighbProcNo();
|
||||
|
||||
|
||||
if (ngbProcNo == procI)
|
||||
{
|
||||
label start =
|
||||
label start =
|
||||
mesh.boundaryMesh()[patchI].start();
|
||||
coupledFaceToBreakIndex = start + index[procI];
|
||||
nCoupledFacesToBreak = 1;
|
||||
|
@ -356,14 +356,14 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
else if (nCoupledFacesToBreak > 0)
|
||||
{
|
||||
label patchID =
|
||||
label patchID =
|
||||
mesh.boundaryMesh().whichPatch(coupledFaceToBreakIndex);
|
||||
label start = mesh.boundaryMesh()[patchID].start();
|
||||
label localIndex = coupledFaceToBreakIndex - start;
|
||||
|
||||
faceToBreakTraction = traction.boundaryField()[patchID][localIndex];
|
||||
faceToBreakNormal = n.boundaryField()[patchID][localIndex];
|
||||
|
||||
|
||||
// Scale broken face traction
|
||||
faceToBreakSigmaMax = sigmaMax.boundaryField()[patchID][localIndex];
|
||||
faceToBreakTauMax = tauMax.boundaryField()[patchID][localIndex];
|
||||
|
@ -436,19 +436,19 @@ nCoupledFacesToBreak = 0;
|
|||
|
||||
// All values on the new crack faces get set to zero
|
||||
// so we must manually correct them
|
||||
const vectorField DUpI =
|
||||
const vectorField DUpI =
|
||||
DU.boundaryField()[cohesivePatchID].patchInternalField();
|
||||
const vectorField oldDUpI =
|
||||
const vectorField oldDUpI =
|
||||
DU.oldTime().boundaryField()[cohesivePatchID].patchInternalField();
|
||||
const vectorField UpI =
|
||||
const vectorField UpI =
|
||||
U.boundaryField()[cohesivePatchID].patchInternalField();
|
||||
const vectorField oldUpI =
|
||||
const vectorField oldUpI =
|
||||
U.oldTime().boundaryField()[cohesivePatchID].patchInternalField();
|
||||
const symmTensorField sigmapI =
|
||||
const symmTensorField sigmapI =
|
||||
sigma.boundaryField()[cohesivePatchID].patchInternalField();
|
||||
const scalarField muPI = mu.boundaryField()[cohesivePatchID].patchInternalField();
|
||||
const scalarField lambdaPI = lambda.boundaryField()[cohesivePatchID].patchInternalField();
|
||||
|
||||
|
||||
// Global crack fields
|
||||
const vectorField globalDUpI = mesh.globalCrackField(DUpI);
|
||||
const vectorField globalOldDUpI = mesh.globalCrackField(oldDUpI);
|
||||
|
@ -478,31 +478,31 @@ nCoupledFacesToBreak = 0;
|
|||
DU.boundaryField()[cohesivePatchID][i] =
|
||||
0.5
|
||||
*(
|
||||
globalDUpI[globalIndex]
|
||||
globalDUpI[globalIndex]
|
||||
+ globalDUpI[gcfa[globalIndex]]
|
||||
);
|
||||
DU.oldTime().boundaryField()[cohesivePatchID][i] =
|
||||
0.5
|
||||
*(
|
||||
globalOldDUpI[globalIndex]
|
||||
globalOldDUpI[globalIndex]
|
||||
+ globalOldDUpI[gcfa[globalIndex]]
|
||||
);
|
||||
U.boundaryField()[cohesivePatchID][i] =
|
||||
0.5
|
||||
*(
|
||||
globalUpI[globalIndex]
|
||||
globalUpI[globalIndex]
|
||||
+ globalUpI[gcfa[globalIndex]]
|
||||
);
|
||||
U.oldTime().boundaryField()[cohesivePatchID][i] =
|
||||
0.5
|
||||
*(
|
||||
globalOldUpI[globalIndex]
|
||||
globalOldUpI[globalIndex]
|
||||
+ globalOldUpI[gcfa[globalIndex]]
|
||||
);
|
||||
sigma.boundaryField()[cohesivePatchID][i] =
|
||||
0.5
|
||||
*(
|
||||
globalsigmapI[globalIndex]
|
||||
globalsigmapI[globalIndex]
|
||||
+ globalsigmapI[gcfa[globalIndex]]
|
||||
);
|
||||
|
||||
|
@ -535,7 +535,7 @@ nCoupledFacesToBreak = 0;
|
|||
# include "calculateTraction.H"
|
||||
//if (nFacesToBreak || nCoupledFacesToBreak) mesh.write(); traction.write();
|
||||
|
||||
// Initialise initiation traction for new cohesive patch face
|
||||
// Initialise initiation traction for new cohesive patch face
|
||||
// we also need to update the traction_ field in the crack boundary condition
|
||||
// this is because it cannot set itself during mapping.
|
||||
//for (label i=0; i<cohesivePatchDU.size(); i++)
|
||||
|
@ -550,7 +550,7 @@ nCoupledFacesToBreak = 0;
|
|||
|| (oldFaceIndex == coupledFaceToBreakIndex)
|
||||
)
|
||||
{
|
||||
vector n0 =
|
||||
vector n0 =
|
||||
mesh.Sf().boundaryField()[cohesivePatchID][i]
|
||||
/mesh.magSf().boundaryField()[cohesivePatchID][i];
|
||||
//vector n1 = -n0;
|
||||
|
@ -597,7 +597,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// hmmnn we only need a reference for very small groups of cells
|
||||
// turn off for now
|
||||
//# include "updateReference.H"
|
||||
|
|
|
@ -165,7 +165,7 @@ if (runTime.outputTime() || topoChange)
|
|||
GII.boundaryField()[patchi] = DUpatch.GII();
|
||||
damageAndCracks.boundaryField()[patchi] = DUpatch.crackingAndDamage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Info << "done" << endl;
|
||||
|
||||
|
|
|
@ -6,21 +6,21 @@ if(historyPatchID != -1)
|
|||
|
||||
//- calculate force in specified direction on topClamp patch
|
||||
vector direction(0, 1, 0);
|
||||
|
||||
|
||||
//- for small strain or moving mesh
|
||||
scalar force = gSum(
|
||||
direction &
|
||||
(mesh.boundary()[historyPatchID].Sf() & sigma.boundaryField()[historyPatchID])
|
||||
);
|
||||
|
||||
|
||||
//- for large strain total lagrangian
|
||||
// tensorField F = I + gradU.boundaryField()[historyPatchID];
|
||||
// vectorField totalForce = mesh.Sf().boundaryField()[historyPatchID] & (sigma.boundaryField()[historyPatchID] & F);
|
||||
|
||||
|
||||
//vector force = sum( totalForce );
|
||||
|
||||
|
||||
//scalar force = force[vector::Y];
|
||||
|
||||
|
||||
//- patchIntegrate utility integrates it this way but this is worng because the sigma tensor should
|
||||
//- be dotted with the surface normal to give the actual traction/force
|
||||
//- you cannot just take the component of the sigma tensor
|
||||
|
@ -28,9 +28,9 @@ if(historyPatchID != -1)
|
|||
// mesh.magSf().boundaryField()[historyPatchID]
|
||||
// *sigma.boundaryField()[historyPatchID].component(symmTensor::XY)
|
||||
// );
|
||||
|
||||
|
||||
scalar disp = max(U.boundaryField()[historyPatchID].component(vector::Y));
|
||||
|
||||
|
||||
//- write to file
|
||||
if(Pstream::master())
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ if(divDSigmaExpMethod == "standard")
|
|||
);
|
||||
}
|
||||
else if(divDSigmaExpMethod == "surface")
|
||||
{
|
||||
{
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
muf*(mesh.Sf() & fvc::interpolate(gradDU.T()))
|
||||
|
@ -19,7 +19,7 @@ else if(divDSigmaExpMethod == "decompose")
|
|||
{
|
||||
surfaceTensorField shearGradDU =
|
||||
((I - n*n) & fvc::interpolate(gradDU));
|
||||
|
||||
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()*
|
||||
|
|
|
@ -6,7 +6,7 @@ Info << nl;
|
|||
forAll(netForces, patchI)
|
||||
{
|
||||
netForces[patchI] = gSum(mesh.Sf().boundaryField()[patchI] & sigma.boundaryField()[patchI]);
|
||||
|
||||
|
||||
Info << "patch\t" << mesh.boundary()[patchI].name() << "\t\tnet force is\t"
|
||||
<< netForces[patchI] << " N" << endl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,10 +28,10 @@ if (runTime.outputTime())
|
|||
),
|
||||
sqrt((3.0/2.0)*magSqr(dev(sigma)))
|
||||
);
|
||||
|
||||
|
||||
Info<< "Max sigmaEq = " << max(sigmaEq).value()
|
||||
<< endl;
|
||||
|
||||
|
||||
//- Calculate Cauchy stress
|
||||
volTensorField F = I + gradU;
|
||||
volScalarField J = det(F);
|
||||
|
@ -65,7 +65,7 @@ if (runTime.outputTime())
|
|||
),
|
||||
sqrt((3.0/2.0)*magSqr(dev(sigmaCauchy)))
|
||||
);
|
||||
|
||||
|
||||
Info<< "Max sigmaCauchyEq = " << max(sigmaCauchyEq).value()
|
||||
<< endl;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
(
|
||||
U.boundaryField()[patchID]
|
||||
);
|
||||
|
||||
|
||||
tensorField Finv = inv(I + gradU);
|
||||
vectorField newN = Finv & n.boundaryField()[patchID];
|
||||
newN /= mag(newN);
|
||||
|
|
|
@ -6,16 +6,16 @@ if(min(J.internalField()) > 0)
|
|||
Info << "Moving mesh using least squares interpolation" << endl;
|
||||
|
||||
leastSquaresVolPointInterpolation pointInterpolation(mesh);
|
||||
|
||||
|
||||
// Create point mesh
|
||||
pointMesh pMesh(mesh);
|
||||
|
||||
|
||||
wordList types
|
||||
(
|
||||
pMesh.boundary().size(),
|
||||
calculatedFvPatchVectorField::typeName
|
||||
);
|
||||
|
||||
|
||||
pointVectorField pointU
|
||||
(
|
||||
IOobject
|
||||
|
@ -28,7 +28,7 @@ if(min(J.internalField()) > 0)
|
|||
dimensionedVector("zero", dimLength, vector::zero),
|
||||
types
|
||||
);
|
||||
|
||||
|
||||
pointInterpolation.interpolate(U, pointU);
|
||||
|
||||
const vectorField& pointUI =
|
||||
|
|
|
@ -28,10 +28,10 @@ if (runTime.outputTime())
|
|||
),
|
||||
sqrt((3.0/2.0)*magSqr(dev(sigma)))
|
||||
);
|
||||
|
||||
|
||||
Info<< "Max sigmaEq = " << max(sigmaEq).value()
|
||||
<< endl;
|
||||
|
||||
|
||||
//- Calculate Cauchy stress
|
||||
volTensorField F = I + gradU;
|
||||
volScalarField J = det(F);
|
||||
|
@ -65,7 +65,7 @@ if (runTime.outputTime())
|
|||
),
|
||||
sqrt((3.0/2.0)*magSqr(dev(sigmaCauchy)))
|
||||
);
|
||||
|
||||
|
||||
Info<< "Max sigmaCauchyEq = " << max(sigmaCauchyEq).value()
|
||||
<< endl;
|
||||
|
||||
|
@ -105,7 +105,7 @@ if (runTime.outputTime())
|
|||
// traction.boundaryField()[patchi] =
|
||||
// nCurrent & sigmaCauchy.boundaryField()[patchi];
|
||||
// }
|
||||
|
||||
|
||||
// //- write boundary forces
|
||||
// //- integrate (sigma2PK & F) over reference area
|
||||
// //- which is equivalent to integrating sigmaCauchy
|
||||
|
@ -117,12 +117,12 @@ if (runTime.outputTime())
|
|||
// const tensorField& Fb = F.boundaryField()[patchi];
|
||||
// vectorField totalForce = mesh.Sf().boundaryField()[patchi] & (sigma.boundaryField()[patchi] & Fb);
|
||||
// //vectorField totalForce2 = Sf.boundaryField()[patchi] & (sigmaCauchy.boundaryField()[patchi]);
|
||||
|
||||
|
||||
// vector force = sum( totalForce );
|
||||
// //vector force2 = sum( totalForce2 );
|
||||
// Info << "\ttotal force is " << force << " N" << endl;
|
||||
// //Info << "\ttotal force2 is " << force2 << " N" << endl;
|
||||
|
||||
|
||||
// const tensorField& Fbinv = Finv.boundaryField()[patchi];
|
||||
// vectorField nCurrent = Fbinv & n.boundaryField()[patchi];
|
||||
// nCurrent /= mag(nCurrent);
|
||||
|
|
|
@ -2,7 +2,7 @@ forAll(globalFaceZones, zoneI)
|
|||
{
|
||||
const label curZoneID = globalFaceZones[zoneI];
|
||||
|
||||
const labelList& curMap =
|
||||
const labelList& curMap =
|
||||
globalToLocalFaceZonePointMap[zoneI];
|
||||
|
||||
const labelList& curZoneMeshPoints =
|
||||
|
@ -10,7 +10,7 @@ forAll(globalFaceZones, zoneI)
|
|||
|
||||
vectorField curGlobalZonePointDispl
|
||||
(
|
||||
curZoneMeshPoints.size(),
|
||||
curZoneMeshPoints.size(),
|
||||
vector::zero
|
||||
);
|
||||
|
||||
|
@ -21,13 +21,13 @@ forAll(globalFaceZones, zoneI)
|
|||
forAll(curGlobalZonePointDispl, globalPointI)
|
||||
{
|
||||
label localPoint = curMap[globalPointI];
|
||||
|
||||
|
||||
if(curZoneMeshPoints[localPoint] < mesh.nPoints())
|
||||
{
|
||||
label procPoint = curZoneMeshPoints[localPoint];
|
||||
|
||||
|
||||
curGlobalZonePointDispl[globalPointI] = pointDUI[procPoint];
|
||||
|
||||
|
||||
pointNumProcs[globalPointI] = 1;
|
||||
}
|
||||
}
|
||||
|
@ -41,13 +41,13 @@ forAll(globalFaceZones, zoneI)
|
|||
curGlobalZonePointDispl /= pointNumProcs;
|
||||
}
|
||||
|
||||
//- The curZonePointsDisplGlobal now contains the correct face zone
|
||||
// displacement in a global master processor order, now convert them
|
||||
//- The curZonePointsDisplGlobal now contains the correct face zone
|
||||
// displacement in a global master processor order, now convert them
|
||||
// back into the local proc order
|
||||
|
||||
vectorField curZonePointDispl
|
||||
(
|
||||
curZoneMeshPoints.size(),
|
||||
curZoneMeshPoints.size(),
|
||||
vector::zero
|
||||
);
|
||||
|
||||
|
@ -55,7 +55,7 @@ forAll(globalFaceZones, zoneI)
|
|||
{
|
||||
label localPoint = curMap[globalPointI];
|
||||
|
||||
curZonePointDispl[localPoint] =
|
||||
curZonePointDispl[localPoint] =
|
||||
curGlobalZonePointDispl[globalPointI];
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ if(divDSigmaExpMethod == "standard")
|
|||
);
|
||||
}
|
||||
else if(divDSigmaExpMethod == "surface")
|
||||
{
|
||||
{
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
muf*(mesh.Sf() & fvc::interpolate(gradDU.T()))
|
||||
|
@ -19,7 +19,7 @@ if(divDSigmaExpMethod == "standard")
|
|||
{
|
||||
surfaceTensorField shearGradDU =
|
||||
((I - n*n)&fvc::interpolate(gradDU));
|
||||
|
||||
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
|
|
|
@ -6,7 +6,7 @@ if(divDSigmaLargeStrainExpMethod == "standard")
|
|||
divDSigmaLargeStrainExp =
|
||||
fvc::div
|
||||
(
|
||||
mu*(gradDU & gradDU.T())
|
||||
mu*(gradDU & gradDU.T())
|
||||
//+ 0.5*lambda*(gradDU && gradDU)*I //- equivalent to 0.5*lambda*(I*tr(gradDU & gradDU.T()))
|
||||
+ 0.5*lambda*tr(gradDU & gradDU.T())*I
|
||||
+ ((sigma + DSigma) & gradDU),
|
||||
|
|
|
@ -24,9 +24,9 @@ FieldField<Field, vector> extraVecs(ptc.size());
|
|||
forAll (ptc, pointI)
|
||||
{
|
||||
const label curPoint = ptc[pointI];
|
||||
|
||||
|
||||
const labelList& curFaces = pfaces[curPoint];
|
||||
|
||||
|
||||
// extraVecs.hook(new vectorField(curFaces.size())); //- no hook function
|
||||
extraVecs.set
|
||||
(
|
||||
|
@ -35,11 +35,11 @@ FieldField<Field, vector> extraVecs(ptc.size());
|
|||
);
|
||||
|
||||
vectorField& curExtraVectors = extraVecs[pointI];
|
||||
|
||||
|
||||
label nFacesAroundPoint = 0;
|
||||
|
||||
const vector& pointLoc = mesh.points()[curPoint];
|
||||
|
||||
|
||||
// Go through all the faces
|
||||
forAll (curFaces, faceI)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ FieldField<Field, vector> extraVecs(ptc.size());
|
|||
// or coupled calculate the extrapolation vector
|
||||
label patchID =
|
||||
mesh.boundaryMesh().whichPatch(curFaces[faceI]);
|
||||
|
||||
|
||||
if
|
||||
(
|
||||
!isA<emptyFvPatch>(bm[patchID])
|
||||
|
@ -61,12 +61,12 @@ FieldField<Field, vector> extraVecs(ptc.size());
|
|||
pointLoc
|
||||
- centres.boundaryField()[patchID]
|
||||
[bm[patchID].patch().whichFace(curFaces[faceI])];
|
||||
|
||||
|
||||
nFacesAroundPoint++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
curExtraVectors.setSize(nFacesAroundPoint);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
const volVectorField& centres = mesh.C();
|
||||
|
||||
const fvBoundaryMesh& bm = mesh.boundary();
|
||||
|
||||
|
||||
pointScalarField volPointSumWeights
|
||||
(
|
||||
IOobject
|
||||
|
@ -25,13 +25,13 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
pMesh,
|
||||
dimensionedScalar("zero", dimless, 0)
|
||||
);
|
||||
|
||||
|
||||
forAll (ptc, pointI)
|
||||
{
|
||||
const label curPoint = ptc[pointI];
|
||||
|
||||
|
||||
const labelList& curFaces = pf[curPoint];
|
||||
|
||||
|
||||
//w.hook(new scalarField(curFaces.size())); //philipc no hook function
|
||||
w.set
|
||||
(
|
||||
|
@ -40,11 +40,11 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
);
|
||||
|
||||
scalarField& curWeights = w[pointI];
|
||||
|
||||
|
||||
label nFacesAroundPoint = 0;
|
||||
|
||||
|
||||
const vector& pointLoc = mesh.points()[curPoint];
|
||||
|
||||
|
||||
// Go through all the faces
|
||||
forAll (curFaces, faceI)
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
// or coupled calculate the extrapolation vector
|
||||
label patchID =
|
||||
mesh.boundaryMesh().whichPatch(curFaces[faceI]);
|
||||
|
||||
|
||||
if
|
||||
(
|
||||
!isA<emptyFvPatch>(bm[patchID])
|
||||
|
@ -74,23 +74,23 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
bm[patchID].patch().whichFace(curFaces[faceI])
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
nFacesAroundPoint++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Reset the sizes of the local weights
|
||||
curWeights.setSize(nFacesAroundPoint);
|
||||
|
||||
|
||||
// Collect the sum of weights for parallel correction
|
||||
volPointSumWeights[curPoint] += sum(curWeights);
|
||||
}
|
||||
|
||||
|
||||
// Do parallel correction of weights
|
||||
|
||||
|
||||
// Update coupled boundaries
|
||||
// Work-around for cyclic parallels.
|
||||
// Work-around for cyclic parallels.
|
||||
/*if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
|
||||
{
|
||||
forAll (volPointSumWeights.boundaryField(), patchI)
|
||||
|
@ -100,7 +100,7 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
volPointSumWeights.boundaryField()[patchI].initAddField();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
forAll (volPointSumWeights.boundaryField(), patchI)
|
||||
{
|
||||
if (volPointSumWeights.boundaryField()[patchI].coupled())
|
||||
|
@ -112,7 +112,7 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
// Re-scale the weights for the current point
|
||||
forAll (ptc, pointI)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ if(solidInterfaceCorr)
|
|||
{
|
||||
solidInterfacePtr = &rheology.solInterface();
|
||||
solidInterfacePtr->modifyProperties(muf, lambdaf);
|
||||
|
||||
|
||||
//- solidInterface needs muf and lambdaf to be used for divDSigmaExp
|
||||
if(divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose")
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ forAll (bm, patchI)
|
|||
)
|
||||
{
|
||||
const labelList& bp = bm[patchI].patch().boundaryPoints();
|
||||
|
||||
|
||||
const labelList& meshPoints = bm[patchI].patch().meshPoints();
|
||||
|
||||
forAll (bp, pointI)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue