GIT: Resolved conflict

This commit is contained in:
Andrew Heather
2016-12-14 15:56:58 +00:00
779 changed files with 25526 additions and 42273 deletions

3
.gitignore vendored
View File

@ -75,9 +75,10 @@ doc/Doxygen/DTAGS
# Ignore .tags in the main directory # Ignore .tags in the main directory
/.tags /.tags
# Ignore eclipse project files in the main directory # Ignore project files in the main directory
/.cproject /.cproject
/.project /.project
/.dir-locals.el
# Ignore the test directory # Ignore the test directory
/tutorialsTest /tutorialsTest

View File

@ -17,10 +17,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
exit 1 exit 1
} }
set -x
wmake -all $targetType solvers wmake -all $targetType solvers
wmake -all $targetType utilities wmake -all $targetType utilities
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -12,7 +12,7 @@
( (
"initialConditions", "initialConditions",
runTime.constant(), runTime.constant(),
runTime, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
@ -37,7 +37,7 @@
( (
"rho", "rho",
runTime.timeName(), runTime.timeName(),
runTime, mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -50,7 +50,7 @@
( (
"Rspecific", "Rspecific",
runTime.timeName(), runTime.timeName(),
runTime, mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -69,7 +69,7 @@
( (
"U", "U",
runTime.timeName(), runTime.timeName(),
runTime, mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso BCs wclean libso BCs
wclean wclean

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
(wmake $targetType BCs && wmake $targetType && wmake $targetType rhoCentralDyMFoam) (wmake $targetType BCs && wmake $targetType && wmake $targetType rhoCentralDyMFoam)

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 cd ${0%/*} || exit 1
set -x
wclean libso DPMTurbulenceModels wclean libso DPMTurbulenceModels
wclean wclean

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType DPMTurbulenceModels wmake $targetType DPMTurbulenceModels

View File

@ -1,8 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso CompressibleTwoPhaseMixtureTurbulenceModels wclean libso CompressibleTwoPhaseMixtureTurbulenceModels
wclean wclean
# ----------------------------------------------------------------- end-of-file #------------------------------------------------------------------------------

View File

@ -1,8 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso CompressibleTwoPhaseMixtureTurbulenceModels wmake libso CompressibleTwoPhaseMixtureTurbulenceModels
wmake wmake
# ----------------------------------------------------------------- end-of-file #------------------------------------------------------------------------------

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso twoPhaseMixtureThermo wclean libso twoPhaseMixtureThermo
wclean wclean

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType twoPhaseMixtureThermo wmake $targetType twoPhaseMixtureThermo

View File

@ -5,7 +5,7 @@
+ fvm::div(rhoPhi, T) + fvm::div(rhoPhi, T)
- fvm::laplacian(mixture.alphaEff(turbulence->mut()), T) - fvm::laplacian(mixture.alphaEff(turbulence->mut()), T)
+ ( + (
fvc::div(fvc::absolute(phi, U), p) divU*p
+ fvc::ddt(rho, K) + fvc::div(rhoPhi, K) + fvc::ddt(rho, K) + fvc::div(rhoPhi, K)
) )
*( *(

View File

@ -82,12 +82,12 @@ int main(int argc, char *argv[])
{ {
#include "readControls.H" #include "readControls.H"
{ // Store divU from the previous mesh so that it can be mapped
// Store divU from the previous mesh so that it can be mapped // and used in correctPhi to ensure the corrected phi has the
// and used in correctPhi to ensure the corrected phi has the // same divergence
// same divergence volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
{
#include "CourantNo.H" #include "CourantNo.H"
#include "setDeltaT.H" #include "setDeltaT.H"
@ -110,8 +110,12 @@ int main(int argc, char *argv[])
ghf = (g & mesh.Cf()) - ghRef; ghf = (g & mesh.Cf()) - ghRef;
} }
if (mesh.changing() && correctPhi) if ((correctPhi && mesh.changing()) || mesh.topoChanging())
{ {
// Calculate absolute flux from the mapped surface velocity
// SAF: temporary fix until mapped Uf is assessed
Uf = fvc::interpolate(U);
// Calculate absolute flux from the mapped surface velocity // Calculate absolute flux from the mapped surface velocity
phi = mesh.Sf() & Uf; phi = mesh.Sf() & Uf;
@ -119,6 +123,8 @@ int main(int argc, char *argv[])
// Make the fluxes relative to the mesh motion // Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U); fvc::makeRelative(phi, U);
mesh.topoChanging(false);
} }
} }

View File

@ -87,15 +87,6 @@
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
p_rgh = p - (alpha1*rho1 + alpha2*rho2)*gh;
dgdt =
(
pos(alpha2)*(p_rghEqnComp2 & p_rgh)/rho2
- pos(alpha1)*(p_rghEqnComp1 & p_rgh)/rho1
);
phi = phiHbyA + p_rghEqnIncomp.flux(); phi = phiHbyA + p_rghEqnIncomp.flux();
U = HbyA U = HbyA
@ -116,10 +107,16 @@
rho = alpha1*rho1 + alpha2*rho2; rho = alpha1*rho1 + alpha2*rho2;
// Correct p_rgh for consistency with p and the updated densities p = max(p_rgh + rho*gh, pMin);
p_rgh = p - rho*gh; p_rgh = p - rho*gh;
p_rgh.correctBoundaryConditions(); p_rgh.correctBoundaryConditions();
dgdt =
(
pos(alpha2)*(p_rghEqnComp2 & p_rgh)/rho2
- pos(alpha1)*(p_rghEqnComp1 & p_rgh)/rho1
);
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
Info<< "max(U) " << max(mag(U)).value() << endl; Info<< "max(U) " << max(mag(U)).value() << endl;

View File

@ -98,6 +98,7 @@ int main(int argc, char *argv[])
solve(fvm::ddt(rho) + fvc::div(rhoPhi)); solve(fvm::ddt(rho) + fvc::div(rhoPhi));
#include "UEqn.H" #include "UEqn.H"
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
#include "TEqn.H" #include "TEqn.H"
// --- Pressure corrector loop // --- Pressure corrector loop

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso multiphaseMixtureThermo wclean libso multiphaseMixtureThermo
wclean wclean

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType multiphaseMixtureThermo wmake $targetType multiphaseMixtureThermo
wmake $targetType wmake $targetType

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso mixtureViscosityModels wclean libso mixtureViscosityModels
wclean libso relativeVelocityModels wclean libso relativeVelocityModels

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType mixtureViscosityModels wmake $targetType mixtureViscosityModels
wmake $targetType relativeVelocityModels wmake $targetType relativeVelocityModels

View File

@ -24,6 +24,9 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "relativeVelocityModel.H" #include "relativeVelocityModel.H"
#include "fixedValueFvPatchFields.H"
#include "slipFvPatchFields.H"
#include "partialSlipFvPatchFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -33,6 +36,34 @@ namespace Foam
defineRunTimeSelectionTable(relativeVelocityModel, dictionary); defineRunTimeSelectionTable(relativeVelocityModel, dictionary);
} }
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam::wordList Foam::relativeVelocityModel::UdmPatchFieldTypes() const
{
const volVectorField& U = mixture_.U();
wordList UdmTypes
(
U.boundaryField().size(),
calculatedFvPatchScalarField::typeName
);
forAll(U.boundaryField(), i)
{
if
(
isA<fixedValueFvPatchVectorField>(U.boundaryField()[i])
|| isA<slipFvPatchVectorField>(U.boundaryField()[i])
|| isA<partialSlipFvPatchVectorField>(U.boundaryField()[i])
)
{
UdmTypes[i] = fixedValueFvPatchVectorField::typeName;
}
}
return UdmTypes;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -55,11 +86,12 @@ Foam::relativeVelocityModel::relativeVelocityModel
"Udm", "Udm",
alphac_.time().timeName(), alphac_.time().timeName(),
alphac_.mesh(), alphac_.mesh(),
IOobject::NO_READ, IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
alphac_.mesh(), alphac_.mesh(),
dimensionedVector("Udm", dimVelocity, Zero) dimensionedVector("Udm", dimVelocity, Zero),
UdmPatchFieldTypes()
) )
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -52,12 +52,16 @@ class relativeVelocityModel
{ {
// Private Member Functions // Private Member Functions
//- Return the list of patchFieldTypes for Udm derived from U
wordList UdmPatchFieldTypes() const;
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
relativeVelocityModel(const relativeVelocityModel&); relativeVelocityModel(const relativeVelocityModel&);
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const relativeVelocityModel&); void operator=(const relativeVelocityModel&);
protected: protected:
// Protected data // Protected data

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso temperaturePhaseChangeTwoPhaseMixtures wclean libso temperaturePhaseChangeTwoPhaseMixtures
wclean wclean

View File

@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
targetType=libso targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType temperaturePhaseChangeTwoPhaseMixtures wmake $targetType temperaturePhaseChangeTwoPhaseMixtures
wmake wmake

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso phaseChangeTwoPhaseMixtures wclean libso phaseChangeTwoPhaseMixtures
wclean wclean

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType phaseChangeTwoPhaseMixtures wmake $targetType phaseChangeTwoPhaseMixtures
wmake $targetType wmake $targetType

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso multiphaseSystem wclean libso multiphaseSystem
wclean libso interfacialModels wclean libso interfacialModels

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmakeLnInclude interfacialModels wmakeLnInclude interfacialModels
wmake $targetType multiphaseSystem wmake $targetType multiphaseSystem

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso multiphaseMixture wclean libso multiphaseMixture
wclean wclean

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType multiphaseMixture wmake $targetType multiphaseMixture
wmake $targetType wmake $targetType

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso phaseSystems wclean libso phaseSystems
wclean libso interfacialModels wclean libso interfacialModels

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmakeLnInclude interfacialModels wmakeLnInclude interfacialModels
wmakeLnInclude interfacialCompositionModels wmakeLnInclude interfacialCompositionModels

View File

@ -77,11 +77,39 @@ void Foam::AnisothermalPhaseModel<BasePhaseModel>::correctThermo()
} }
template<class BasePhaseModel>
Foam::tmp<Foam::volScalarField>
Foam::AnisothermalPhaseModel<BasePhaseModel>::filterPressureWork
(
const tmp<volScalarField>& pressureWork
) const
{
const volScalarField& alpha = *this;
scalar pressureWorkAlphaLimit =
this->thermo_->lookupOrDefault("pressureWorkAlphaLimit", 0.0);
if (pressureWorkAlphaLimit > 0)
{
return
(
max(alpha - pressureWorkAlphaLimit, scalar(0))
/max(alpha - pressureWorkAlphaLimit, pressureWorkAlphaLimit)
)*pressureWork;
}
else
{
return pressureWork;
}
}
template<class BasePhaseModel> template<class BasePhaseModel>
Foam::tmp<Foam::fvScalarMatrix> Foam::tmp<Foam::fvScalarMatrix>
Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn() Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
{ {
const volScalarField& alpha = *this; const volScalarField& alpha = *this;
const volVectorField& U = this->U();
const surfaceScalarField& alphaPhi = this->alphaPhi(); const surfaceScalarField& alphaPhi = this->alphaPhi();
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi(); const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi();
@ -93,7 +121,8 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
tmp<fvScalarMatrix> tEEqn tmp<fvScalarMatrix> tEEqn
( (
fvm::ddt(alpha, this->rho(), he) + fvm::div(alphaRhoPhi, he) fvm::ddt(alpha, this->rho(), he)
+ fvm::div(alphaRhoPhi, he)
- fvm::Sp(contErr, he) - fvm::Sp(contErr, he)
+ fvc::ddt(alpha, this->rho(), K_) + fvc::div(alphaRhoPhi, K_) + fvc::ddt(alpha, this->rho(), K_) + fvc::div(alphaRhoPhi, K_)
@ -112,13 +141,15 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
// Add the appropriate pressure-work term // Add the appropriate pressure-work term
if (he.name() == this->thermo_->phasePropertyName("e")) if (he.name() == this->thermo_->phasePropertyName("e"))
{ {
tEEqn.ref() += tEEqn.ref() += filterPressureWork
fvc::ddt(alpha)*this->thermo().p() (
+ fvc::div(alphaPhi, this->thermo().p()); fvc::div(fvc::absolute(alphaPhi, alpha, U), this->thermo().p())
+ this->thermo().p()*fvc::ddt(alpha)
);
} }
else if (this->thermo_->dpdt()) else if (this->thermo_->dpdt())
{ {
tEEqn.ref() -= alpha*this->fluid().dpdt(); tEEqn.ref() -= filterPressureWork(alpha*this->fluid().dpdt());
} }
return tEEqn; return tEEqn;

View File

@ -58,6 +58,15 @@ class AnisothermalPhaseModel
volScalarField K_; volScalarField K_;
// Private member functions
//- Optionally filter the pressure work term as the phase-fraction -> 0
tmp<volScalarField> filterPressureWork
(
const tmp<volScalarField>& pressureWork
) const;
public: public:
// Constructors // Constructors

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -40,7 +40,12 @@ Foam::ReactingPhaseModel<BasePhaseModel, ReactionType>::ReactingPhaseModel
BasePhaseModel(fluid, phaseName, index, false), BasePhaseModel(fluid, phaseName, index, false),
reaction_ reaction_
( (
ReactionType::New(fluid.mesh(), this->name()) ReactionType::New
(
fluid.mesh(),
combustionModel::combustionPropertiesName,
this->name()
)
) )
{ {
this->thermo_ = &reaction_->thermo(); this->thermo_ = &reaction_->thermo();

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso multiphaseSystem wclean libso multiphaseSystem
wclean libso multiphaseCompressibleTurbulenceModels wclean libso multiphaseCompressibleTurbulenceModels

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType multiphaseSystem wmake $targetType multiphaseSystem
wmake $targetType multiphaseCompressibleTurbulenceModels wmake $targetType multiphaseCompressibleTurbulenceModels

View File

@ -35,6 +35,7 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
} }
fluid.correctThermo(); fluid.correctThermo();
fluid.correct();
} }

View File

@ -89,9 +89,6 @@ PtrList<surfaceScalarField> phiFs(phases.size());
// --- Pressure corrector loop // --- Pressure corrector loop
while (pimple.correct()) while (pimple.correct())
{ {
// Update continuity errors due to temperature changes
fluid.correct();
volScalarField rho("rho", fluid.rho()); volScalarField rho("rho", fluid.rho());
// Correct p_rgh for consistency with p and the updated densities // Correct p_rgh for consistency with p and the updated densities

View File

@ -77,11 +77,6 @@ int main(int argc, char *argv[])
//#include "pUf/createDDtU.H" //#include "pUf/createDDtU.H"
int nEnergyCorrectors
(
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
@ -90,6 +85,11 @@ int main(int argc, char *argv[])
{ {
#include "readTimeControls.H" #include "readTimeControls.H"
int nEnergyCorrectors
(
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
);
if (LTS) if (LTS)
{ {
#include "setRDeltaT.H" #include "setRDeltaT.H"

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso twoPhaseSystem wclean libso twoPhaseSystem
wclean libso twoPhaseCompressibleTurbulenceModels wclean libso twoPhaseCompressibleTurbulenceModels

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType twoPhaseSystem wmake $targetType twoPhaseSystem
wmake $targetType twoPhaseCompressibleTurbulenceModels wmake $targetType twoPhaseCompressibleTurbulenceModels

View File

@ -29,36 +29,25 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
} }
{ {
tmp<fvScalarMatrix> E2eqn(phase2.heEqn()); tmp<fvScalarMatrix> E2Eqn(phase2.heEqn());
if (E2eqn.valid()) if (E2Eqn.valid())
{ {
E2eqn = E2Eqn =
( (
E2eqn E2Eqn
== ==
*heatTransfer[phase2.name()] *heatTransfer[phase2.name()]
+ alpha2*rho2*(U2&g) + alpha2*rho2*(U2&g)
+ fvOptions(alpha2, rho2, phase2.thermo().he()) + fvOptions(alpha2, rho2, phase2.thermo().he())
); );
E2eqn->relax(); E2Eqn->relax();
fvOptions.constrain(E2eqn.ref()); fvOptions.constrain(E2Eqn.ref());
E2eqn->solve(); E2Eqn->solve();
} }
} }
fluid.correctThermo(); fluid.correctThermo();
fluid.correct();
} }
Info<< phase1.name() << " min/max T "
<< min(phase1.thermo().T()).value()
<< " - "
<< max(phase1.thermo().T()).value()
<< endl;
Info<< phase2.name() << " min/max T "
<< min(phase2.thermo().T()).value()
<< " - "
<< max(phase2.thermo().T()).value()
<< endl;

View File

@ -0,0 +1,21 @@
tmp<surfaceScalarField> trDeltaTf;
if (LTS && faceMomentum)
{
trDeltaTf = tmp<surfaceScalarField>
(
new surfaceScalarField
(
IOobject
(
fv::localEulerDdt::rDeltaTfName,
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("one", dimless/dimTime, 1)
)
);
}

View File

@ -83,9 +83,6 @@ tmp<surfaceScalarField> phiF2;
// --- Pressure corrector loop // --- Pressure corrector loop
while (pimple.correct()) while (pimple.correct())
{ {
// Update continuity errors due to temperature changes
fluid.correct();
volScalarField rho("rho", fluid.rho()); volScalarField rho("rho", fluid.rho());
// Correct p_rgh for consistency with p and the updated densities // Correct p_rgh for consistency with p and the updated densities

View File

@ -1,9 +1,2 @@
ddtPhi1 = ddtPhi1 = fvc::ddt(phi1);
( ddtPhi2 = fvc::ddt(phi2);
(phi1 - phi1.oldTime())/runTime.deltaT()
);
ddtPhi2 =
(
(phi2 - phi2.oldTime())/runTime.deltaT()
);

View File

@ -1,9 +1,2 @@
surfaceScalarField ddtPhi1 surfaceScalarField ddtPhi1(fvc::ddt(phi1));
( surfaceScalarField ddtPhi2(fvc::ddt(phi2));
(phi1 - phi1.oldTime())/runTime.deltaT()
);
surfaceScalarField ddtPhi2
(
(phi2 - phi2.oldTime())/runTime.deltaT()
);

View File

@ -32,10 +32,10 @@ surfaceScalarField rAUf1
IOobject::groupName("rAUf", phase1.name()), IOobject::groupName("rAUf", phase1.name()),
1.0 1.0
/( /(
(alphaRhof10 + Vmf)/runTime.deltaT() byDt(alphaRhof10 + Vmf)
+ fvc::interpolate(U1Eqn.A()) + fvc::interpolate(U1Eqn.A())
+ Kdf + Kdf
) )
); );
surfaceScalarField rAUf2 surfaceScalarField rAUf2
@ -43,10 +43,10 @@ surfaceScalarField rAUf2
IOobject::groupName("rAUf", phase2.name()), IOobject::groupName("rAUf", phase2.name()),
1.0 1.0
/( /(
(alphaRhof20 + Vmf)/runTime.deltaT() byDt(alphaRhof20 + Vmf)
+ fvc::interpolate(U2Eqn.A()) + fvc::interpolate(U2Eqn.A())
+ Kdf + Kdf
) )
); );
@ -93,9 +93,6 @@ tmp<surfaceScalarField> Ff2;
while (pimple.correct()) while (pimple.correct())
{ {
// Update continuity errors due to temperature changes
fluid.correct();
volScalarField rho("rho", fluid.rho()); volScalarField rho("rho", fluid.rho());
// Correct p_rgh for consistency with p and the updated densities // Correct p_rgh for consistency with p and the updated densities
@ -160,7 +157,7 @@ while (pimple.correct())
rAUf1 rAUf1
*( *(
(alphaRhof10 + Vmf) (alphaRhof10 + Vmf)
*MRF.absolute(phi1.oldTime())/runTime.deltaT() *byDt(MRF.absolute(phi1.oldTime()))
+ fvc::flux(U1Eqn.H()) + fvc::flux(U1Eqn.H())
+ Vmf*ddtPhi2 + Vmf*ddtPhi2
+ Kdf*MRF.absolute(phi2) + Kdf*MRF.absolute(phi2)
@ -178,7 +175,7 @@ while (pimple.correct())
rAUf2 rAUf2
*( *(
(alphaRhof20 + Vmf) (alphaRhof20 + Vmf)
*MRF.absolute(phi2.oldTime())/runTime.deltaT() *byDt(MRF.absolute(phi2.oldTime()))
+ fvc::flux(U2Eqn.H()) + fvc::flux(U2Eqn.H())
+ Vmf*ddtPhi1 + Vmf*ddtPhi1
+ Kdf*MRF.absolute(phi1) + Kdf*MRF.absolute(phi1)

View File

@ -43,6 +43,22 @@ Description
#include "localEulerDdtScheme.H" #include "localEulerDdtScheme.H"
#include "fvcSmooth.H" #include "fvcSmooth.H"
namespace Foam
{
tmp<surfaceScalarField> byDt(const surfaceScalarField& sf)
{
if (fv::localEulerDdt::enabled(sf.mesh()))
{
return fv::localEulerDdt::localRDeltaTf(sf.mesh())*sf;
}
else
{
return sf/sf.mesh().time().deltaT();
}
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[]) int main(int argc, char *argv[])
@ -76,13 +92,9 @@ int main(int argc, char *argv[])
) )
); );
#include "createRDeltaTf.H"
#include "pUf/createDDtU.H" #include "pUf/createDDtU.H"
int nEnergyCorrectors
(
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
@ -91,9 +103,18 @@ int main(int argc, char *argv[])
{ {
#include "readTimeControls.H" #include "readTimeControls.H"
int nEnergyCorrectors
(
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
);
if (LTS) if (LTS)
{ {
#include "setRDeltaT.H" #include "setRDeltaT.H"
if (faceMomentum)
{
#include "setRDeltaTf.H"
}
} }
else else
{ {

View File

@ -0,0 +1 @@
trDeltaTf.ref() = fvc::interpolate(fv::localEulerDdt::localRDeltaT(mesh));

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso twoPhaseSystem wclean libso twoPhaseSystem
wclean libso interfacialModels wclean libso interfacialModels

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmakeLnInclude interfacialModels wmakeLnInclude interfacialModels
wmake $targetType twoPhaseSystem wmake $targetType twoPhaseSystem

View File

@ -16,7 +16,8 @@
- contErr1*K1 - contErr1*K1
+ ( + (
he1.name() == thermo1.phasePropertyName("e") he1.name() == thermo1.phasePropertyName("e")
? fvc::ddt(alpha1)*p + fvc::div(alphaPhi1, p) ? fvc::div(fvc::absolute(alphaPhi1, alpha1, U1), p)
+ p*fvc::ddt(alpha1)
: -alpha1*dpdt : -alpha1*dpdt
) )
@ -48,7 +49,8 @@
- contErr2*K2 - contErr2*K2
+ ( + (
he2.name() == thermo2.phasePropertyName("e") he2.name() == thermo2.phasePropertyName("e")
? fvc::ddt(alpha2)*p + fvc::div(alphaPhi2, p) ? fvc::div(fvc::absolute(alphaPhi2, alpha2, U2), p)
+ p*fvc::ddt(alpha1)
: -alpha2*dpdt : -alpha2*dpdt
) )

View File

@ -248,4 +248,30 @@ bool Foam::phaseModel::read(const dictionary& phaseProperties)
} }
void Foam::phaseModel::correctInflowFlux(surfaceScalarField& alphaPhi) const
{
surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef();
// Ensure that the flux at inflow BCs is preserved
forAll(alphaPhiBf, patchi)
{
fvsPatchScalarField& alphaPhip = alphaPhiBf[patchi];
if (!alphaPhip.coupled())
{
const scalarField& phip = phi().boundaryField()[patchi];
const scalarField& alphap = boundaryField()[patchi];
forAll(alphaPhip, facei)
{
if (phip[facei] < SMALL)
{
alphaPhip[facei] = alphap[facei]*phip[facei];
}
}
}
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -319,6 +319,9 @@ public:
return alphaRhoPhi_; return alphaRhoPhi_;
} }
//- Ensure that the flux at inflow BCs is preserved
void correctInflowFlux(surfaceScalarField& alphaPhi) const;
//- Correct the phase properties //- Correct the phase properties
// other than the thermodynamics and turbulence // other than the thermodynamics and turbulence
// which have special treatment // which have special treatment

View File

@ -444,28 +444,7 @@ void Foam::twoPhaseSystem::solve()
) )
); );
surfaceScalarField::Boundary& alphaPhic1Bf = phase1_.correctInflowFlux(alphaPhic1);
alphaPhic1.boundaryFieldRef();
// Ensure that the flux at inflow BCs is preserved
forAll(alphaPhic1Bf, patchi)
{
fvsPatchScalarField& alphaPhic1p = alphaPhic1Bf[patchi];
if (!alphaPhic1p.coupled())
{
const scalarField& phi1p = phi1.boundaryField()[patchi];
const scalarField& alpha1p = alpha1.boundaryField()[patchi];
forAll(alphaPhic1p, facei)
{
if (phi1p[facei] < 0)
{
alphaPhic1p[facei] = alpha1p[facei]*phi1p[facei];
}
}
}
}
if (nAlphaSubCycles > 1) if (nAlphaSubCycles > 1)
{ {
@ -537,6 +516,7 @@ void Foam::twoPhaseSystem::solve()
phase2_.alphaPhi() = phi_ - phase1_.alphaPhi(); phase2_.alphaPhi() = phi_ - phase1_.alphaPhi();
alpha2 = scalar(1) - alpha1; alpha2 = scalar(1) - alpha1;
phase2_.correctInflowFlux(phase2_.alphaPhi());
phase2_.alphaRhoPhi() = phase2_.alphaRhoPhi() =
fvc::interpolate(phase2_.rho())*phase2_.alphaPhi(); fvc::interpolate(phase2_.rho())*phase2_.alphaPhi();

View File

@ -81,6 +81,10 @@ int main(int argc, char *argv[])
} }
Pout<< "zero scalar (time): " << dimensionedScalar(dimTime) << endl;
Pout<< "zero vector: " << dimensionedVector(dimLength) << endl;
Pout<< "zero tensor: " << dimensionedTensor(dimLength) << endl;
Info<< "End\n" << endl; Info<< "End\n" << endl;
return 0; return 0;

View File

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

View File

@ -0,0 +1,2 @@
/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */
/* EXE_LIBS = -lfiniteVolume */

View File

@ -0,0 +1,285 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
Application
Test-objectRegistry
Description
Simple test of objectRegistry functionality.
Particular focus on the behaviour of subRegistry.
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "Time.H"
#include "polyMesh.H"
#include "IOstreams.H"
#include "objectRegistry.H"
#include "hashedWordList.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// file variable, needed for switching the default in lookupObject etc.
bool recursive = false;
template<class Type>
Foam::Ostream& printList(Foam::Ostream& os, const UList<Type>& list)
{
// list with out any linebreaks
os << '(';
forAll(list, i)
{
if (i) os << ' ';
os << list[i];
}
os << ')';
return os;
}
void printRegistry
(
Foam::Ostream& os,
const Foam::objectRegistry& obr,
Foam::label indent = 4
);
void printRegistry
(
Foam::Ostream& os,
const Foam::objectRegistry& obr,
Foam::label indent
)
{
wordList names = obr.sortedNames();
hashedWordList regs = obr.sortedNames<objectRegistry>();
std::string prefix;
for (label i=indent; i; --i)
{
prefix += ' ';
}
os << '#' << prefix.c_str() << obr.name()
<< " parent:" << obr.parent().name() << nl;
// all names
{
os << ' ' << prefix.c_str() << "objects: ";
printList(os, names) << nl;
}
// sub-registry names
{
os << ' ' << prefix.c_str() << "registries: ";
printList(os, regs) << nl;
}
// Print, but skip expansion of sub-registries for now
forAll(names, i)
{
const word& name = names[i];
os << (regs.found(name) ? '-' : ' ')
<< prefix.c_str() << name << " => " << obr[name]->type() << nl;
}
for (label i=indent; i; --i)
{
os << '-'; // divider
}
os << '\n';
// Now descend into the sub-registries
forAll(regs, i)
{
const word& name = regs[i];
const objectRegistry& next = obr.lookupObject<objectRegistry>
(
name,
recursive
);
os << prefix.c_str()
<< "current:" << obr.name() << " next:"
<< next.name() << " next-parent:" << next.parent().name() << nl;
os << prefix.c_str() << name << " => " << obr[name]->type();
if ("dictionary" == obr[name]->type())
{
os << " (skip dictionary)" << nl;
}
else
{
os << nl;
printRegistry(os, next, indent + 4);
}
}
}
// Main program:
int main(int argc, char *argv[])
{
argList::noBanner();
argList::noParallel();
argList::addBoolOption
(
"mesh",
"test with polyMesh objectRegistry instead of runTime"
);
argList::addBoolOption
(
"skip",
"skip some parts"
);
argList::validArgs.append("recursive (true|false)");
#include "setRootCase.H"
#include "createTime.H"
#include "createPolyMesh.H"
recursive = Switch(args[1]);
const bool optMesh = args.optionFound("mesh");
const bool optSkip = args.optionFound("skip");
const objectRegistry& db = (optMesh ? mesh.thisDb() : runTime);
Info<<"## start ##" << nl;
printRegistry(Info, db);
Info<< nl;
const label nRegs = 3;
// Add some items
for (label j = 0; j < 3; ++j)
{
word entryName = "entry" + name(j);
db.subRegistry
(
entryName,
true,
recursive
);
}
Info<<"## initally populated ##" << nl;
printRegistry(Info, db);
Info<< nl;
// create a few sub-registries
for (label i = 0; i < nRegs; ++i)
{
word regName = "subreg" + name(i);
const objectRegistry& subreg = db.subRegistry
(
regName,
true,
recursive
);
for (label j = 0; j < 3; ++j)
{
word entryName = "entry" + name(j);
subreg.subRegistry
(
entryName,
true,
recursive
);
subreg.subRegistry
(
"$" + entryName, // qualified to avoid collisions
true,
recursive
);
}
}
Info<<"## after adding sub-registries" << nl;
printRegistry(Info, db);
Info<< nl;
// Add further items into top-level
for (label j = 0; j < 6; ++j)
{
word entryName = "entry" + name(j);
db.subRegistry
(
entryName,
true,
recursive
);
}
Info<< "after adding some entries, top-level now contains: ";
printList(Info, db.names()) << endl;
Info<<"## Now attempt to add a few more entries ##" << nl;
// Try adding the same items into sub registry
// create a few sub-registries
for (label i = 0; i < nRegs; ++i)
{
word regName = "subreg" + name(i);
const objectRegistry& subreg = db.subRegistry
(
regName,
false,
recursive
);
if (!optSkip)
{
for (label j = 0; j < 6; ++j)
{
word entryName = "entry" + name(j);
subreg.subRegistry
(
entryName,
true,
recursive
);
}
}
}
Info<<"## Complete picture ##" << nl;
printRegistry(Info, db);
Info<< nl;
return 0;
}
// ************************************************************************* //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -56,7 +56,9 @@ Description
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "faceSet.H" #include "faceSet.H"
#include "cellSet.H" #include "cellSet.H"
#include "pointSet.H"
#include "syncTools.H" #include "syncTools.H"
#include "ReadFields.H"
#include "polyTopoChange.H" #include "polyTopoChange.H"
#include "polyModifyFace.H" #include "polyModifyFace.H"
#include "polyAddFace.H" #include "polyAddFace.H"
@ -315,6 +317,59 @@ void initCreatedPatches
} }
template<class TopoSet>
void subsetTopoSets
(
const fvMesh& mesh,
const IOobjectList& objectsList,
const labelList& map,
const fvMesh& subMesh,
PtrList<TopoSet>& subSets
)
{
// Read original sets
PtrList<TopoSet> sets;
ReadFields<TopoSet>(objectsList, sets);
subSets.setSize(sets.size());
forAll(sets, i)
{
TopoSet& set = sets[i];
Info<< "Subsetting " << set.type() << " " << set.name() << endl;
// Map the data
PackedBoolList isSet(set.maxSize(mesh));
forAllConstIter(labelHashSet, set, iter)
{
isSet[iter.key()] = true;
}
label nSet = 0;
forAll(map, i)
{
if (isSet[map[i]])
{
nSet++;
}
}
subSets.set
(
i,
new TopoSet(subMesh, set.name(), nSet, IOobject::AUTO_WRITE)
);
TopoSet& subSet = subSets[i];
forAll(map, i)
{
if (isSet[map[i]])
{
subSet.insert(i);
}
}
}
}
void createCoupledBaffles void createCoupledBaffles
( (
fvMesh& mesh, fvMesh& mesh,
@ -923,6 +978,41 @@ int main(int argc, char *argv[])
surfTensorFlds surfTensorFlds
); );
// Set handling
PtrList<cellSet> cellSets;
PtrList<faceSet> faceSets;
PtrList<pointSet> pointSets;
{
IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets");
subsetTopoSets
(
mesh,
objects,
subsetter.cellMap(),
subsetter.subMesh(),
cellSets
);
subsetTopoSets
(
mesh,
objects,
subsetter.faceMap(),
subsetter.subMesh(),
faceSets
);
subsetTopoSets
(
mesh,
objects,
subsetter.pointMap(),
subsetter.subMesh(),
pointSets
);
}
if (!overwrite) if (!overwrite)
{ {
runTime++; runTime++;
@ -1134,6 +1224,11 @@ int main(int argc, char *argv[])
Zero Zero
); );
// Update numbering of topoSets
topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, cellSets);
topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, faceSets);
topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, pointSets);
// Move mesh (since morphing might not do this) // Move mesh (since morphing might not do this)
if (map().hasMotionPoints()) if (map().hasMotionPoints())

View File

@ -1,9 +1,11 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lreconstruct \
-ldynamicMesh -ldynamicMesh

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -48,7 +48,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "PstreamReduceOps.H"
#include "argList.H" #include "argList.H"
#include "Time.H" #include "Time.H"
#include "polyTopoChange.H" #include "polyTopoChange.H"
@ -60,6 +59,9 @@ Description
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "unitConversion.H" #include "unitConversion.H"
#include "motionSmoother.H" #include "motionSmoother.H"
#include "topoSet.H"
#include "processorMeshes.H"
#include "PstreamReduceOps.H"
using namespace Foam; using namespace Foam;
@ -450,6 +452,8 @@ int main(int argc, char *argv[])
Info<< "Writing morphed mesh to time " << runTime.timeName() << endl; Info<< "Writing morphed mesh to time " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
} }
else else
{ {

View File

@ -1,7 +1,10 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-lreconstruct \
-ldynamicMesh -ldynamicMesh

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -62,6 +62,8 @@ Description
#include "meshTools.H" #include "meshTools.H"
#include "Pair.H" #include "Pair.H"
#include "globalIndex.H" #include "globalIndex.H"
#include "topoSet.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -567,6 +569,8 @@ int main(int argc, char *argv[])
// Write resulting mesh // Write resulting mesh
Info<< "Writing modified mesh to time " << runTime.timeName() << endl; Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
} }
else if (edgeToPos.size()) else if (edgeToPos.size())
{ {
@ -641,6 +645,8 @@ int main(int argc, char *argv[])
// Write resulting mesh // Write resulting mesh
Info<< "Writing modified mesh to time " << runTime.timeName() << endl; Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
} }
else else
{ {
@ -684,6 +690,8 @@ int main(int argc, char *argv[])
// Write resulting mesh // Write resulting mesh
Info<< "Writing modified mesh to time " << runTime.timeName() << endl; Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
} }

View File

@ -1,11 +1,10 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lreconstruct \
-ldynamicMesh \ -ldynamicMesh \
-lmeshTools \
-lfiniteVolume \
-lgenericPatchFields -lgenericPatchFields

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -49,6 +49,7 @@ Description
#include "surfaceFields.H" #include "surfaceFields.H"
#include "pointFields.H" #include "pointFields.H"
#include "ReadFields.H" #include "ReadFields.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -197,6 +198,8 @@ int main(int argc, char *argv[])
mesh.write(); mesh.write();
meshCutter.write(); meshCutter.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -1,7 +1,10 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-ldynamicMesh \ -ldynamicMesh \
-lreconstruct \
-lmeshTools -lmeshTools

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -53,6 +53,7 @@ Description
#include "cellCuts.H" #include "cellCuts.H"
#include "cellSet.H" #include "cellSet.H"
#include "meshCutter.H" #include "meshCutter.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -257,6 +258,8 @@ int main(int argc, char *argv[])
Info<< "Writing refined mesh to time " << runTime.timeName() << endl; Info<< "Writing refined mesh to time " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -1,10 +1,12 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-ldynamicMesh \ -ldynamicMesh \
-lfiniteVolume \ -lfiniteVolume \
-lreconstruct \
-lgenericPatchFields -lgenericPatchFields

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -44,6 +44,7 @@ Description
#include "ReadFields.H" #include "ReadFields.H"
#include "volFields.H" #include "volFields.H"
#include "surfaceFields.H" #include "surfaceFields.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -179,6 +180,8 @@ int main(int argc, char *argv[])
// Take over refinement levels and write to new time directory. // Take over refinement levels and write to new time directory.
Pout<< "Writing mesh to time " << runTime.timeName() << endl; Pout<< "Writing mesh to time " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
Pout<< "End\n" << endl; Pout<< "End\n" << endl;

View File

@ -11,7 +11,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/etc/config.sh/functions . $WM_PROJECT_DIR/etc/config.sh/functions
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio) _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio)
set -x
# Build libccmio (.a|.so) # Build libccmio (.a|.so)
$WM_THIRD_PARTY_DIR/makeCCMIO lib # libso $WM_THIRD_PARTY_DIR/makeCCMIO lib # libso

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -148,6 +148,15 @@ int main(int argc, char *argv[])
dictPath = dictPath =
runTime.constant() runTime.constant()
/regionPath/polyMesh::meshSubDir/dictName; /regionPath/polyMesh::meshSubDir/dictName;
// Warn that constant/polyMesh/blockMesh was selected instead of
// system/blockMesh
WarningIn(args[0])
<< "Using the old blockMeshDict location: "
<< dictPath << nl
<< " instead of the default location: "
<< runTime.system()/regionPath/dictName << nl
<< endl;
} }
// Otherwise assume the dictionary is present in the system directory // Otherwise assume the dictionary is present in the system directory
else else

View File

@ -4,6 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude -I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \ EXE_LIBS = \
@ -11,4 +12,5 @@ EXE_LIBS = \
-lsurfMesh \ -lsurfMesh \
-lmeshTools \ -lmeshTools \
-ldynamicMesh \ -ldynamicMesh \
-lreconstruct \
-lextrudeModel -lextrudeModel

View File

@ -56,6 +56,7 @@ Description
#include "wedgePolyPatch.H" #include "wedgePolyPatch.H"
#include "planeExtrusion.H" #include "planeExtrusion.H"
#include "emptyPolyPatch.H" #include "emptyPolyPatch.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -1058,6 +1059,8 @@ int main(int argc, char *argv[])
FatalErrorInFunction FatalErrorInFunction
<< exit(FatalError); << exit(FatalError);
} }
// Remove any left-over files
processorMeshes::removeFiles(mesh);
// Need writing cellSet // Need writing cellSet
label nAdded = returnReduce(addedCellsSet.size(), sumOp<label>()); label nAdded = returnReduce(addedCellsSet.size(), sumOp<label>());

View File

@ -3,6 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude -I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \ EXE_LIBS = \
@ -10,4 +11,5 @@ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-ldynamicMesh \ -ldynamicMesh \
-lreconstruct \
-lextrudeModel -lextrudeModel

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -141,6 +141,7 @@ Notes:
#include "fvMeshTools.H" #include "fvMeshTools.H"
#include "OBJstream.H" #include "OBJstream.H"
#include "PatchTools.H" #include "PatchTools.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -2646,6 +2647,8 @@ int main(int argc, char *argv[])
<< " at location " << regionMesh.facesInstance() << " at location " << regionMesh.facesInstance()
<< exit(FatalError); << exit(FatalError);
} }
topoSet::removeFiles(regionMesh);
processorMeshes::removeFiles(regionMesh);
// See if we need to extrude coordinates as well // See if we need to extrude coordinates as well
@ -2847,6 +2850,8 @@ int main(int argc, char *argv[])
<< " at location " << mesh.facesInstance() << " at location " << mesh.facesInstance()
<< exit(FatalError); << exit(FatalError);
} }
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
} }
Info << "End\n" << endl; Info << "End\n" << endl;

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso extrude2DMesh wclean libso extrude2DMesh
wclean wclean

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType extrude2DMesh wmake $targetType extrude2DMesh
wmake $targetType wmake $targetType

View File

@ -2,11 +2,14 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-Iextrude2DMesh/lnInclude \ -Iextrude2DMesh/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude -I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lsurfMesh \ -lsurfMesh \
-ldynamicMesh \ -ldynamicMesh \
-lreconstruct \
-lextrude2DMesh \ -lextrude2DMesh \
-lextrudeModel -lextrudeModel

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -47,6 +47,8 @@ Note
#include "addPatchCellLayer.H" #include "addPatchCellLayer.H"
#include "patchToPoly2DMesh.H" #include "patchToPoly2DMesh.H"
#include "globalIndex.H" #include "globalIndex.H"
#include "topoSet.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -323,6 +325,8 @@ int main(int argc, char *argv[])
<< nl << endl; << nl << endl;
mesh().write(); mesh().write();
topoSet::removeFiles(mesh());
processorMeshes::removeFiles(mesh());
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean conformalVoronoiMesh wclean conformalVoronoiMesh
wclean conformalVoronoi2DMesh wclean conformalVoronoi2DMesh

View File

@ -7,8 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory
if [ -f "$CGAL_ARCH_PATH/include/CGAL/version.h" ] || \ if [ -f "$CGAL_ARCH_PATH/include/CGAL/version.h" ] || \
[ "${CGAL_ARCH_PATH##*-}" = system -a -f /usr/include/CGAL/version.h ] [ "${CGAL_ARCH_PATH##*-}" = system -a -f /usr/include/CGAL/version.h ]
then then
set -x
wmake $targetType conformalVoronoiMesh wmake $targetType conformalVoronoiMesh
wmake $targetType conformalVoronoi2DMesh wmake $targetType conformalVoronoi2DMesh
wmake foamyQuadMesh wmake foamyQuadMesh

View File

@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for compilation (at least for error catching) # Parse arguments for compilation (at least for error catching)
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
if [ -d "${FASTDUALOCTREE_SRC_PATH}" ] if [ -d "${FASTDUALOCTREE_SRC_PATH}" ]
then then

View File

@ -9,6 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
@ -22,4 +23,5 @@ EXE_LIBS = \
-lfileFormats \ -lfileFormats \
-ldynamicMesh \ -ldynamicMesh \
-ldecompose \ -ldecompose \
-lreconstruct \
-lsnappyHexMesh -lsnappyHexMesh

View File

@ -63,6 +63,7 @@ Description
#include "decompositionModel.H" #include "decompositionModel.H"
#include "fvMeshTools.H" #include "fvMeshTools.H"
#include "profiling.H" #include "profiling.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -658,6 +659,13 @@ void writeMesh
meshRefiner.printMeshInfo(debugLevel, msg); meshRefiner.printMeshInfo(debugLevel, msg);
Info<< "Writing mesh to time " << meshRefiner.timeName() << endl; Info<< "Writing mesh to time " << meshRefiner.timeName() << endl;
processorMeshes::removeFiles(mesh);
if (!debugLevel)
{
topoSet::removeFiles(mesh);
}
refinementHistory::removeFiles(mesh);
//label flag = meshRefinement::MESH; //label flag = meshRefinement::MESH;
//if (writeLevel) //if (writeLevel)
//{ //{

View File

@ -431,7 +431,11 @@ snapControls
// (wip) Optional for explicit feature snapping: // (wip) Optional for explicit feature snapping:
//- Detect baffle edges. Default is true. //- Detect baffle edges. Default is true.
//detectBaffles false; //detectBaffles false;
//- Erase attraction close to feature point. Default is false. //- On any faces where points are on multiple regions (see
// multiRegionFeatureSnap) have the other points follow these points
// instead of having their own independent movement, i.e. have snapping
// to multi-region edges/points take priority. This might aid snapping
// to sharp edges that are also region edges. The default is false.
//releasePoints true; //releasePoints true;
//- Walk along feature edges, adding missing ones. Default is true. //- Walk along feature edges, adding missing ones. Default is true.
//stringFeatures false; //stringFeatures false;

View File

@ -2,10 +2,12 @@ EXE_INC = \
-IfaceSelection \ -IfaceSelection \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-ldynamicMesh \ -ldynamicMesh \
-lmeshTools \ -lmeshTools \
-lfiniteVolume \ -lfiniteVolume \
-lreconstruct \
-lgenericPatchFields -lgenericPatchFields

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -53,6 +53,8 @@ Description
#include "faceSelection.H" #include "faceSelection.H"
#include "fvMeshTools.H" #include "fvMeshTools.H"
#include "topoSet.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -978,6 +980,8 @@ int main(int argc, char *argv[])
Info<< "Writing mesh to " << runTime.timeName() << endl; Info<< "Writing mesh to " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -1,7 +1,10 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-ldynamicMesh \ -ldynamicMesh \
-lreconstruct \
-lmeshTools -lmeshTools

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -52,6 +52,7 @@ Description
#include "polyTopoChange.H" #include "polyTopoChange.H"
#include "polyModifyFace.H" #include "polyModifyFace.H"
#include "wordReList.H" #include "wordReList.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -900,6 +901,8 @@ int main(int argc, char *argv[])
// Write resulting mesh // Write resulting mesh
Info<< "Writing repatched mesh to " << runTime.timeName() << nl << endl; Info<< "Writing repatched mesh to " << runTime.timeName() << nl << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -1,6 +1,9 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-ldynamicMesh \ -ldynamicMesh \
-lmeshTools -lreconstruct

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -35,6 +35,8 @@ Description
#include "argList.H" #include "argList.H"
#include "Time.H" #include "Time.H"
#include "mergePolyMesh.H" #include "mergePolyMesh.H"
#include "topoSet.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -163,6 +165,8 @@ int main(int argc, char *argv[])
} }
masterMesh.write(); masterMesh.write();
topoSet::removeFiles(masterMesh);
processorMeshes::removeFiles(masterMesh);
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -1,10 +1,10 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \
-lgenericPatchFields \ -lgenericPatchFields \
-lmeshTools \ -lreconstruct \
-ldynamicMesh -ldynamicMesh

View File

@ -79,6 +79,7 @@ Note
#include "ReadFields.H" #include "ReadFields.H"
#include "volFields.H" #include "volFields.H"
#include "surfaceFields.H" #include "surfaceFields.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -537,6 +538,8 @@ int main(int argc, char *argv[])
Info<< "Writing mesh to time " << runTime.timeName() << endl; Info<< "Writing mesh to time " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
// Dump duplicated points (if any) // Dump duplicated points (if any)
const labelList& pointMap = map().pointMap(); const labelList& pointMap = map().pointMap();

View File

@ -1,10 +1,12 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lgenericPatchFields \ -lgenericPatchFields \
-ldynamicMesh \ -ldynamicMesh \
-lreconstruct \
-lmeshTools -lmeshTools

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -74,6 +74,8 @@ Note
#include "ReadFields.H" #include "ReadFields.H"
#include "volFields.H" #include "volFields.H"
#include "surfaceFields.H" #include "surfaceFields.H"
#include "topoSet.H"
#include "processorMeshes.H"
using namespace Foam; using namespace Foam;
@ -552,6 +554,8 @@ int main(int argc, char *argv[])
Info<< "Writing dual mesh to " << runTime.timeName() << endl; Info<< "Writing dual mesh to " << runTime.timeName() << endl;
mesh.write(); mesh.write();
topoSet::removeFiles(mesh);
processorMeshes::removeFiles(mesh);
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -20,7 +20,6 @@ then
export LINK_FLAGS="${LINK_FLAGS} -lzoltanRenumber -L${ZOLTAN_ARCH_PATH}/lib -lzoltan" export LINK_FLAGS="${LINK_FLAGS} -lzoltanRenumber -L${ZOLTAN_ARCH_PATH}/lib -lzoltan"
fi fi
set -x
wmake $targetType wmake $targetType
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -6,7 +6,8 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/renumber/renumberMethods/lnInclude \ -I$(LIB_SRC)/renumber/renumberMethods/lnInclude \
-I$(LIB_SRC)/renumber/zoltanRenumber/lnInclude \ -I$(LIB_SRC)/renumber/zoltanRenumber/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
@ -14,5 +15,6 @@ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lgenericPatchFields \ -lgenericPatchFields \
-lrenumberMethods \ -lrenumberMethods \
-lreconstruct \
$(LINK_FLAGS) \ $(LINK_FLAGS) \
-ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lmetisDecomp -lscotchDecomp -ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lmetisDecomp -lscotchDecomp

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -52,6 +52,8 @@ Description
#include "cellSet.H" #include "cellSet.H"
#include "faceSet.H" #include "faceSet.H"
#include "pointSet.H" #include "pointSet.H"
#include "processorMeshes.H"
#include "hexRef8.H"
#ifdef FOAM_USE_ZOLTAN #ifdef FOAM_USE_ZOLTAN
#include "zoltanRenumber.H" #include "zoltanRenumber.H"
@ -696,7 +698,6 @@ int main(int argc, char *argv[])
bool writeMaps = false; bool writeMaps = false;
bool orderPoints = false; bool orderPoints = false;
label blockSize = 0; label blockSize = 0;
bool renumberSets = true;
// Construct renumberMethod // Construct renumberMethod
autoPtr<IOdictionary> renumberDictPtr; autoPtr<IOdictionary> renumberDictPtr;
@ -756,8 +757,6 @@ int main(int argc, char *argv[])
Info<< "Writing renumber maps (new to old) to polyMesh." << nl Info<< "Writing renumber maps (new to old) to polyMesh." << nl
<< endl; << endl;
} }
renumberSets = renumberDict.lookupOrDefault("renumberSets", true);
} }
else else
{ {
@ -884,46 +883,12 @@ int main(int argc, char *argv[])
PtrList<cellSet> cellSets; PtrList<cellSet> cellSets;
PtrList<faceSet> faceSets; PtrList<faceSet> faceSets;
PtrList<pointSet> pointSets; PtrList<pointSet> pointSets;
if (renumberSets)
{ {
// Read sets // Read sets
IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets"); IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets");
{ ReadFields(objects, cellSets);
IOobjectList cSets(objects.lookupClass(cellSet::typeName)); ReadFields(objects, faceSets);
if (cSets.size()) ReadFields(objects, pointSets);
{
Info<< "Reading cellSets:" << endl;
forAllConstIter(IOobjectList, cSets, iter)
{
cellSets.append(new cellSet(*iter()));
Info<< " " << cellSets.last().name() << endl;
}
}
}
{
IOobjectList fSets(objects.lookupClass(faceSet::typeName));
if (fSets.size())
{
Info<< "Reading faceSets:" << endl;
forAllConstIter(IOobjectList, fSets, iter)
{
faceSets.append(new faceSet(*iter()));
Info<< " " << faceSets.last().name() << endl;
}
}
}
{
IOobjectList pSets(objects.lookupClass(pointSet::typeName));
if (pSets.size())
{
Info<< "Reading pointSets:" << endl;
forAllConstIter(IOobjectList, pSets, iter)
{
pointSets.append(new pointSet(*iter()));
Info<< " " << pointSets.last().name() << endl;
}
}
}
} }
@ -1183,6 +1148,7 @@ int main(int argc, char *argv[])
} }
// Move mesh (since morphing might not do this) // Move mesh (since morphing might not do this)
if (map().hasMotionPoints()) if (map().hasMotionPoints())
{ {
@ -1288,9 +1254,20 @@ int main(int argc, char *argv[])
{ {
mesh.setInstance(oldInstance); mesh.setInstance(oldInstance);
} }
else
{
mesh.setInstance(runTime.timeName());
}
Info<< "Writing mesh to " << mesh.facesInstance() << endl; Info<< "Writing mesh to " << mesh.facesInstance() << endl;
processorMeshes::removeFiles(mesh);
hexRef8::removeFiles(mesh);
topoSet::updateMesh(mesh.facesInstance(), map(), cellSets);
topoSet::updateMesh(mesh.facesInstance(), map(), faceSets);
topoSet::updateMesh(mesh.facesInstance(), map(), pointSets);
mesh.write(); mesh.write();
if (cellProcAddressing.headerOk()) if (cellProcAddressing.headerOk())
@ -1437,27 +1414,6 @@ int main(int argc, char *argv[])
).write(); ).write();
} }
if (renumberSets)
{
forAll(cellSets, i)
{
cellSets[i].updateMesh(map());
cellSets[i].instance() = mesh.facesInstance();
cellSets[i].write();
}
forAll(faceSets, i)
{
faceSets[i].updateMesh(map());
faceSets[i].instance() = mesh.facesInstance();
faceSets[i].write();
}
forAll(pointSets, i)
{
pointSets[i].updateMesh(map());
pointSets[i].instance() = mesh.facesInstance();
pointSets[i].write();
}
}
Info<< "End\n" << endl; Info<< "End\n" << endl;

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