Commit 30c46c9c authored by sergio's avatar sergio
Browse files

Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

parents fa2368af e3d8d42d
OpenFOAM-v1612+
OpenFOAM-1706
==================
Known Build Issues
==================
......@@ -22,16 +22,15 @@ VTK
---
If using the runTimePostProcessing to create on-the-fly images, you
can simply just compile ParaView-5.0.1 and these libraries will
be used.
can simply just compile ParaView 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
are provided with ParaView 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.
much better than using the VTK tar file.
Using runTimePostProcessing with the 'plain' VTK-7.1.0 libraries does
Using runTimePostProcessing with the 'plain' VTK libraries does
generally work, but does not exit cleanly:
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonExecutionModel-7.1.so.1:
......@@ -60,4 +59,21 @@ there are also minimum gcc/g++ requirements there:
If your system compiler is too old to build the minimum required gcc or
clang/llvm, it is just simply too old.
-------------------------
Building with spack
-------------------------
If you are building with spack, note that the depends_on for paraview
resolves poorly. The +qt dependency (for building the reader module)
may need to be specified as a preference by including the following in
your `~/.spack/packages.yaml` file:
packages:
paraview:
variants: +qt
It appears that spack will otherwise ignore any paraview+qt version
and attempt to install a paraview~qt version instead.
--
mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.C
U/maxwellSlipUFvPatchVectorField.C
T/smoluchowskiJumpTFvPatchScalarField.C
rho/fixedRhoFvPatchScalarField.C
......
......@@ -38,7 +38,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
const DimensionedField<vector, volMesh>& iF
)
:
mixedFixedValueSlipFvPatchVectorField(p, iF),
partialSlipFvPatchVectorField(p, iF),
TName_("T"),
rhoName_("rho"),
psiName_("thermo:psi"),
......@@ -59,7 +59,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
const fvPatchFieldMapper& mapper
)
:
mixedFixedValueSlipFvPatchVectorField(mspvf, p, iF, mapper),
partialSlipFvPatchVectorField(mspvf, p, iF, mapper),
TName_(mspvf.TName_),
rhoName_(mspvf.rhoName_),
psiName_(mspvf.psiName_),
......@@ -79,7 +79,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
const dictionary& dict
)
:
mixedFixedValueSlipFvPatchVectorField(p, iF),
partialSlipFvPatchVectorField(p, iF),
TName_(dict.lookupOrDefault<word>("T", "T")),
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
......@@ -132,7 +132,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
const DimensionedField<vector, volMesh>& iF
)
:
mixedFixedValueSlipFvPatchVectorField(mspvf, iF),
partialSlipFvPatchVectorField(mspvf, iF),
TName_(mspvf.TName_),
rhoName_(mspvf.rhoName_),
psiName_(mspvf.psiName_),
......@@ -193,7 +193,7 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
refValue() -= C1/prho*transform(I - n*n, (n & ptauMC));
}
mixedFixedValueSlipFvPatchVectorField::updateCoeffs();
partialSlipFvPatchVectorField::updateCoeffs();
}
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -36,7 +36,7 @@ SourceFiles
#ifndef maxwellSlipUFvPatchVectorField_H
#define maxwellSlipUFvPatchVectorField_H
#include "mixedFixedValueSlipFvPatchFields.H"
#include "partialSlipFvPatchFields.H"
#include "Switch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -50,7 +50,7 @@ namespace Foam
class maxwellSlipUFvPatchVectorField
:
public mixedFixedValueSlipFvPatchVectorField
public partialSlipFvPatchVectorField
{
// Private data
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ 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 "mixedFixedValueSlipFvPatchField.H"
#include "symmTransformField.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF
)
:
transformFvPatchField<Type>(p, iF),
refValue_(p.size()),
valueFraction_(p.size(), 1.0)
{}
template<class Type>
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)
:
transformFvPatchField<Type>(p, iF),
refValue_("refValue", dict, p.size()),
valueFraction_("valueFraction", dict, p.size())
{}
template<class Type>
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
transformFvPatchField<Type>(ptf, p, iF, mapper),
refValue_(ptf.refValue_, mapper),
valueFraction_(ptf.valueFraction_, mapper)
{}
template<class Type>
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>& ptf
)
:
transformFvPatchField<Type>(ptf),
refValue_(ptf.refValue_),
valueFraction_(ptf.valueFraction_)
{}
template<class Type>
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>& ptf,
const DimensionedField<Type, volMesh>& iF
)
:
transformFvPatchField<Type>(ptf, iF),
refValue_(ptf.refValue_),
valueFraction_(ptf.valueFraction_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::mixedFixedValueSlipFvPatchField<Type>::autoMap
(
const fvPatchFieldMapper& m
)
{
Field<Type>::autoMap(m);
refValue_.autoMap(m);
valueFraction_.autoMap(m);
}
template<class Type>
void Foam::mixedFixedValueSlipFvPatchField<Type>::rmap
(
const fvPatchField<Type>& ptf,
const labelList& addr
)
{
transformFvPatchField<Type>::rmap(ptf, addr);
const mixedFixedValueSlipFvPatchField<Type>& dmptf =
refCast<const mixedFixedValueSlipFvPatchField<Type>>(ptf);
refValue_.rmap(dmptf.refValue_, addr);
valueFraction_.rmap(dmptf.valueFraction_, addr);
}
template<class Type>
Foam::tmp<Foam::Field<Type>>
Foam::mixedFixedValueSlipFvPatchField<Type>::snGrad() const
{
tmp<vectorField> nHat = this->patch().nf();
Field<Type> pif(this->patchInternalField());
return
(
valueFraction_*refValue_
+ (1.0 - valueFraction_)*transform(I - sqr(nHat), pif) - pif
)*this->patch().deltaCoeffs();
}
template<class Type>
void Foam::mixedFixedValueSlipFvPatchField<Type>::evaluate
(
const Pstream::commsTypes
)
{
if (!this->updated())
{
this->updateCoeffs();
}
vectorField nHat(this->patch().nf());
Field<Type>::operator=
(
valueFraction_*refValue_
+
(1.0 - valueFraction_)
*transform(I - nHat*nHat, this->patchInternalField())
);
transformFvPatchField<Type>::evaluate();
}
template<class Type>
Foam::tmp<Foam::Field<Type>>
Foam::mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const
{
vectorField nHat(this->patch().nf());
vectorField diag(nHat.size());
diag.replace(vector::X, mag(nHat.component(vector::X)));
diag.replace(vector::Y, mag(nHat.component(vector::Y)));
diag.replace(vector::Z, mag(nHat.component(vector::Z)));
return
valueFraction_*Type(pTraits<Type>::one)
+ (1.0 - valueFraction_)
*transformFieldMask<Type>(pow<vector, pTraits<Type>::rank>(diag));
}
template<class Type>
void Foam::mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
{
transformFvPatchField<Type>::write(os);
refValue_.writeEntry("refValue", os);
valueFraction_.writeEntry("valueFraction", os);
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ 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/>.
Class
Foam::mixedFixedValueSlipFvPatchField
Description
A mixed boundary type that blends between fixedValue and slip, as opposed
to the standard mixed condition that blends between fixedValue and
fixedGradient; required to implement maxwellSlipU condition.
SourceFiles
mixedFixedValueSlipFvPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef mixedFixedValueSlipFvPatchField_H
#define mixedFixedValueSlipFvPatchField_H
#include "transformFvPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class mixedFixedValueSlipFvPatch Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class mixedFixedValueSlipFvPatchField
:
public transformFvPatchField<Type>
{
// Private data
//- Value field used for boundary condition
Field<Type> refValue_;
//- Fraction (0-1) of value used for boundary condition
scalarField valueFraction_;
public:
//- Runtime type information
TypeName("mixedFixedValueSlip");
// Constructors
//- Construct from patch and internal field
mixedFixedValueSlipFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&
);
//- Construct from patch, internal field and dictionary
mixedFixedValueSlipFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const dictionary&
);
//- Construct by mapping given mixedFixedValueSlipFvPatchField
//- Onto a new patch
mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>&,
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>&
);
//- Construct and return a clone
virtual tmp<fvPatchField<Type>> clone() const
{
return tmp<fvPatchField<Type>>
(
new mixedFixedValueSlipFvPatchField<Type>(*this)
);
}
//- Construct as copy setting internal field reference
mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>&,
const DimensionedField<Type, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchField<Type>> clone
(
const DimensionedField<Type, volMesh>& iF
) const
{
return tmp<fvPatchField<Type>>
(
new mixedFixedValueSlipFvPatchField<Type>(*this, iF)
);
}
// Member functions
// Access
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchField<Type>&,
const labelList&
);
// Return defining fields
virtual Field<Type>& refValue()
{
return refValue_;
}
virtual const Field<Type>& refValue() const
{
return refValue_;
}
virtual scalarField& valueFraction()
{
return valueFraction_;
}
virtual const scalarField& valueFraction() const
{
return valueFraction_;
}
// Evaluation functions
//- Return gradient at boundary
virtual tmp<Field<Type>> snGrad() const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=
Pstream::commsTypes::blocking
);
//- Return face-gradient transform diagonal
virtual tmp<Field<Type>> snGradTransformDiag() const;
//- Write
virtual void write(Ostream&) const;
// Member operators
virtual void operator=(const UList<Type>&) {}
virtual void operator=(const fvPatchField<Type>&) {}
virtual void operator+=(const fvPatchField<Type>&) {}
virtual void operator-=(const fvPatchField<Type>&) {}
virtual void operator*=(const fvPatchField<scalar>&) {}
virtual void operator/=(const fvPatchField<scalar>&) {}
virtual void operator+=(const Field<Type>&) {}
virtual void operator-=(const Field<Type>&) {}
virtual void operator*=(const Field<scalar>&) {}
virtual void operator/=(const Field<scalar>&) {}
virtual void operator=(const Type&) {}
virtual void operator+=(const Type&) {}
virtual void operator-=(const Type&) {}
virtual void operator*=(const scalar) {}
virtual void operator/=(const scalar) {}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "mixedFixedValueSlipFvPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ 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.