Commit 18a93f98 authored by Andrew Heather's avatar Andrew Heather
Browse files

MRG: Updated for v1612+

parents 9eb6de64 67c72e47

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -6,8 +6,6 @@
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# File-browser settings - anywhere
......@@ -77,9 +75,10 @@ doc/Doxygen/DTAGS
# Ignore .tags in the main directory
/.tags
# Ignore eclipse project files in the main directory
# Ignore project files in the main directory
/.cproject
/.project
/.dir-locals.el
# Ignore the test directory
/tutorialsTest
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation without documentation by default
genDoc=0
targetType=libso
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmakeCheckPwd "$WM_PROJECT_DIR" || {
......@@ -27,20 +25,25 @@ if [ -d "$WM_THIRD_PARTY_DIR" ]
then
$WM_THIRD_PARTY_DIR/Allwmake
else
echo "Allwmake: no ThirdParty directory found - skipping"
echo "No ThirdParty directory found - skipping"
fi
# Compile OpenFOAM libraries and applications
echo "========================================"
echo "Compile OpenFOAM libraries"
echo
src/Allwmake $targetType $*
# Compile OpenFOAM libraries and applications
echo "========================================"
echo "Compile OpenFOAM applications"
echo
applications/Allwmake $targetType $*
# Optionally build OpenFOAM Doxygen documentation
if [ $genDoc -eq 1 ]
then
doc/Allwmake
fi
# Some summary information
echo
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
echo "========================================"
echo " ${WM_PROJECT_DIR##*/}"
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
echo
#------------------------------------------------------------------------------
OpenFOAM-v1612+
==================
Known Build Issues
==================
--------------
Intel Compiler
--------------
Since OpenFOAM uses C++11, a fairly recent version is required.
The Intel compiler - icc (ICC) 17.0.1 20161005 is ok, but the
initial release - icc (ICC) 17.0.0 20160721 - has a bug that
will result in these types of error messages.
MatrixSpaceI.H(492): error: no instance of overloaded function
"Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::Block<SubTensor,
BRowStart, BColStart>::operator=" matches the specified type
---
VTK
---
If using the runTimePostProcessing to create on-the-fly images, you
can either simply just compile ParaView-5.0.1 and these libraries will
be used.
If you elect to use a separate VTK compilation (for example for
off-screen rendering), it is advisable to reuse the VTK libraries that
are provided with ParaView-5.0.1, by making an appropriate symlink
prior to using makeVTK. This doesn't just reduce disk-space, but works
much better than using the VTK-7.1.0.tar file.
Using runTimePostProcessing with the 'plain' VTK-7.1.0 libraries does
generally work, but does not exit cleanly:
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonExecutionModel-7.1.so.1:
undefined symbol: _ZN33vtkFilteringInformationKeyManager13ClassFinalizeEv
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonDataModel-7.1.so.1:
undefined symbol: _ZN49vtkInformationQuadratureSchemeDefinitionVectorKeyD1Ev
This error appears to be suppressed if VTK is compiled with a Debug build-type.
-------------------------
Building on older systems
-------------------------
If the system gcc is too old for building OpenFOAM, a third-party gcc or
clang/llvm installation can be used. If building clang/llvm, note that
there are also minimum gcc/g++ requirements there:
Min gcc/g++
=========== ==========
4.4 llvm-3.4.2
4.7 llvm-3.5.2 - llvm-3.7.0
If your system compiler is too old to build the minimum required gcc or
clang/llvm, it is just simply too old.
--
# About OpenFOAM
OpenFOAM is a free, open source CFD software package developed primarily by [OpenCFD](http://www.openfoam.com) since 2004 and is currently distributed by [ESI-OpenCFD](http://www.openfoam.com) and the [OpenFOAM Foundation](http://openfoam.org). It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. [More...](http://www.openfoam.com/documentation)
OpenFOAM is a free, open source CFD software [released and developed primarily by OpenCFD Ltd](http://www.openfoam.com) since 2004released and developed primarily by. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. [More...](http://www.openfoam.com/documentation)
OpenFOAM+ uses the OpenFOAM Foundation version as a common code base, with wider functionality and platform support. Its purpose is to accelerate the public availability of new features which are sponsored by OpenCFD's customers and contributed by the OpenFOAM community.
OpenFOAM+ is professionally released every six months to include customer sponsored developments and contributions from the community, including the OpenFOAM Foundation. Releases designated OpenFOAM+ contain several man years of client-sponsored developments of which much has been transferred to, but not released in the OpenFOAM Foundation branch.
# Copyright
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. See the file COPYING in this directory or [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/), for a description of the GNU General Public License terms under which you can copy the files.
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. See the file COPYING in this directory or [http://www.gnu.org/licenses/](http://www.gnu.org/licenses), for a description of the GNU General Public License terms under which you can copy the files.
# OpenFOAM Trademark
OpenCFD Limited, owner of the OpenFOAM Trademark, has granted the use of the Trademark to the OpenFOAM Foundation. Violations of the Trademark are continuously monitored and will be duly prosecuted. Please [contact OpenCFD](http://www.openfoam.com/contact) if you have any questions on the use of the OpenFOAM trademark.
OpenCFD Ltd grants use of the OpenFOAM trademark by Third Parties on a licence basis. ESI Group and the OpenFOAM Foundation Ltd are currently permitted to use the trademark. For information on trademark use, please refer to the [trademark policy guidelines](http://www.openfoam.com/legal/trademark-policy.php).
Please [contact OpenCFD](http://www.openfoam.com/contact) if you have any questions on the use of the OpenFOAM trademark.
Violations of the Trademark are continuously monitored, and will be duly prosecuted.
# Useful Links
- [Download and installation instructions](http://www.openfoam.com/releases)
- [Download and installation instructions](http://www.openfoam.com/download/)
- [Documentation](http://www.openfoam.com/documentation)
- [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php)
- [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php)
- [Contacting OpenCFD](http://www.openfoam.com/contact)
- [Reporting bugs/issues/feature requests](http://www.openfoam.com/code/bug-reporting.php)
- [OpenFOAM Community](http://www.openfoam.com/community/)
- [Contacting OpenCFD](http://www.openfoam.com/contact/)
Copyright 2016 OpenCFD Ltd
......@@ -2,7 +2,6 @@
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
......@@ -18,10 +17,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
exit 1
}
set -x
wmake -all solvers $*
wmake -all utilities $*
wmake -all $targetType solvers
wmake -all $targetType utilities
#------------------------------------------------------------------------------
......@@ -6,9 +6,7 @@ if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \
then
wmake
else
echo
echo "Skipping dnsFoam solver (no FFTW)"
echo
echo "==> skip dnsFoam solver (no FFTW)"
fi
#------------------------------------------------------------------------------
#include "readTransportProperties.H"
Info<< "Reading field p\n" << endl;
volScalarField p
(
......@@ -29,3 +31,5 @@ volVectorField U
#include "createPhi.H"
mesh.setFluxRequired(p.name());
#include "readTurbulenceProperties.H"
......@@ -28,7 +28,7 @@ Group
grpDNSSolvers
Description
Direct numerical simulation solver for boxes of isotropic turbulence
Direct numerical simulation solver for boxes of isotropic turbulence.
\*---------------------------------------------------------------------------*/
......@@ -44,16 +44,13 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMeshNoClear.H"
pisoControl piso(mesh);
#include "readTransportProperties.H"
#include "createControl.H"
#include "createFields.H"
#include "readTurbulenceProperties.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -64,7 +61,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
force.internalField() = ReImSum
force.primitiveFieldRef() = ReImSum
(
fft::reverseTransform
(
......@@ -119,7 +116,7 @@ int main(int argc, char *argv[])
runTime.write();
if (runTime.outputTime())
if (runTime.writeTime())
{
calcEk(U, K).write
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -52,6 +52,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "fvOptions.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -66,6 +67,7 @@ int main(int argc, char *argv[])
simpleControl simple(mesh);
#include "createFields.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -77,10 +79,16 @@ int main(int argc, char *argv[])
while (simple.correctNonOrthogonal())
{
solve
fvScalarMatrix TEqn
(
fvm::ddt(T) - fvm::laplacian(DT, T)
==
fvOptions(T)
);
fvOptions.constrain(TEqn);
TEqn.solve();
fvOptions.correct(T);
}
#include "write.H"
......
if (runTime.outputTime())
if (runTime.writeTime())
{
volVectorField gradT(fvc::grad(T));
......
const dictionary& potentialFlow
(
mesh.solutionDict().subDict("potentialFlow")
);
const int nNonOrthCorr
(
potentialFlow.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0)
);
......@@ -43,7 +43,7 @@ word pName("p");
// Update name of the pressure field from the command-line option
args.optionReadIfPresent("pName", pName);
// Infer the pressure BCs from the velocity BCs
// Infer the pressure BCs from the velocity
wordList pBCTypes
(
U.boundaryField().size(),
......@@ -78,62 +78,36 @@ volScalarField p
pBCTypes
);
label pRefCell = 0;
scalar pRefValue = 0.0;
if (args.optionFound("writep"))
{
setRefCell
(
p,
potentialFlow.dict(),
pRefCell,
pRefValue
);
}
Info<< "Constructing velocity potential field Phi\n" << endl;
autoPtr<volScalarField> PhiPtr;
IOobject io
// Infer the velocity potential BCs from the pressure
wordList PhiBCTypes
(
"Phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
if (io.typeHeaderOk<volScalarField>())
{
PhiPtr.reset(new volScalarField(io, mesh));
}
else
forAll(p.boundaryField(), patchi)
{
// Cannot just use p.boundaryField().types() since does not initialise
// complex boundary types. Instead re-clone them from p.
io.readOpt() = IOobject::NO_READ;
PhiPtr.reset
(
new volScalarField
(
io,
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
p.boundaryField().types()
)
);
const volScalarField::GeometricBoundaryField& bp = p.boundaryField();
volScalarField::GeometricBoundaryField& bPhi = PhiPtr().boundaryField();
forAll(bp, patchI)
if (p.boundaryField()[patchi].fixesValue())
{
bPhi.set(patchI, bp[patchI].clone(PhiPtr().dimensionedInternalField()));
PhiBCTypes[patchi] = fixedValueFvPatchScalarField::typeName;
}
}
volScalarField& Phi = PhiPtr();
Info<< "Constructing velocity potential field Phi\n" << endl;
volScalarField Phi
(
IOobject
(
"Phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
PhiBCTypes
);
label PhiRefCell = 0;
scalar PhiRefValue = 0;
......@@ -145,3 +119,5 @@ setRefCell
PhiRefValue
);
mesh.setFluxRequired(Phi.name());
#include "createMRF.H"
......@@ -28,7 +28,9 @@ Group
grpBasicSolvers
Description
Potential flow solver.
Potential flow solver which solves for the velocity potential, to
calculate the flux-field, from which the velocity field is obtained by
reconstructing the flux.
\heading Solver details
The potential flow solution is typically employed to generate initial fields
......@@ -130,7 +132,6 @@ int main(int argc, char *argv[])
pisoControl potentialFlow(mesh, "potentialFlow");
#include "createFields.H"
#include "createMRF.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -87,17 +87,16 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
pimpleControl pimple(mesh);
#include "createControl.H"
#include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
......@@ -113,7 +112,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "createTimeControls.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "createTimeControls.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
......@@ -131,11 +131,11 @@ int main(int argc, char *argv[])
protectedCell = 0;
}
forAll(betav, cellI)
forAll(betav, celli)
{
if (betav[cellI] < 0.99)
if (betav[celli] < 0.99)
{
protectedCell[cellI] = 1;
protectedCell[celli] = 1;
}
}
......
......@@ -105,7 +105,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
mesh,
dimensionedScalar("zero", Nv.dimensions(), 0.0)
);
N.internalField() = Nv.internalField()*Cw;
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
volSymmTensorField ns
(
......@@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
Zero
)
);
ns.internalField() = nsv.internalField()*Cw;
ns.primitiveFieldRef() = nsv.primitiveField()*Cw;
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
volScalarField b((Uhat & B_ & Uhat)/sqrt(n));
......
......@@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
volScalarField& Gtot = tGtot.ref();
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
scalarField N(Nv.internalField()*Cw);
scalarField N(Nv.primitiveField()*Cw);
forAll(N, celli)
{
......
......@@ -130,7 +130,7 @@ void PDRkEpsilon::correct()
tgradU.clear();
// Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs();
epsilon_.boundaryFieldRef().updateCoeffs();
// Add the blockage generation term so that it is included consistently
// in both the k and epsilon equations
......@@ -163,7 +163,7 @@ void PDRkEpsilon::correct()
epsEqn.ref().relax();
epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
solve(epsEqn);
bound(epsilon_, epsilonMin_);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -36,8 +36,8 @@ Description
{
scalarField sumPhi
(
fvc::surfaceSum(mag(phiSt))().internalField()
/ rho.internalField()
fvc::surfaceSum(mag(phiSt))().primitiveField()
/ rho.primitiveField()
);
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
if (subGridSchelkin_)
{
up.internalField() += calculateSchelkinEffect(uPrimeCoef_);
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
}
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment