Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Dmitri Naumov
ogs
Commits
11d7b7b5
Commit
11d7b7b5
authored
7 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[PL/HC] Include computation of Darcy vel.
parent
419409bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ProcessLib/HC/HCFEM.h
+52
-0
52 additions, 0 deletions
ProcessLib/HC/HCFEM.h
ProcessLib/HC/HCProcess.cpp
+10
-0
10 additions, 0 deletions
ProcessLib/HC/HCProcess.cpp
ProcessLib/HC/HCProcess.h
+4
-0
4 additions, 0 deletions
ProcessLib/HC/HCProcess.h
with
66 additions
and
0 deletions
ProcessLib/HC/HCFEM.h
+
52
−
0
View file @
11d7b7b5
...
...
@@ -257,6 +257,58 @@ public:
}
}
void
computeSecondaryVariableConcrete
(
double
const
t
,
std
::
vector
<
double
>
const
&
local_x
)
override
{
SpatialPosition
pos
;
pos
.
setElementID
(
_element
.
getID
());
auto
const
&
K
=
_process_data
.
porous_media_properties
.
getIntrinsicPermeability
(
t
,
pos
);
MaterialLib
::
Fluid
::
FluidProperty
::
ArrayType
vars
;
auto
const
mu
=
_process_data
.
viscosity_model
->
getValue
(
vars
);
GlobalDimMatrixType
const
K_over_mu
=
K
/
mu
;
unsigned
const
n_integration_points
=
_integration_method
.
getNumberOfPoints
();
auto
const
p_nodal_values
=
Eigen
::
Map
<
const
NodalVectorType
>
(
&
local_x
[
ShapeFunction
::
NPOINTS
],
ShapeFunction
::
NPOINTS
);
for
(
unsigned
ip
=
0
;
ip
<
n_integration_points
;
++
ip
)
{
auto
const
&
ip_data
=
_ip_data
[
ip
];
auto
const
&
N
=
ip_data
.
N
;
auto
const
&
dNdx
=
ip_data
.
dNdx
;
GlobalDimVectorType
velocity
=
-
K_over_mu
*
dNdx
*
p_nodal_values
;
if
(
_process_data
.
has_gravity
)
{
double
C_int_pt
=
0.0
;
double
p_int_pt
=
0.0
;
NumLib
::
shapeFunctionInterpolate
(
local_x
,
N
,
C_int_pt
,
p_int_pt
);
vars
[
static_cast
<
int
>
(
MaterialLib
::
Fluid
::
PropertyVariableType
::
C
)]
=
C_int_pt
;
vars
[
static_cast
<
int
>
(
MaterialLib
::
Fluid
::
PropertyVariableType
::
p
)]
=
p_int_pt
;
auto
const
rho_w
=
_process_data
.
fluid_density
->
getValue
(
vars
);
auto
const
b
=
_process_data
.
specific_body_force
;
// here it is assumed that the vector b is directed 'downwards'
velocity
+=
K_over_mu
*
rho_w
*
b
;
}
for
(
unsigned
d
=
0
;
d
<
GlobalDim
;
++
d
)
{
_darcy_velocities
[
d
][
ip
]
=
velocity
[
d
];
}
}
}
Eigen
::
Map
<
const
Eigen
::
RowVectorXd
>
getShapeMatrix
(
const
unsigned
integration_point
)
const
override
{
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/HC/HCProcess.cpp
+
10
−
0
View file @
11d7b7b5
...
...
@@ -98,6 +98,16 @@ void HCProcess::assembleWithJacobianConcreteProcess(
dx_dx
,
M
,
K
,
b
,
Jac
,
coupling_term
);
}
void
HCProcess
::
computeSecondaryVariableConcrete
(
double
const
t
,
GlobalVector
const
&
x
,
StaggeredCouplingTerm
const
&
coupling_term
)
{
DBUG
(
"Compute the Darcy velocity for HCProcess."
);
GlobalExecutor
::
executeMemberOnDereferenced
(
&
HCLocalAssemblerInterface
::
computeSecondaryVariable
,
_local_assemblers
,
*
_local_to_global_index_map
,
t
,
x
,
coupling_term
);
}
}
// namespace HC
}
// namespace ProcessLib
This diff is collapsed.
Click to expand it.
ProcessLib/HC/HCProcess.h
+
4
−
0
View file @
11d7b7b5
...
...
@@ -57,6 +57,10 @@ public:
bool
isLinear
()
const
override
{
return
false
;
}
//! @}
void
computeSecondaryVariableConcrete
(
double
const
t
,
GlobalVector
const
&
x
,
StaggeredCouplingTerm
const
&
coupling_term
)
override
;
private
:
void
initializeConcreteProcess
(
NumLib
::
LocalToGlobalIndexMap
const
&
dof_table
,
...
...
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