Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MostafaMollaali
dynamic
Commits
07bada8f
Commit
07bada8f
authored
5 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[PL/LiquidFlow] Use MPL density and viscosity.
parent
335303ff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h
+26
-9
26 additions, 9 deletions
ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h
with
26 additions
and
9 deletions
ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h
+
26
−
9
View file @
07bada8f
...
@@ -89,17 +89,26 @@ LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>::getFlux(
...
@@ -89,17 +89,26 @@ LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>::getFlux(
pos
.
setElementID
(
_element
.
getID
());
pos
.
setElementID
(
_element
.
getID
());
const
int
material_id
=
_material_properties
.
getMaterialID
(
pos
);
const
int
material_id
=
_material_properties
.
getMaterialID
(
pos
);
auto
const
&
medium
=
_process_data
.
media_map
->
getMedium
(
_element
.
getID
());
auto
const
&
liquid_phase
=
medium
->
phase
(
"AqueousLiquid"
);
MaterialPropertyLib
::
VariableArray
vars
;
double
pressure
=
0.0
;
double
pressure
=
0.0
;
NumLib
::
shapeFunctionInterpolate
(
local_x
,
shape_matrices
.
N
,
pressure
);
NumLib
::
shapeFunctionInterpolate
(
local_x
,
shape_matrices
.
N
,
pressure
);
vars
[
static_cast
<
int
>
(
MaterialPropertyLib
::
Variable
::
phase_pressure
)]
=
pressure
;
const
Eigen
::
MatrixXd
&
permeability
=
_material_properties
.
getPermeability
(
const
Eigen
::
MatrixXd
&
permeability
=
_material_properties
.
getPermeability
(
material_id
,
t
,
pos
,
_element
.
getDimension
(),
pressure
,
material_id
,
t
,
pos
,
_element
.
getDimension
(),
pressure
,
_reference_temperature
);
_reference_temperature
);
const
double
mu
=
auto
const
viscosity
=
_material_properties
.
getViscosity
(
pressure
,
_reference_temperature
);
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
viscosity
)
.
template
value
<
double
>(
vars
,
pos
,
t
,
dt
);
Eigen
::
Vector3d
flux
(
0.0
,
0.0
,
0.0
);
Eigen
::
Vector3d
flux
(
0.0
,
0.0
,
0.0
);
flux
.
head
<
GlobalDim
>
()
=
flux
.
head
<
GlobalDim
>
()
=
-
permeability
/
mu
*
shape_matrices
.
dNdx
*
-
permeability
/
viscosity
*
shape_matrices
.
dNdx
*
Eigen
::
Map
<
const
NodalVectorType
>
(
local_x
.
data
(),
local_x
.
size
());
Eigen
::
Map
<
const
NodalVectorType
>
(
local_x
.
data
(),
local_x
.
size
());
return
flux
;
return
flux
;
...
@@ -152,19 +161,27 @@ void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>::
...
@@ -152,19 +161,27 @@ void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>::
vars
[
static_cast
<
int
>
(
MaterialPropertyLib
::
Variable
::
phase_pressure
)]
=
vars
[
static_cast
<
int
>
(
MaterialPropertyLib
::
Variable
::
phase_pressure
)]
=
p
;
p
;
// Compute density:
auto
const
fluid_density
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
value
<
double
>(
vars
,
pos
,
t
,
dt
);
auto
const
ddensity_dpressure
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
dValue
<
double
>(
vars
,
MaterialPropertyLib
::
Variable
::
phase_pressure
,
pos
,
t
,
dt
);
assert
(
fluid_density
>
0.
);
// Assemble mass matrix, M
// Assemble mass matrix, M
local_M
.
noalias
()
+=
_material_properties
.
getMassCoefficient
(
local_M
.
noalias
()
+=
_material_properties
.
getMassCoefficient
(
material_id
,
t
,
pos
,
porosity_variable
,
material_id
,
t
,
pos
,
porosity_variable
,
storage_variable
,
p
,
_reference_temperature
)
*
storage_variable
,
p
,
_reference_temperature
,
fluid_density
,
ddensity_dpressure
)
*
ip_data
.
N
.
transpose
()
*
ip_data
.
N
*
ip_data
.
N
.
transpose
()
*
ip_data
.
N
*
ip_data
.
integration_weight
;
ip_data
.
integration_weight
;
// Compute density:
auto
const
fluid_density
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
value
<
double
>(
vars
,
pos
,
t
);
// Compute viscosity:
// Compute viscosity:
_material_properties
.
getViscosity
(
p
,
_reference_temperature
);
auto
const
viscosity
=
auto
const
viscosity
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
viscosity
)
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
viscosity
)
.
template
value
<
double
>(
vars
,
pos
,
t
,
dt
);
.
template
value
<
double
>(
vars
,
pos
,
t
,
dt
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment