OGS
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
z
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
i
k
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Macros
b
c
g
m
n
o
p
r
s
t
▼
OGS
►
OpenGeoSys 6.5.4-301-gee1fb4d5 source code documentation
►
OGS CTests—Project Files
►
OGS Input File Parameters—Quality Assurance
►
OGS Input File Parameters
BulkMappingDocuPage
Todo List
OGS Input File Parameters—List of incomplete documentation pages
Bibliography
►
Namespaces
►
Classes
▼
Files
▼
File List
►
Applications
►
BaseLib
►
build
►
ChemistryLib
Documentation
►
GeoLib
►
InfoLib
▼
MaterialLib
►
Adsorption
►
Fluid
►
FractureModels
▼
MPL
►
Components
►
Properties
▼
Utils
►
CheckMPLPhasesForSinglePhaseFlow.cpp
►
CheckMPLPhasesForSinglePhaseFlow.h
►
CheckVanGenuchtenExponentRange.cpp
►
CheckVanGenuchtenExponentRange.h
►
FormEffectiveThermalConductivity.cpp
►
FormEffectiveThermalConductivity.h
►
FormEigenTensor.cpp
►
FormEigenTensor.h
►
FormEigenVector.cpp
►
FormEigenVector.h
►
FormKelvinVector.cpp
►
FormKelvinVector.h
►
GetFluidDensityAndViscosity.cpp
►
GetFluidDensityAndViscosity.h
►
GetLiquidThermalExpansivity.cpp
►
GetLiquidThermalExpansivity.h
►
GetSymmetricTensor.cpp
►
GetSymmetricTensor.h
SigmoidFunction.cpp
►
SigmoidFunction.h
►
Tensor.h
►
CheckMaterialSpatialDistributionMap.h
►
Component.cpp
►
Component.h
►
CreateComponent.cpp
►
CreateComponent.h
►
CreateMaterialSpatialDistributionMap.cpp
►
CreateMaterialSpatialDistributionMap.h
►
CreateMedium.cpp
►
CreateMedium.h
►
CreatePhase.cpp
►
CreatePhase.h
►
CreateProperty.cpp
►
CreateProperty.h
MaterialSpatialDistributionMap.cpp
►
MaterialSpatialDistributionMap.h
►
Medium.cpp
►
Medium.h
►
Phase.cpp
►
Phase.h
►
Property.cpp
►
Property.h
►
PropertyType.cpp
►
PropertyType.h
►
VariableType.cpp
►
VariableType.h
►
PorousMedium
►
SolidModels
►
Utils
►
PhysicalConstant.h
►
MathLib
►
MeshGeoToolsLib
►
MeshLib
►
MeshToolsLib
►
NumLib
►
ParameterLib
►
ProcessLib
►
File Members
SigmoidFunction.cpp
Go to the documentation of this file.
1
13
#include "
SigmoidFunction.h
"
14
15
namespace
MaterialPropertyLib
16
{
17
SigmoidFunction::SigmoidFunction
(
double
const
k,
double
const
T_c
,
18
double
const
S_r)
19
: k_(k), T_c_(
T_c
), S_r(S_r)
20
{
21
}
17
SigmoidFunction::SigmoidFunction
(
double
const
k,
double
const
T_c
, {
…
}
22
23
double
SigmoidFunction::value
(
double
const
& T)
const
24
{
25
double
const
x =
k_
* (T -
T_c_
);
26
27
// Cutting off at the last x producing a (non-normal) return value because
28
// std::exp(x) produces +infinity beyond this point, approximately 709.78.
29
// The reason for using hex representation is that the value is unambiguous.
30
if
(x > 0x1.62e42fefa39efp+9)
31
{
32
return
0.;
33
}
34
35
return
(1. -
S_r
) / (1. + std::exp(x));
36
}
23
double
SigmoidFunction::value
(
double
const
& T)
const
{
…
}
37
38
double
SigmoidFunction::dValue
(
double
const
& T)
const
39
{
40
double
const
f =
value
(T);
41
if
(f * f == 0)
42
{
43
return
0;
44
}
45
double
const
x =
k_
* (T -
T_c_
);
46
return
-
k_
* std::exp(x) * (f * f) / (1. -
S_r
);
47
}
38
double
SigmoidFunction::dValue
(
double
const
& T)
const
{
…
}
48
49
double
SigmoidFunction::d2Value
(
double
const
& T)
const
50
{
51
double
const
fT =
dValue
(T);
52
if
(fT == 0)
53
{
54
return
0;
55
}
56
57
double
const
f =
value
(T);
58
return
fT * (
k_
+ 2 * fT / f);
59
}
49
double
SigmoidFunction::d2Value
(
double
const
& T)
const
{
…
}
60
61
}
// namespace MaterialPropertyLib
SigmoidFunction.h
MaterialPropertyLib::SigmoidFunction::k_
double const k_
Definition
SigmoidFunction.h:50
MaterialPropertyLib::SigmoidFunction::S_r
double const S_r
Definition
SigmoidFunction.h:53
MaterialPropertyLib::SigmoidFunction::dValue
double dValue(double const &T) const
Definition
SigmoidFunction.cpp:38
MaterialPropertyLib::SigmoidFunction::SigmoidFunction
SigmoidFunction(double const k, double const T_c, double const S_r)
Definition
SigmoidFunction.cpp:17
MaterialPropertyLib::SigmoidFunction::T_c_
double const T_c_
Definition
SigmoidFunction.h:51
MaterialPropertyLib::SigmoidFunction::d2Value
double d2Value(double const &T) const
Definition
SigmoidFunction.cpp:49
MaterialPropertyLib::SigmoidFunction::value
double value(double const &T) const
Definition
SigmoidFunction.cpp:23
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MaterialPropertyLib::T_c
constexpr double T_c
Critical temperature.
Definition
WaterVapourLatentHeatWithCriticalTemperature.cpp:24
MaterialLib
MPL
Utils
SigmoidFunction.cpp
Generated by
1.12.0