Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
avalanche
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Community
avalanche
Commits
0013a72f
Commit
0013a72f
authored
Dec 19, 2017
by
Matthias Rauter
Committed by
Mark Olesen
Dec 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit of avalaches code for OpenFOAM-1712
parents
Changes
94
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
94 changed files
with
4995 additions
and
0 deletions
+4995
-0
Allclean
Allclean
+16
-0
Allrun
Allrun
+11
-0
Allwmake
Allwmake
+13
-0
entrainmentModels/Erosionenergy/Erosionenergy.C
entrainmentModels/Erosionenergy/Erosionenergy.C
+93
-0
entrainmentModels/Erosionenergy/Erosionenergy.H
entrainmentModels/Erosionenergy/Erosionenergy.H
+124
-0
entrainmentModels/Front/Front.C
entrainmentModels/Front/Front.C
+91
-0
entrainmentModels/Front/Front.H
entrainmentModels/Front/Front.H
+121
-0
entrainmentModels/IsslerFC/IsslerFC.C
entrainmentModels/IsslerFC/IsslerFC.C
+119
-0
entrainmentModels/IsslerFC/IsslerFC.H
entrainmentModels/IsslerFC/IsslerFC.H
+130
-0
entrainmentModels/Make/files
entrainmentModels/Make/files
+13
-0
entrainmentModels/Make/options
entrainmentModels/Make/options
+16
-0
entrainmentModels/Medina/Medina.C
entrainmentModels/Medina/Medina.C
+103
-0
entrainmentModels/Medina/Medina.H
entrainmentModels/Medina/Medina.H
+127
-0
entrainmentModels/Stopingprofile/Stopingprofile.C
entrainmentModels/Stopingprofile/Stopingprofile.C
+108
-0
entrainmentModels/Stopingprofile/Stopingprofile.H
entrainmentModels/Stopingprofile/Stopingprofile.H
+125
-0
entrainmentModels/depositionModel/depositionModel.C
entrainmentModels/depositionModel/depositionModel.C
+92
-0
entrainmentModels/depositionModel/depositionModel.H
entrainmentModels/depositionModel/depositionModel.H
+196
-0
entrainmentModels/depositionModel/newDepositionModel.C
entrainmentModels/depositionModel/newDepositionModel.C
+79
-0
entrainmentModels/depositionOff/depositionOff.C
entrainmentModels/depositionOff/depositionOff.C
+80
-0
entrainmentModels/depositionOff/depositionOff.H
entrainmentModels/depositionOff/depositionOff.H
+117
-0
entrainmentModels/entrainmentModel/entrainmentModel.C
entrainmentModels/entrainmentModel/entrainmentModel.C
+91
-0
entrainmentModels/entrainmentModel/entrainmentModel.H
entrainmentModels/entrainmentModel/entrainmentModel.H
+195
-0
entrainmentModels/entrainmentModel/newEntrainmentModel.C
entrainmentModels/entrainmentModel/newEntrainmentModel.C
+79
-0
entrainmentModels/entrainmentOff/entrainmentOff.C
entrainmentModels/entrainmentOff/entrainmentOff.C
+81
-0
entrainmentModels/entrainmentOff/entrainmentOff.H
entrainmentModels/entrainmentOff/entrainmentOff.H
+113
-0
frictionModels/DarcyWeisbach/DarcyWeisbach.C
frictionModels/DarcyWeisbach/DarcyWeisbach.C
+93
-0
frictionModels/DarcyWeisbach/DarcyWeisbach.H
frictionModels/DarcyWeisbach/DarcyWeisbach.H
+119
-0
frictionModels/Make/files
frictionModels/Make/files
+10
-0
frictionModels/Make/options
frictionModels/Make/options
+16
-0
frictionModels/ManningStrickler/ManningStrickler.C
frictionModels/ManningStrickler/ManningStrickler.C
+94
-0
frictionModels/ManningStrickler/ManningStrickler.H
frictionModels/ManningStrickler/ManningStrickler.H
+120
-0
frictionModels/PoliquenForterre/PoliquenForterre.C
frictionModels/PoliquenForterre/PoliquenForterre.C
+148
-0
frictionModels/PoliquenForterre/PoliquenForterre.H
frictionModels/PoliquenForterre/PoliquenForterre.H
+143
-0
frictionModels/Voellmy/Voellmy.C
frictionModels/Voellmy/Voellmy.C
+102
-0
frictionModels/Voellmy/Voellmy.H
frictionModels/Voellmy/Voellmy.H
+124
-0
frictionModels/frictionModel/frictionModel.C
frictionModels/frictionModel/frictionModel.C
+105
-0
frictionModels/frictionModel/frictionModel.H
frictionModels/frictionModel/frictionModel.H
+206
-0
frictionModels/frictionModel/newFrictionModel.C
frictionModels/frictionModel/newFrictionModel.C
+76
-0
frictionModels/kt/kt.C
frictionModels/kt/kt.C
+100
-0
frictionModels/kt/kt.H
frictionModels/kt/kt.H
+124
-0
frictionModels/muI/muI.C
frictionModels/muI/muI.C
+119
-0
frictionModels/muI/muI.H
frictionModels/muI/muI.H
+137
-0
implicitSolver/Make/files
implicitSolver/Make/files
+5
-0
implicitSolver/Make/options
implicitSolver/Make/options
+16
-0
implicitSolver/calcBasalstress.H
implicitSolver/calcBasalstress.H
+14
-0
implicitSolver/createFaFields.H
implicitSolver/createFaFields.H
+142
-0
implicitSolver/createFvFields.H
implicitSolver/createFvFields.H
+82
-0
implicitSolver/faSavageHutterFoam.C
implicitSolver/faSavageHutterFoam.C
+281
-0
implicitSolver/readSolutionControls.H
implicitSolver/readSolutionControls.H
+13
-0
implicitSolver/readTransportProperties.H
implicitSolver/readTransportProperties.H
+42
-0
implicitSolver/surfaceCourantNo.H
implicitSolver/surfaceCourantNo.H
+57
-0
releaseAreaMapping/HormannAgathos.C
releaseAreaMapping/HormannAgathos.C
+0
-0
releaseAreaMapping/HormannAgathos.H
releaseAreaMapping/HormannAgathos.H
+152
-0
releaseAreaMapping/HormannAgathosI.H
releaseAreaMapping/HormannAgathosI.H
+0
-0
releaseAreaMapping/Make/files
releaseAreaMapping/Make/files
+4
-0
releaseAreaMapping/Make/options
releaseAreaMapping/Make/options
+12
-0
releaseAreaMapping/releaseAreaMapping.C
releaseAreaMapping/releaseAreaMapping.C
+0
-0
slopeMesh/Make/files
slopeMesh/Make/files
+6
-0
slopeMesh/Make/options
slopeMesh/Make/options
+0
-0
slopeMesh/elevationModels/elevationModel/elevationModel.C
slopeMesh/elevationModels/elevationModel/elevationModel.C
+0
-0
slopeMesh/elevationModels/elevationModel/elevationModel.H
slopeMesh/elevationModels/elevationModel/elevationModel.H
+0
-0
slopeMesh/elevationModels/elevationModel/newElevationModel.C
slopeMesh/elevationModels/elevationModel/newElevationModel.C
+0
-0
slopeMesh/elevationModels/simpleSlope/SimpleSlope.C
slopeMesh/elevationModels/simpleSlope/SimpleSlope.C
+0
-0
slopeMesh/elevationModels/simpleSlope/SimpleSlope.H
slopeMesh/elevationModels/simpleSlope/SimpleSlope.H
+0
-0
slopeMesh/slopeMesh.C
slopeMesh/slopeMesh.C
+0
-0
tutorials/entrainment/Allclean
tutorials/entrainment/Allclean
+0
-0
tutorials/entrainment/Allrun
tutorials/entrainment/Allrun
+0
-0
tutorials/entrainment/constant/faMesh/faMeshDefinition
tutorials/entrainment/constant/faMesh/faMeshDefinition
+0
-0
tutorials/entrainment/constant/g
tutorials/entrainment/constant/g
+0
-0
tutorials/entrainment/constant/releaseArea
tutorials/entrainment/constant/releaseArea
+0
-0
tutorials/entrainment/constant/slopeMeshDict
tutorials/entrainment/constant/slopeMeshDict
+0
-0
tutorials/entrainment/constant/transportProperties
tutorials/entrainment/constant/transportProperties
+0
-0
tutorials/entrainment/org0/Us
tutorials/entrainment/org0/Us
+0
-0
tutorials/entrainment/org0/h
tutorials/entrainment/org0/h
+0
-0
tutorials/entrainment/org0/hentrain
tutorials/entrainment/org0/hentrain
+0
-0
tutorials/entrainment/system/controlDict
tutorials/entrainment/system/controlDict
+0
-0
tutorials/entrainment/system/faSchemes
tutorials/entrainment/system/faSchemes
+0
-0
tutorials/entrainment/system/faSolution
tutorials/entrainment/system/faSolution
+0
-0
tutorials/entrainment/system/fvSchemes
tutorials/entrainment/system/fvSchemes
+0
-0
tutorials/entrainment/system/fvSolution
tutorials/entrainment/system/fvSolution
+0
-0
tutorials/simpleslope/Allclean
tutorials/simpleslope/Allclean
+0
-0
tutorials/simpleslope/Allrun
tutorials/simpleslope/Allrun
+0
-0
tutorials/simpleslope/constant/faMesh/faMeshDefinition
tutorials/simpleslope/constant/faMesh/faMeshDefinition
+0
-0
tutorials/simpleslope/constant/g
tutorials/simpleslope/constant/g
+0
-0
tutorials/simpleslope/constant/releaseArea
tutorials/simpleslope/constant/releaseArea
+0
-0
tutorials/simpleslope/constant/slopeMeshDict
tutorials/simpleslope/constant/slopeMeshDict
+0
-0
tutorials/simpleslope/constant/transportProperties
tutorials/simpleslope/constant/transportProperties
+0
-0
tutorials/simpleslope/org0/Us
tutorials/simpleslope/org0/Us
+0
-0
tutorials/simpleslope/org0/h
tutorials/simpleslope/org0/h
+0
-0
tutorials/simpleslope/system/controlDict
tutorials/simpleslope/system/controlDict
+0
-0
tutorials/simpleslope/system/faSchemes
tutorials/simpleslope/system/faSchemes
+0
-0
tutorials/simpleslope/system/faSolution
tutorials/simpleslope/system/faSolution
+0
-0
tutorials/simpleslope/system/fvSchemes
tutorials/simpleslope/system/fvSchemes
+0
-0
tutorials/simpleslope/system/fvSolution
tutorials/simpleslope/system/fvSolution
+0
-0
No files found.
Allclean
0 → 100755
View file @
0013a72f
#!/bin/bash
#SUBMODELS
(
cd
frictionModels
&&
wclean
&&
rm
-rf
lnInclude
)
(
cd
entrainmentModels
&&
wclean
&&
rm
-rf
lnInclude
)
#PREPROCESSING
(
cd
slopeMesh
&&
wclean
)
(
cd
releaseAreaMapping
&&
wclean
)
#SOLVER
(
cd
implicitSolver
&&
wclean
)
#CASES
(
cd
tutorials/simpleslope
&&
./Allclean
)
(
cd
tutorials/entrainment
&&
./Allclean
)
Allrun
0 → 100755
View file @
0013a72f
#!/bin/bash
./Allwmake
#CASES
echo
''
echo
'running case simpleslope'
(
cd
tutorials/simpleslope
&&
./Allrun
)
echo
''
echo
'running case entrainment'
(
cd
tutorials/entrainment
&&
./Allrun
)
Allwmake
0 → 100755
View file @
0013a72f
#!/bin/bash
#SUBMODELS
(
cd
frictionModels
&&
wmake libso
)
(
cd
entrainmentModels
&&
wmake libso
)
#PREPROCESSING
(
cd
slopeMesh
&&
wmake
)
(
cd
releaseAreaMapping
&&
wmake
)
#SOLVER
(
cd
implicitSolver
&&
wmake
)
\ No newline at end of file
entrainmentModels/Erosionenergy/Erosionenergy.C
0 → 100644
View file @
0013a72f
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | faSavageHutterFOAM
\\ / A nd | Copyright (C) 2017 Matthias Rauter
\\/ 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/>.
Author
Matthias Rauter matthias.rauter@uibk.ac.at
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "faCFD.H"
#include "Erosionenergy.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace
Foam
{
namespace
entrainmentModels
{
defineTypeNameAndDebug
(
Erosionenergy
,
0
);
addToRunTimeSelectionTable
(
entrainmentModel
,
Erosionenergy
,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
entrainmentModels
::
Erosionenergy
::
Erosionenergy
(
const
word
&
name
,
const
dictionary
&
entrainmentProperties
,
const
areaVectorField
&
Us
,
const
areaScalarField
&
h
,
const
areaScalarField
&
hentrain
,
const
areaScalarField
&
pb
,
const
areaVectorField
&
tau
)
:
entrainmentModel
(
name
,
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
eb_
(
entrainmentProperties
.
subDict
(
"ErosionenergyCoeffs"
).
lookup
(
"eb"
)),
gs_
(
Us_
.
db
().
lookupObject
<
areaVectorField
>
(
"gs"
)),
gn_
(
Us_
.
db
().
lookupObject
<
areaScalarField
>
(
"gn"
))
{
Info
<<
" "
<<
eb_
<<
endl
<<
endl
;
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const
Foam
::
areaScalarField
&
Foam
::
entrainmentModels
::
Erosionenergy
::
Sm
()
const
{
Sm_
=
(
tau_
&
Us_
)
/
eb_
/
rho_
;
Sm_
=
min
(
Sm_
,
hentrain_
/
Us_
.
db
().
time
().
deltaT
());
return
Sm_
;
}
bool
Foam
::
entrainmentModels
::
Erosionenergy
::
read
(
const
dictionary
&
entrainmentProperties
)
{
entrainmentModel
::
read
(
entrainmentProperties
);
entrainmentProperties_
.
lookup
(
"eb"
)
>>
eb_
;
return
true
;
}
// ************************************************************************* //
entrainmentModels/Erosionenergy/Erosionenergy.H
0 → 100644
View file @
0013a72f
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | faSavageHutterFOAM
\\ / A nd | Copyright (C) 2017 Matthias Rauter
\\/ 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::entrainmentModels::ErrosionEnergy
Description
An entrainment model following the errosion energy apporach (see Rauter et al. 2016).
SourceFiles
Erosionenergy.C
Author
Matthias Rauter matthias.rauter@uibk.ac.at
\*---------------------------------------------------------------------------*/
#ifndef Erosionenergy_H
#define Erosionenergy_H
#include "entrainmentModel.H"
#include "dimensionedScalar.H"
#include "volFields.H"
#include "IOdictionary.H"
#include "typeInfo.H"
#include "runTimeSelectionTables.H"
#include "dimensionedScalar.H"
#include "tmp.H"
#include "autoPtr.H"
#include "faMatrices.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
namespace
entrainmentModels
{
/*---------------------------------------------------------------------------*\
Class Erosionenergy Declaration
\*---------------------------------------------------------------------------*/
class
Erosionenergy
:
public
entrainmentModel
{
// Private data
//Specific erroision energy parameter e_b
dimensionedScalar
eb_
;
//Pointer to the gravitation fields
const
areaVectorField
&
gs_
;
const
areaScalarField
&
gn_
;
public:
//- Runtime type information
TypeName
(
"Erosionenergy"
);
// Constructors
//- construct from components
Erosionenergy
(
const
word
&
name
,
const
dictionary
&
frictionProperties
,
const
areaVectorField
&
Us
,
const
areaScalarField
&
h
,
const
areaScalarField
&
hentrain
,
const
areaScalarField
&
pb
,
const
areaVectorField
&
tau
);
// Destructor
virtual
~
Erosionenergy
()
{}
// Member Functions
//- Return the Source by entrainment
virtual
const
areaScalarField
&
Sm
()
const
;
//- Read entrainmentProperties dictionary
virtual
bool
read
(
const
dictionary
&
entrainmentProperties
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace frictionModels
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
entrainmentModels/Front/Front.C
0 → 100644
View file @
0013a72f
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | faSavageHutterFOAM
\\ / A nd | Copyright (C) 2017 Matthias Rauter
\\/ 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/>.
Author
Matthias Rauter matthias.rauter@uibk.ac.at
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "faCFD.H"
#include "Front.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace
Foam
{
namespace
entrainmentModels
{
defineTypeNameAndDebug
(
Front
,
0
);
addToRunTimeSelectionTable
(
entrainmentModel
,
Front
,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
entrainmentModels
::
Front
::
Front
(
const
word
&
name
,
const
dictionary
&
entrainmentProperties
,
const
areaVectorField
&
Us
,
const
areaScalarField
&
h
,
const
areaScalarField
&
hentrain
,
const
areaScalarField
&
pb
,
const
areaVectorField
&
tau
)
:
entrainmentModel
(
name
,
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
htrigger_
(
entrainmentProperties
.
subDict
(
"FrontCoeffs"
).
lookup
(
"htrigger"
))
{
Info
<<
" "
<<
htrigger_
<<
endl
<<
endl
;
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const
Foam
::
areaScalarField
&
Foam
::
entrainmentModels
::
Front
::
Sm
()
const
{
areaScalarField
eflag
=
pos
(
h_
-
htrigger_
);
Sm_
=
eflag
*
hentrain_
/
Us_
.
db
().
time
().
deltaT
();
return
Sm_
;
}
bool
Foam
::
entrainmentModels
::
Front
::
read
(
const
dictionary
&
entrainmentProperties
)
{
entrainmentModel
::
read
(
entrainmentProperties
);
entrainmentProperties_
.
lookup
(
"htrigger"
)
>>
htrigger_
;
return
true
;
}
// ************************************************************************* //
entrainmentModels/Front/Front.H
0 → 100644
View file @
0013a72f
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | faSavageHutterFOAM
\\ / A nd | Copyright (C) 2017 Matthias Rauter
\\/ 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::entrainmentModels::Front
Description
An entrainment model following the simple front entrainment approach.
SourceFiles
Front.C
Author
Matthias Rauter matthias.rauter@uibk.ac.at
\*---------------------------------------------------------------------------*/
#ifndef Front_H
#define Front_H
#include "entrainmentModel.H"
#include "dimensionedScalar.H"
#include "volFields.H"
#include "IOdictionary.H"
#include "typeInfo.H"
#include "runTimeSelectionTables.H"
#include "dimensionedScalar.H"
#include "tmp.H"
#include "autoPtr.H"
#include "faMatrices.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
namespace
entrainmentModels
{
/*---------------------------------------------------------------------------*\
Class Front Declaration
\*---------------------------------------------------------------------------*/
class
Front
:
public
entrainmentModel
{
// Private data
//Height threshold
dimensionedScalar
htrigger_
;
public:
//- Runtime type information
TypeName
(
"Front"
);
// Constructors
//- construct from components
Front
(
const
word
&
name
,
const
dictionary
&
frictionProperties
,
const
areaVectorField
&
Us
,
const
areaScalarField
&
h
,
const
areaScalarField
&
hentrain
,
const
areaScalarField
&
pb
,
const
areaVectorField
&
tau
);
// Destructor
virtual
~
Front
()
{}
// Member Functions
//- Return the Source by entrainment
virtual
const
areaScalarField
&
Sm
()
const
;
//- Read entrainmentProperties dictionary
virtual
bool
read
(
const
dictionary
&
entrainmentProperties
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace frictionModels
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
entrainmentModels/IsslerFC/IsslerFC.C
0 → 100644
View file @
0013a72f
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | faSavageHutterFOAM
\\ / A nd | Copyright (C) 2017 Matthias Rauter
\\/ 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/>.
Author
Matthias Rauter matthias.rauter@uibk.ac.at
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "faCFD.H"
#include "IsslerFC.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace
Foam
{
namespace
entrainmentModels
{
defineTypeNameAndDebug
(
IsslerFC
,
0
);
addToRunTimeSelectionTable
(
entrainmentModel
,
IsslerFC
,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
entrainmentModels
::
IsslerFC
::
IsslerFC
(
const
word
&
name
,
const
dictionary
&
entrainmentProperties
,
const
areaVectorField
&
Us
,
const
areaScalarField
&
h
,
const
areaScalarField
&
hentrain
,
const
areaScalarField
&
pb
,
const
areaVectorField
&
tau
)
:
entrainmentModel
(
name
,
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
tauc_
(
entrainmentProperties
.
subDict
(
"IsslerFCCoeffs"
).
lookup
(
"tauc"
)),
mu_
(
entrainmentProperties
.
subDict
(
"IsslerFCCoeffs"
).
lookup
(
"mu"
)),
K_
(
entrainmentProperties
.
subDict
(
"IsslerFCCoeffs"
).
lookup
(
"K"
)),
gs_
(
Us
.
db
().
lookupObject
<
areaVectorField
>
(
"gs"
)),
gn_
(
Us
.
db
().
lookupObject
<
areaScalarField
>
(
"gn"
))
{
Info
<<
" "
<<
tauc_
<<
endl
<<
endl
;
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const
Foam
::
areaScalarField
&
Foam
::
entrainmentModels
::
IsslerFC
::
Sm
()
const
{
areaScalarField
u
=
mag
(
Us_
);
areaScalarField
gs
=
mag
(
gs_
);
areaScalarField
gamma_c
=
5
.
/
2
.
*
u
/
h_
;
areaScalarField
uthr
=
h_
*
gamma_c
*
gamma_c
/
2
.
*
K_
*
gamma_c
/
(
h_
*
(
gs
+
mu_
*
gn_
)
+
4
.
*
K_
*
gamma_c
*
gamma_c
);
areaScalarField
weinf
=
(
h_
*
(
gs
+
mu_
*
gn_
)
+
4
*
K_
*
pow
(
gamma_c
,
2
))
/
(
h_
*
gamma_c
+
dimensionedScalar
(
"small"
,
dimVelocity
,
SMALL
)
);
Sm_
=
pos
(
u
-
uthr
)
*
weinf
*
(
1
-
uthr
/
(
u
+
dimensionedScalar
(
"small"
,
dimVelocity
,
SMALL
)));
areaScalarField
hlimit
=
h_
*
mag
(
gs_
)
-
(
tauc_
-
5
*
K_
*
gamma_c
*
gamma_c
);
areaScalarField
hlimit2
=
h_
-
dimensionedScalar
(
"small"
,
dimLength
,
1e-2
);
Sm_
=
pos
(
hlimit2
)
*
pos
(
hlimit
)
*
Sm_
;
Sm_
=
min
(
Sm_
,
hentrain_
/
Us_
.
db
().
time
().
deltaT
());
Info
<<
"IsslerFC:min/max(Sm) = "
<<
min
(
Sm_
)
<<
" / "
<<
max
(
Sm_
)
<<
endl
;
return
Sm_
;
}
bool
Foam
::
entrainmentModels
::
IsslerFC
::
read
(
const
dictionary
&
entrainmentProperties
)
{
entrainmentModel
::
read
(
entrainmentProperties
);
entrainmentProperties_
.
lookup
(
"tauc"
)
>>
tauc_
;
return
true
;
}
// ************************************************************************* //
entrainmentModels/IsslerFC/IsslerFC.H
0 → 100644
View file @
0013a72f
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | faSavageHutterFOAM
\\ / A nd | Copyright (C) 2017 Matthias Rauter
\\/ 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.