ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
incompressible_navier_stokes
spatial_discretization
generalized_newtonian_model.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_SPATIAL_DISCRETIZATION_GENERALIZED_NEWTONIAN_MODEL_H_
23
#define EXADG_INCOMPRESSIBLE_NAVIER_STOKES_SPATIAL_DISCRETIZATION_GENERALIZED_NEWTONIAN_MODEL_H_
24
25
// ExaDG
26
#include <exadg/incompressible_navier_stokes/spatial_discretization/viscosity_model_base.h>
27
28
namespace
ExaDG
29
{
30
namespace
IncNS
31
{
32
/*
33
* Generalized Newtonian model.
34
*/
35
template
<
int
dim,
typename
Number>
36
class
GeneralizedNewtonianModel
:
public
ViscosityModelBase<dim, Number>
37
{
38
private
:
39
typedef
GeneralizedNewtonianModel<dim, Number>
This;
40
typedef
ViscosityModelBase<dim, Number> Base;
41
42
typedef
dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
43
44
typedef
dealii::VectorizedArray<Number> scalar;
45
typedef
dealii::Tensor<2, dim, dealii::VectorizedArray<Number>> tensor;
46
47
typedef
std::pair<unsigned int, unsigned int> Range;
48
49
typedef
CellIntegrator<dim, dim, Number> CellIntegratorU;
50
typedef
FaceIntegrator<dim, dim, Number> FaceIntegratorU;
51
52
public
:
56
GeneralizedNewtonianModel
();
57
61
virtual
~GeneralizedNewtonianModel
();
62
66
void
67
initialize
(dealii::MatrixFree<dim, Number>
const
& matrix_free_in,
68
std::shared_ptr<
Operators::ViscousKernel<dim, Number>
> viscous_kernel_in,
69
GeneralizedNewtonianModelData
const
& generalized_newtonian_model_data_in,
70
unsigned
int
const
dof_index_velocity_in);
71
76
void
77
set_viscosity
(VectorType
const
& velocity)
const
final
;
78
82
void
83
add_viscosity
(VectorType
const
& velocity)
const
final
;
84
85
private
:
86
void
87
cell_loop_set_coefficients(dealii::MatrixFree<dim, Number>
const
& data,
88
VectorType &,
89
VectorType
const
& src,
90
Range
const
& cell_range)
const
;
91
92
void
93
face_loop_set_coefficients(dealii::MatrixFree<dim, Number>
const
& data,
94
VectorType &,
95
VectorType
const
& src,
96
Range
const
& face_range)
const
;
97
98
void
99
boundary_face_loop_set_coefficients(dealii::MatrixFree<dim, Number>
const
& data,
100
VectorType &,
101
VectorType
const
& src,
102
Range
const
& face_range)
const
;
103
121
void
122
add_generalized_newtonian_viscosity(scalar & viscosity, tensor
const
& velocity_gradient)
const
;
123
131
scalar
132
compute_viscosity_factor(scalar
const
& shear_rate)
const
;
133
134
void
135
generalized_carreau_yasuda_model(scalar & viscosity_factor, scalar
const
& shear_rate)
const
;
136
137
GeneralizedNewtonianModelData
data;
138
};
139
140
}
// namespace IncNS
141
}
// namespace ExaDG
142
143
#endif
/* EXADG_INCOMPRESSIBLE_NAVIER_STOKES_SPATIAL_DISCRETIZATION_GENERALIZED_NEWTONIAN_MODEL_H_ \
144
*/
ExaDG::IncNS::GeneralizedNewtonianModel::add_viscosity
void add_viscosity(VectorType const &velocity) const final
Definition
generalized_newtonian_model.cpp:64
ExaDG::IncNS::GeneralizedNewtonianModel::initialize
void initialize(dealii::MatrixFree< dim, Number > const &matrix_free_in, std::shared_ptr< Operators::ViscousKernel< dim, Number > > viscous_kernel_in, GeneralizedNewtonianModelData const &generalized_newtonian_model_data_in, unsigned int const dof_index_velocity_in)
Definition
generalized_newtonian_model.cpp:40
ExaDG::IncNS::GeneralizedNewtonianModel::~GeneralizedNewtonianModel
virtual ~GeneralizedNewtonianModel()
Definition
generalized_newtonian_model.cpp:34
ExaDG::IncNS::GeneralizedNewtonianModel::set_viscosity
void set_viscosity(VectorType const &velocity) const final
Definition
generalized_newtonian_model.cpp:55
ExaDG::IncNS::GeneralizedNewtonianModel::GeneralizedNewtonianModel
GeneralizedNewtonianModel()
Definition
generalized_newtonian_model.cpp:29
ExaDG::IncNS::Operators::ViscousKernel
Definition
viscous_operator.h:64
ExaDG
Definition
driver.cpp:33
ExaDG::IncNS::GeneralizedNewtonianModelData
Definition
viscosity_model_data.h:92
Generated by
1.17.0