ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
incompressible_navier_stokes
user_interface
viscosity_model_data.h
1
/* ______________________________________________________________________
2
*
3
* ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
4
*
5
* Copyright (C) 2023 by the ExaDG authors
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19
* ______________________________________________________________________
20
*/
21
22
#ifndef EXADG_INCOMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_VISCOSITY_MODEL_DATA_H_
23
#define EXADG_INCOMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_VISCOSITY_MODEL_DATA_H_
24
25
// ExaDG
26
#include <exadg/utilities/print_functions.h>
27
28
namespace
ExaDG
29
{
30
namespace
IncNS
31
{
41
enum class
TurbulenceEddyViscosityModel
42
{
43
Undefined,
44
Smagorinsky,
45
Vreman,
46
WALE,
47
Sigma
48
};
49
50
struct
TurbulenceModelData
51
{
52
TurbulenceModelData()
53
{
54
}
55
56
TurbulenceEddyViscosityModel turbulence_model{TurbulenceEddyViscosityModel::Undefined};
57
bool
is_active{
false
};
58
double
constant{0.0};
// model constant
59
60
void
61
check()
const
62
{
63
AssertThrow(is_active, dealii::ExcMessage(
"Turbulence model is inactive."
));
64
AssertThrow(constant > 1e-20, dealii::ExcMessage(
"Parameter must be greater than zero."
));
65
}
66
67
void
68
print(dealii::ConditionalOStream
const
& pcout)
const
69
{
70
pcout << std::endl <<
"Turbulence:"
<< std::endl;
71
72
print_parameter(pcout,
"Use turbulence model"
, is_active);
73
74
if
(is_active)
75
{
76
print_parameter(pcout,
"Turbulence model"
, turbulence_model);
77
print_parameter(pcout,
"Turbulence model constant"
, constant);
78
}
79
}
80
};
81
85
enum class
GeneralizedNewtonianViscosityModel
86
{
87
Undefined,
88
GeneralizedCarreauYasuda
89
};
90
91
struct
GeneralizedNewtonianModelData
92
{
93
GeneralizedNewtonianModelData()
94
{
95
}
96
97
GeneralizedNewtonianViscosityModel generalized_newtonian_model{
98
GeneralizedNewtonianViscosityModel::Undefined};
99
bool
is_active{
false
};
100
101
// parameters of generalized Carreau-Yasuda model
102
double
viscosity_margin{0.0};
103
double
kappa{0.0};
104
double
lambda{0.0};
105
double
a{0.0};
106
double
n{0.0};
107
108
void
109
check()
const
110
{
111
AssertThrow(is_active, dealii::ExcMessage(
"Generalized Newtonian model is inactive."
));
112
AssertThrow(generalized_newtonian_model != GeneralizedNewtonianViscosityModel::Undefined,
113
dealii::ExcMessage(
"GenerelizedNewtonianViscosityModel not defined."
));
114
}
115
116
void
117
print(dealii::ConditionalOStream
const
& pcout)
const
118
{
119
pcout << std::endl <<
"Rheology:"
<< std::endl;
120
121
print_parameter(pcout,
"Use generalized Newtonian model"
, is_active);
122
123
if
(is_active)
124
{
125
print_parameter(pcout,
"Generalized Newtonian model"
, generalized_newtonian_model);
126
print_parameter(pcout,
"viscosity margin"
, viscosity_margin);
127
print_parameter(pcout,
"parameter kappa"
, kappa);
128
print_parameter(pcout,
"parameter lambda"
, lambda);
129
print_parameter(pcout,
"parameter a"
, a);
130
print_parameter(pcout,
"parameter n"
, n);
131
}
132
}
133
};
134
135
}
// namespace IncNS
136
}
// namespace ExaDG
137
138
#endif
/* EXADG_INCOMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_VISCOSITY_MODEL_DATA_H_ */
ExaDG
Definition
driver.cpp:33
Generated by
1.17.0