Solid mechanics clean-up

This commit is contained in:
Hrvoje Jasak 2013-09-17 16:03:51 +01:00
parent abdb73255b
commit 7cd690af95
342 changed files with 24 additions and 696 deletions

View file

@ -1,20 +0,0 @@
#!/bin/sh
set -x
wclean solidModels
wclean elasticContactSolidFoam
wclean elasticContactIncrSolidFoam
wclean elasticContactNonLinULSolidFoam
wclean elasticGravitySolidFoam
wclean elasticIncrSolidFoam
wclean elasticNonLinTLSolidFoam
wclean elasticNonLinULSolidFoam
wclean elasticPlasticSolidFoam
wclean elasticPlasticNonLinULSolidFoam
wclean elasticSolidFoam
wclean elasticThermalSolidFoam
wclean icoFsiElasticNonLinULSolidFoam
wclean viscoElasticSolidFoam
(cd utilities && ./Allwclean)

View file

@ -1,20 +0,0 @@
#!/bin/sh
set -x
wmake libso solidModels
wmake elasticContactSolidFoam
wmake elasticContactIncrSolidFoam
wmake elasticContactNonLinULSolidFoam
wmake elasticGravitySolidFoam
wmake elasticIncrSolidFoam
wmake elasticNonLinTLSolidFoam
wmake elasticNonLinULSolidFoam
wmake elasticPlasticNonLinULSolidFoam
wmake elasticPlasticSolidFoam
wmake elasticSolidFoam
wmake elasticThermalSolidFoam
wmake icoFsiElasticNonLinULSolidFoam
wmake viscoElasticSolidFoam
(cd utilities && ./Allwmake)

View file

@ -1,3 +1,3 @@
elasticContactIncrSolidFoam.C elasticContactIncrSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticContactIncrSolidFoam EXE = $(FOAM_APPBIN)/elasticContactIncrSolidFoam

View file

@ -1,3 +1,3 @@
elasticContactNonLinULSolidFoam.C elasticContactNonLinULSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticContactNonLinULSolidFoam EXE = $(FOAM_APPBIN)/elasticContactNonLinULSolidFoam

View file

@ -1,3 +1,3 @@
elasticContactSolidFoam.C elasticContactSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticContactSolidFoam EXE = $(FOAM_APPBIN)/elasticContactSolidFoam

View file

@ -1,3 +1,3 @@
elasticGravitySolidFoam.C elasticGravitySolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticGravitySolidFoam EXE = $(FOAM_APPBIN)/elasticGravitySolidFoam

View file

@ -1,3 +1,3 @@
elasticIncrSolidFoam.C elasticIncrSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticIncrSolidFoam EXE = $(FOAM_APPBIN)/elasticIncrSolidFoam

View file

@ -1,3 +1,3 @@
elasticNonLinTLSolidFoam.C elasticNonLinTLSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticNonLinTLSolidFoam EXE = $(FOAM_APPBIN)/elasticNonLinTLSolidFoam

View file

@ -1,3 +1,3 @@
elasticNonLinULSolidFoam.C elasticNonLinULSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticNonLinULSolidFoam EXE = $(FOAM_APPBIN)/elasticNonLinULSolidFoam

View file

@ -1,3 +1,3 @@
elasticPlasticNonLinULSolidFoam.C elasticPlasticNonLinULSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticPlasticNonLinULSolidFoam EXE = $(FOAM_APPBIN)/elasticPlasticNonLinULSolidFoam

View file

@ -1,3 +1,3 @@
elasticPlasticSolidFoam.C elasticPlasticSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticPlasticSolidFoam EXE = $(FOAM_APPBIN)/elasticPlasticSolidFoam

View file

@ -1,3 +1,3 @@
elasticSolidFoam.C elasticSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticSolidFoam EXE = $(FOAM_APPBIN)/elasticSolidFoam

View file

@ -1,3 +1,3 @@
elasticThermalSolidFoam.C elasticThermalSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/elasticThermalSolidFoam EXE = $(FOAM_APPBIN)/elasticThermalSolidFoam

View file

@ -2,4 +2,4 @@
icoFsiElasticNonLinULSolidFoam.C icoFsiElasticNonLinULSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/icoFsiElasticNonLinULSolidFoam EXE = $(FOAM_APPBIN)/icoFsiElasticNonLinULSolidFoam

View file

@ -1,6 +0,0 @@
#!/bin/sh
set -x
wclean foamMeshToAbaqus
wclean setMatFromCellZones
wclean patchStressIntegrate

View file

@ -1,7 +0,0 @@
#!/bin/sh
set -x
wmake foamMeshToAbaqus
wmake setMatFromCellZones
wmake patchStressIntegrate

View file

@ -1,3 +0,0 @@
foamMeshToAbaqus.C
EXE = $(FOAM_USER_APPBIN)/foamMeshToAbaqus

View file

@ -1,3 +0,0 @@
patchStressIntegrate.C
EXE = $(FOAM_USER_APPBIN)/patchStressIntegrate

View file

@ -1,3 +0,0 @@
setMatFromCellZones.C
EXE = $(FOAM_USER_APPBIN)/setMatFromCellZones

View file

@ -1,3 +1,3 @@
viscoElasticSolidFoam.C viscoElasticSolidFoam.C
EXE = $(FOAM_USER_APPBIN)/viscoElasticSolidFoam EXE = $(FOAM_APPBIN)/viscoElasticSolidFoam

View file

@ -0,0 +1,3 @@
foamMeshToAbaqus.C
EXE = $(FOAM_APPBIN)/foamMeshToAbaqus

View file

@ -86,6 +86,7 @@ class mergePolyMesh
//- Cell zones //- Cell zones
DynamicList<label> cellZones_; DynamicList<label> cellZones_;
// Private Member Functions // Private Member Functions
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct

View file

@ -113,7 +113,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
// Algorithm: // Algorithm:
// During mirroring, the faces that were previously boundary faces // During mirroring, the faces that were previously boundary faces
// in the mirror plane may become ineternal faces. In order to // in the mirror plane may become internal faces. In order to
// deal with the ordering of the faces, the algorithm is split // deal with the ordering of the faces, the algorithm is split
// into two parts. For original faces, the internal faces are // into two parts. For original faces, the internal faces are
// distributed to their owner cells. Once all internal faces are // distributed to their owner cells. Once all internal faces are

View file

@ -0,0 +1,3 @@
patchStressIntegrate.C
EXE = $(FOAM_APPBIN)/patchStressIntegrate

View file

@ -0,0 +1,3 @@
setMatFromCellZones.C
EXE = $(FOAM_APPBIN)/setMatFromCellZones

View file

@ -1,129 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
MRFSimpleFoam
Description
Steady-state solver for incompressible, turbulent flow of non-Newtonian
fluids with MRF regions.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/RAS/RASModel/RASModel.H"
#include "MRFZones.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
# include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
for (runTime++; !runTime.end(); runTime++)
{
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readSIMPLEControls.H"
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
// Momentum predictor
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
mrfZones.addCoriolis(UEqn());
UEqn().relax();
solve(UEqn() == -fvc::grad(p));
p.boundaryField().updateCoeffs();
volScalarField rAU = 1.0/UEqn().A();
U = rAU*UEqn().H();
UEqn.clear();
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
mrfZones.relativeFlux(phi);
adjustPhi(phi, U, p);
// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rAU, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
# include "continuityErrs.H"
// Explicitly relax pressure for momentum corrector
p.relax();
// Momentum corrector
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
}
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return(0);
}
// ************************************************************************* //

View file

@ -1,3 +0,0 @@
MRFSimpleFoam.C
EXE = $(FOAM_USER_APPBIN)/MRFSimpleFoam

View file

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/transportModels
EXE_LIBS = \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-llduSolvers

View file

@ -1,46 +0,0 @@
Info << "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info << "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
# include "createPhi.H"
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
);
MRFZones mrfZones(mesh);
mrfZones.correctBoundaryVelocity(U);

View file

@ -1,3 +0,0 @@
simpleSRFFoam.C
EXE = $(FOAM_USER_APPBIN)/simpleSRFFoam

View file

@ -1,11 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/transportModels
EXE_LIBS = \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools \
-llduSolvers

View file

@ -1,74 +0,0 @@
Info << "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field Urel\n" << endl;
volVectorField Urel
(
IOobject
(
"Urel",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading/calculating face flux field phi\n" << endl;
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(Urel) & mesh.Sf()
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
singlePhaseTransportModel laminarTransport(Urel, phi);
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(Urel, phi, laminarTransport)
);
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF
(
SRF::SRFModel::New(Urel)
);
// Create Uabs as a permanent field to make it available for on-the-fly
// post-processing operations
volVectorField Uabs
(
IOobject
(
"Uabs",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Urel + SRF->U()
);

View file

@ -1,131 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
simpleSRFFoam
Description
Steady-state solver for incompressible, turbulent flow of non-Newtonian
fluids with single rotating frame.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/RAS/RASModel/RASModel.H"
#include "SRFModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
# include "initContinuityErrs.H"
//mesh.clearPrimitives();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
for (runTime++; !runTime.end(); runTime++)
{
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readSIMPLEControls.H"
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
// Momentum predictor
tmp<fvVectorMatrix> UrelEqn
(
fvm::div(phi, Urel)
+ turbulence->divDevReff(Urel)
+ SRF->Su()
);
UrelEqn().relax();
solve(UrelEqn() == -fvc::grad(p));
p.boundaryField().updateCoeffs();
volScalarField AUrel = UrelEqn().A();
Urel = UrelEqn().H()/AUrel;
UrelEqn.clear();
phi = fvc::interpolate(Urel) & mesh.Sf();
adjustPhi(phi, Urel, p);
// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(1.0/AUrel, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
# include "continuityErrs.H"
// Explicitly relax pressure for momentum corrector
p.relax();
// Momentum corrector
Urel -= fvc::grad(p)/AUrel;
Urel.correctBoundaryConditions();
}
turbulence->correct();
// Recalculate Uabs
Uabs = Urel + SRF->U();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return(0);
}
// ************************************************************************* //

View file

@ -1,109 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
MRFInterFoam
Description
Solver for 2 incompressible, isothermal immiscible fluids using a VOF
(volume of fluid) phase-fraction based interface capturing approach.
The momentum and other fluid properties are of the "mixture" and a single
momentum equation is solved.
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
For a two-fluid approach see twoPhaseEulerFoam.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "MULES.H"
#include "subCycle.H"
#include "interfaceProperties.H"
#include "twoPhaseMixture.H"
#include "turbulenceModel.H"
#include "MRFZones.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createMRFZones.H"
#include "readTimeControls.H"
#include "correctPhi.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readPISOControls.H"
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
twoPhaseProperties.correct();
#include "alphaEqnSubCycle.H"
#include "UEqn.H"
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
#include "pEqn.H"
}
#include "continuityErrs.H"
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View file

@ -1,3 +0,0 @@
MRFInterFoam.C
EXE = $(FOAM_USER_APPBIN)/MRFInterFoam

View file

@ -1,15 +0,0 @@
EXE_INC = \
-I$(FOAM_SOLVERS)/multiphase/interFoam \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-linterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume

View file

@ -1,35 +0,0 @@
surfaceScalarField muEff
(
"muEff",
twoPhaseProperties.muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
);
mrfZones.addCoriolis(rho, UEqn);
UEqn.relax();
if (momentumPredictor)
{
solve
(
UEqn
==
fvc::reconstruct
(
fvc::interpolate(rho)*(g & mesh.Sf())
+ (
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
- fvc::snGrad(pd)
) * mesh.magSf()
)
);
}

View file

@ -1,2 +0,0 @@
MRFZones mrfZones(mesh);
mrfZones.correctBoundaryVelocity(U);

View file

@ -1,49 +0,0 @@
{
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rUAf = fvc::interpolate(rUA);
U = rUA*UEqn.H();
surfaceScalarField phiU
(
"phiU",
(fvc::interpolate(U) & mesh.Sf())
//+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
mrfZones.relativeFlux(phiU);
phi = phiU +
(
fvc::interpolate(interface.sigmaK())*
fvc::snGrad(alpha1)*mesh.magSf()
+ fvc::interpolate(rho)*(g & mesh.Sf())
)*rUAf;
adjustPhi(phi, U, p);
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pdEqn
(
fvm::laplacian(rUAf, pd) == fvc::div(phi)
);
pdEqn.setReference(pdRefCell, pdRefValue);
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
{
pdEqn.solve(mesh.solutionDict().solver(pd.name() + "Final"));
}
else
{
pdEqn.solve(mesh.solutionDict().solver(pd.name()));
}
if (nonOrth == nNonOrthCorr)
{
phi -= pdEqn.flux();
}
}
U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
U.correctBoundaryConditions();
}

Some files were not shown because too many files have changed in this diff Show more