Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
OpenFOAM-plus
Commits
b0302bcd
Commit
b0302bcd
authored
May 24, 2017
by
mattijs
Browse files
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
parents
b8d1e5af
ad71f227
Changes
70
Hide whitespace changes
Inline
Side-by-side
applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C
View file @
b0302bcd
...
...
@@ -120,11 +120,14 @@ int main(int argc, char *argv[])
"cSf_pos"
,
interpolate
(
c
,
pos
,
T
.
name
())
*
mesh
.
magSf
()
);
cSf_pos
.
setOriented
();
surfaceScalarField
cSf_neg
(
"cSf_neg"
,
interpolate
(
c
,
neg
,
T
.
name
())
*
mesh
.
magSf
()
);
cSf_neg
.
setOriented
();
surfaceScalarField
ap
(
...
...
@@ -269,4 +272,5 @@ int main(int argc, char *argv[])
return
0
;
}
// ************************************************************************* //
applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C
View file @
b0302bcd
...
...
@@ -101,11 +101,14 @@ int main(int argc, char *argv[])
"cSf_pos"
,
interpolate
(
c
,
pos
,
T
.
name
())
*
mesh
.
magSf
()
);
cSf_pos
.
setOriented
();
surfaceScalarField
cSf_neg
(
"cSf_neg"
,
interpolate
(
c
,
neg
,
T
.
name
())
*
mesh
.
magSf
()
);
cSf_neg
.
setOriented
();
surfaceScalarField
ap
(
...
...
applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C
View file @
b0302bcd
...
...
@@ -38,7 +38,6 @@ Description
#include
"basicReactingMultiphaseCloud.H"
#include
"rhoCombustionModel.H"
#include
"radiationModel.H"
#include
"IOporosityModelList.H"
#include
"fvOptions.H"
#include
"SLGThermo.H"
#include
"simpleControl.H"
...
...
applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C
View file @
b0302bcd
...
...
@@ -113,6 +113,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo
1e-8
/
pow
(
average
(
mesh_
.
V
()),
1
.
0
/
3
.
0
)
)
{
rhoPhi_
.
setOriented
();
calcAlphas
();
alphas_
.
write
();
correct
();
...
...
@@ -698,6 +699,7 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const
);
surfaceScalarField
&
stf
=
tstf
.
ref
();
stf
.
setOriented
();
forAllConstIter
(
PtrDictionary
<
phaseModel
>
,
phases_
,
phase1
)
{
...
...
applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
View file @
b0302bcd
...
...
@@ -801,6 +801,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
)
)
);
tSurfaceTension
.
ref
().
setOriented
();
forAllConstIter
(
PtrDictionary
<
phaseModel
>
,
phases_
,
iter
)
{
...
...
applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C
View file @
b0302bcd
...
...
@@ -113,6 +113,8 @@ Foam::phaseModel::phaseModel
dimensionedScalar
(
"0"
,
dimensionSet
(
0
,
3
,
-
1
,
0
,
0
),
0
)
)
{
alphaPhi_
.
setOriented
();
const
word
phiName
=
IOobject
::
groupName
(
"phi"
,
name_
);
IOobject
phiHeader
...
...
applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
View file @
b0302bcd
...
...
@@ -128,6 +128,8 @@ Foam::multiphaseMixture::multiphaseMixture
1e-8
/
pow
(
average
(
mesh_
.
V
()),
1
.
0
/
3
.
0
)
)
{
rhoPhi_
.
setOriented
();
calcAlphas
();
alphas_
.
write
();
}
...
...
@@ -273,6 +275,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const
);
surfaceScalarField
&
stf
=
tstf
.
ref
();
stf
.
setOriented
();
forAllConstIter
(
PtrDictionary
<
phase
>
,
phases_
,
iter1
)
{
...
...
applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C
View file @
b0302bcd
...
...
@@ -455,6 +455,7 @@ Foam::BlendedInterfacialModel<ModelType>::Ff() const
dimensionedScalar
(
"zero"
,
ModelType
::
dimF
*
dimArea
,
0
)
)
);
x
.
ref
().
setOriented
();
if
(
model_
.
valid
())
{
...
...
applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C
View file @
b0302bcd
...
...
@@ -347,7 +347,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Ff
}
else
{
return
tmp
<
surfaceScalarField
>
tmp
<
surfaceScalarField
>
tFf
(
new
surfaceScalarField
(
...
...
@@ -364,6 +364,10 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Ff
dimensionedScalar
(
"zero"
,
liftModel
::
dimF
*
dimArea
,
0
)
)
);
tFf
.
ref
().
setOriented
();
return
tFf
;
}
}
...
...
@@ -621,6 +625,8 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setPhiD
)
)
);
phiDs
[
phasei
].
setOriented
();
}
return
phiDs
[
phasei
];
...
...
applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C
View file @
b0302bcd
...
...
@@ -200,6 +200,9 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
dimensionedScalar
(
"0"
,
dimDensity
/
dimTime
,
0
)
)
{
alphaPhi_
.
setOriented
();
alphaRhoPhi_
.
setOriented
();
phi_
.
writeOpt
()
=
IOobject
::
AUTO_WRITE
;
correctKinematics
();
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
View file @
b0302bcd
...
...
@@ -548,6 +548,8 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
)
);
tSurfaceTension
.
ref
().
setOriented
();
forAll
(
phases
(),
phasej
)
{
const
phaseModel
&
phase2
=
phases
()[
phasej
];
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C
View file @
b0302bcd
...
...
@@ -109,6 +109,9 @@ Foam::phaseModel::phaseModel
dimensionedScalar
(
"0"
,
dimensionSet
(
1
,
0
,
-
1
,
0
,
0
),
0
)
)
{
alphaPhi_
.
setOriented
();
alphaRhoPhi_
.
setOriented
();
thermo_
->
validate
(
"phaseModel "
+
name_
,
"h"
,
"e"
);
const
word
phiName
=
IOobject
::
groupName
(
"phi"
,
name_
);
...
...
applications/test/mapDistributePolyMesh/Make/files
0 → 100644
View file @
b0302bcd
Test-mapDistributePolyMesh.C
EXE = $(FOAM_USER_APPBIN)/Test-mapDistributePolyMesh
applications/test/mapDistributePolyMesh/Make/options
0 → 100644
View file @
b0302bcd
EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-ldynamicMesh \
-lmeshTools
applications/test/mapDistributePolyMesh/Test-mapDistributePolyMesh.C
0 → 100644
View file @
b0302bcd
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 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
mapDistributePolyMesh
Description
Test for procAddressing
\*---------------------------------------------------------------------------*/
#include
"IOmapDistributePolyMesh.H"
#include
"argList.H"
#include
"Time.H"
#include
"surfaceFields.H"
#include
"flipOp.H"
using
namespace
Foam
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
#include
"setRootCase.H"
#include
"createTime.H"
#include
"createMesh.H"
Info
<<
"Reading distribute map
\n
"
<<
endl
;
const
word
instance
(
"0.005"
);
const
scalar
instanceValue
(
0
.
005
);
IOobject
io
(
"procAddressing"
,
instance
,
fvMesh
::
meshSubDir
,
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
);
IOmapDistributePolyMesh
map
(
io
);
{
// Load the instance mesh
runTime
.
setTime
(
instanceValue
,
0
);
polyMesh
distributedMesh
(
IOobject
(
polyMesh
::
defaultRegion
,
instance
,
runTime
,
IOobject
::
MUST_READ
)
);
// Faces, no flip
{
const
mapDistribute
&
faceMap
=
map
.
faceMap
();
pointField
fc
(
mesh
.
faceCentres
());
faceMap
.
distribute
(
fc
,
noOp
());
Pout
<<
"Construct size:"
<<
faceMap
.
constructSize
()
<<
endl
;
forAll
(
distributedMesh
.
faceCentres
(),
facei
)
{
Pout
<<
"face:"
<<
facei
<<
"
\t
mappedFc:"
<<
fc
[
facei
]
<<
"
\t
actual:"
<<
distributedMesh
.
faceCentres
()[
facei
]
<<
endl
;
}
}
// Faces, flipped field
{
const
mapDistribute
&
faceMap
=
map
.
faceMap
();
scalarField
flux
(
mesh
.
faceAreas
()
&
vector
(
1
,
1
,
1
));
faceMap
.
distribute
(
flux
,
flipOp
());
Pout
<<
"Construct size:"
<<
faceMap
.
constructSize
()
<<
endl
;
const
scalarField
newFlux
(
distributedMesh
.
faceAreas
()
&
vector
(
1
,
1
,
1
)
);
forAll
(
newFlux
,
facei
)
{
Pout
<<
"face:"
<<
facei
<<
"
\t
mappedFlux:"
<<
flux
[
facei
]
<<
"
\t
actual:"
<<
newFlux
[
facei
]
<<
endl
;
}
}
{
const
mapDistribute
&
cellMap
=
map
.
cellMap
();
pointField
cc
(
mesh
.
cellCentres
());
cellMap
.
distribute
(
cc
,
noOp
());
Pout
<<
"Construct size:"
<<
cellMap
.
constructSize
()
<<
endl
;
forAll
(
distributedMesh
.
cellCentres
(),
celli
)
{
Pout
<<
"cell:"
<<
celli
<<
"
\t
mappedCc:"
<<
cc
[
celli
]
<<
"
\t
actual:"
<<
distributedMesh
.
cellCentres
()[
celli
]
<<
endl
;
}
}
{
const
mapDistribute
&
pointMap
=
map
.
pointMap
();
pointField
pc
(
mesh
.
points
());
pointMap
.
distribute
(
pc
,
noOp
());
Pout
<<
"Construct size:"
<<
pointMap
.
constructSize
()
<<
endl
;
forAll
(
distributedMesh
.
points
(),
pointi
)
{
Pout
<<
"point:"
<<
pointi
<<
"
\t
mappedPoint:"
<<
pc
[
pointi
]
<<
"
\t
actual:"
<<
distributedMesh
.
points
()[
pointi
]
<<
endl
;
}
}
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/test/mapDistributePolyMesh/cavity/0/U
0 → 100644
View file @
b0302bcd
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 1 0);
boundaryField
{
movingWall
{
type fixedValue;
value uniform (1 0 0);
}
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
applications/test/mapDistributePolyMesh/cavity/0/p
0 → 100644
View file @
b0302bcd
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
movingWall
{
type zeroGradient;
}
fixedWalls
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
applications/test/mapDistributePolyMesh/cavity/0/phi
0 → 100644
View file @
b0302bcd
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus.feature-oriented-fields |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "0";
object fluxU;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 3 -1 0 0 0 0];
oriented 1;
internalField nonuniform List<scalar>
180
(
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001