Commit fd3dc468 authored by andy's avatar andy
Browse files

Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

parents 7c530ff4 e733eabc
......@@ -35,43 +35,44 @@
*** Core library
+ Large number of code refinements and consistency improvements to support
other developments.
Parallel : using non-blocking communications wherever possible. This will
+ Parallel : using non-blocking communications wherever possible. This will
lead to lower requirements for MPI_BUFFER_SIZE and possibly better
start-up performance on larger numbers of processors.
*** Turbulence modelling
*** *Updated* thermophysical libraries
+ Now use the more descriptive dictionary input format, e.g. for a single
component mixture:
#+BEGIN_SRC c++
thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>;
thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>;
mixture
{
nMoles 1;
molWeight 28.9;
Cp 1007;
Hf 0;
As 1.4792e-06;
Ts 116;
}
mixture
{
nMoles 1;
molWeight 28.9;
Cp 1007;
Hf 0;
As 1.4792e-06;
Ts 116;
}
#+END_SRC
*** Lagrangian intermediate library
Extensively updated
*Updated* input format
Extended to include steady cloud tracking
*New* collision modelling
*Coupled* to new surface film modelling library
*New* sub-models
+ NonSphereDrag: drag model to account for non-spherical particles
+ ParticleTracks: post-processing model to generate track data, typically
during steady calculations
*Updated* sub-models
+ Devolatilisation models: now act on a per-specie basis
+ Extensively updated
+ *Updated* input format
+ Extended to include steady cloud tracking
+ *New* collision modelling
+ *Coupled* to new surface film modelling library
+ *New* sub-models
+ NonSphereDrag: drag model to account for non-spherical particles
+ ParticleTracks: post-processing model to generate track data, typically
during steady calculations
+ *Updated* sub-models
+ Devolatilisation models: now act on a per-specie basis
*** DSMC
*** Dynamic Mesh
*** Numerics
*** *Updated* command line help, e.g. `snappyHexMesh -help' now gives:
#+BEGIN_SRC c++
Usage: snappyHexMesh [OPTIONS]
options:
-case <dir> specify alternate case directory, default is the cwd
......@@ -80,12 +81,13 @@
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage
#+END_SRC
*** *New* basicSolidThermo solids thermophysical library
+ Used in all conjugate heat transfer solvers
+ constant properties
+ temperature dependent properties
+ temperature and direction (in local coordinate system) dependent properties
+ temperature and direction (in local coordinate system) dependent
properties
*** *New* Surface film library
+ Creation of films by particle addition, or initial film distribution
+ Coupled with the lagrangian/intermediate cloud hierarchy library
......@@ -113,13 +115,16 @@
polyPatches holding data can map the data.
*** *Updated* particle tracking algorithm
+ uses non-blocking parallel transfers
+ does 'minimum-tet' decomposition of face to work with warped faces (snappyHexMesh!)
+ does 'minimum-tet' decomposition of face to work with warped faces
(snappyHexMesh!)
+ reuses tracking state in interpolation - improves consistency and speed
*** *Updated* split cyclics into two separate patches. See doc/changed/splitCyclics.txt
*** *Updated* split cyclics into two separate patches.
See [[./doc/changes/splitCyclic.txt]]
* *Updated* interpolation (volPointInterpolation) now works without the
globalPointPatch. Moving mesh cases can now be run non-parallel and
continued in parallel and reconstructed without any limitation.
*** *New* compact binary I/O for faces and cells. This speeds up reading/writing meshes in binary.
*** *New* compact binary I/O for faces and cells.
This speeds up reading/writing meshes in binary.
*** *Updated* runTimeModifiable
+ user selectable model to use for checking run-time modifiable
dictionaries (see also doc/changes/inotify.txt):
......@@ -129,11 +134,34 @@
contents from master.
+ inotifyMaster : only master checks and reads file. Slaves get file
contents from master.
+ on linux optionally uses inotify instead of time stamps - more efficient for large
numbers of monitored files. No more fileModificationSkew needed.
+ on linux optionally uses inotify instead of time stamps - more efficient
for large numbers of monitored files. No more fileModificationSkew needed.
+ single integer reduction instead of one reduction per monitored file.
+ only files that can be re-read are being checked. Drastic reduction of
number of files to check.
*** *New* #codeStream dictionary entry
Uses on-the-fly compilation of OpenFOAM C++ code to construct dictionary.
E.g. in blockMeshDict:
#+BEGIN_SRC c++
convertToMeters 0.001;
vertices #codeStream
{
code
#{
label nVerts =
readLabel(dict.lookup("nx"))
*readLabel(dict.lookup("ny"))
*readLabel(dict.lookup("nz"));
pointField verts(nVerts);
// Now fill verts here
// ..
os << verts;
#};
}
#+END_SRC
See also ./[[doc/changes/codeStream.org]]
* Solvers
A number of new solvers have been developed for a range of engineering
applications. There has been a set of improvements to certain classes of
......@@ -163,6 +191,23 @@
+ takes optional fieldName to sample
+ directMapped patch added 'normal' method to calculate sample points
to e.g. sample fields just above wall (e.g. for streaklines)
+ *New* codedFixedValue: Uses the on-the-fly code compilation from #codeStream
to provide an in-line fixedValueFvPatchScalarField. E.g.
#+BEGIN_SRC c++
outlet
{
type codedFixedValue<scalar>;
value uniform 0;
redirectType fixedValue10;
code
#{
operator==(min(10, 0.1*this->db().time().value()));
#};
}
#+END_SRC
See also [[./doc/changes/codeStream.org]]
* Utilities
There have been some utilities added and updated in this release.
*** *New* utilities
......@@ -182,20 +227,24 @@
+ =topoSet=: replacement of cellSet,faceSet,pointSet utilities.
Comparable to a dictionary driven =setSet= utility.
*** Updated utilities
+ =setFields=: optionally use faceSets to set patch values (see e.g. hotRoom tutorial).
+ =setFields=: optionally use faceSets to set patch values (see
e.g. =hotRoom= tutorial).
+ =blockMesh=: specify patches via dictionary instead of type only. This
makes rereading the boundary file superfluous. see
e.g. pitzDailyDirectMapped tutorial.
+ =setSet=: allows time range (e.g. 0:100) in combination with -batch argument
to execute the commands for multiple times.
+ =setSet=: allows time range (e.g. 0:100) in combination with -batch
argument to execute the commands for multiple times.
+ =extrudeMesh=:
- option to add extrusion to existing mesh.
- works in parallel
- option to add extrusion to existing mesh.
- works in parallel
+ =snappyHexMesh=:
+ extrude across multi-processor boundaries
+ preserve faceZones during layering
* Post-processing
+ =paraFoam=, =foamToVTK=: full support for polyhedral cell type in recent
Paraview versions.
+ =foamToEnsight=: parallel continuous data. new =-nodeValues= option to generate and output nodal
field data.
+ =foamToEnsight=: parallel continuous data. new =-nodeValues= option to
generate and output nodal field data.
+ =singleCellMesh=: new utility to convert mesh and fields to a single cell
mesh. Great for postprocessing.
+ =steadyParticleTracks=: Generates VTK tracks from the output of the cloud
......@@ -229,3 +278,7 @@
+ multipleBoxes, hotBoxes, panel, evaporationTest
+ =interDyMFoam= tutorials:
+ testTubeMixer: showcases =solidBodyMotionFunction=
* Other
+ compilable with =clang=
In your prefs.sh set the WM_COMPILER to Clang
buoyantSimpleFoam.C
EXE = $(FOAM_APPBIN)/buoyantSimpleFoam
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lmeshTools \
-lbasicThermophysicalModels \
-lspecie \
-lcompressibleRASModels \
-lfiniteVolume
// Solve the Momentum equation
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
);
UEqn().relax();
solve
(
UEqn()
==
rho*g
- fvc::grad(p)
/*
fvc::reconstruct
(
fvc::interpolate(rho)*(g & mesh.Sf())
- fvc::snGrad(p)*mesh.magSf()
)
*/
);
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicPsiThermo> pThermo
(
basicPsiThermo::New(mesh)
);
basicPsiThermo& thermo = pThermo();
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
thermo.rho()
);
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
(
compressible::RASModel::New
(
rho,
U,
phi,
thermo
)
);
thermo.correct();
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
mesh.solutionDict().subDict("SIMPLE"),
pRefCell,
pRefValue
);
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
{
fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
- p*fvc::div(phi/fvc::interpolate(rho))
);
hEqn.relax();
hEqn.solve();
thermo.correct();
}
{
rho = thermo.rho();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn().H();
UEqn.clear();
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p);
surfaceScalarField buoyancyPhi
(
rhorAUf*fvc::interpolate(rho)*(g & mesh.Sf())
);
phi += buoyancyPhi;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rhorAUf, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}
// Calculate the conservative fluxes
phi -= pEqn.flux();
// Explicitly relax pressure for momentum corrector
p.relax();
// Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure
U += rAU*(rho*g - fvc::grad(p));
//U += rAU*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rhorAUf);
U.correctBoundaryConditions();
}
}
#include "continuityErrs.H"
rho = thermo.rho();
rho.relax();
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value()
<< endl;
}
......@@ -2,6 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso coupledDerivedFvPatchFields
wclean
wclean chtMultiRegionSimpleFoam
......
......@@ -2,6 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso coupledDerivedFvPatchFields
wmake
wmake chtMultiRegionSimpleFoam
......
derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C
fluid/compressibleCourantNo.C
solid/solidRegionDiffNo.C
......
......@@ -7,7 +7,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude
EXE_LIBS = \
-lbasicThermophysicalModels \
......@@ -17,4 +18,6 @@ EXE_LIBS = \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lmeshTools \
-lfiniteVolume
-lfiniteVolume \
-lradiationModels \
-lcoupledDerivedFvPatchFields
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -38,6 +38,7 @@ Description
#include "compressibleCourantNo.H"
#include "solidRegionDiffNo.H"
#include "basicSolidThermo.H"
#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
EXE_INC = \
/* -DFULLDEBUG -O0 -g */ \
-I.. \
-I../derivedFvPatchFields \
-Ifluid \
-Isolid \
-I$(LIB_SRC)/finiteVolume/lnInclude \
......@@ -9,6 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude
......@@ -20,4 +19,6 @@ EXE_LIBS = \
-lspecie \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lcompressibleLESModels
-lcompressibleLESModels \
-lradiationModels \
-lcoupledDerivedFvPatchFields
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -35,6 +35,7 @@ Description
#include "fixedGradientFvPatchFields.H"
#include "regionProperties.H"
#include "basicSolidThermo.H"
#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -9,6 +9,7 @@
PtrList<volScalarField> p_rghFluid(fluidRegions.size());
PtrList<volScalarField> ghFluid(fluidRegions.size());
PtrList<surfaceScalarField> ghfFluid(fluidRegions.size());
PtrList<radiation::radiationModel> radiation(fluidRegions.size());
List<scalar> initialMassFluid(fluidRegions.size());
List<label> pRefCellFluid(fluidRegions.size(),0);
......@@ -168,6 +169,12 @@
// Force p_rgh to be consistent with p
p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i];
radiation.set
(
i,
radiation::radiationModel::New(thermoFluid[i].T())
);
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();
setRefCell
......
......@@ -7,6 +7,7 @@
==
fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)")
- (rho/psi)*fvc::div(phi/fvc::interpolate(rho))
+ rad.Sh(thermo)
);
hEqn.relax();
......@@ -15,6 +16,8 @@
thermo.correct();
rad.correct();
Info<< "Min/max T:" << min(thermo.T()).value() << ' '
<< max(thermo.T()).value() << endl;
}
......@@ -19,6 +19,8 @@
initialMassFluid[i]
);
radiation::radiationModel& rad = radiation[i];
const label pRefCell = pRefCellFluid[i];
const scalar pRefValue = pRefValueFluid[i];
......
turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libcoupledDerivedFvPatchFields
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude
EXE_LIBS = \
-lmeshTools \
-lbasicThermophysicalModels \
-lfiniteVolume \
-lradiationModels
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2011 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/>.
\*---------------------------------------------------------------------------*/
#include "externalWallHeatFluxTemperatureFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "directMappedPatchBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
template<>
const char*
NamedEnum
<externalWallHeatFluxTemperatureFvPatchScalarField::operationMode, 3>::names[]=
{
"fixed_heat_flux",