Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
LYNX
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Antoine Jacquey
LYNX
Commits
145074ca
Commit
145074ca
authored
Apr 05, 2019
by
Antoine Jacquey
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devel' of gitext.gfz-potsdam.de:ajacquey/lynx into devel
parents
d605ca67
35b13bc2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
236 additions
and
0 deletions
+236
-0
include/actions/LynxHoldStressAction.h
include/actions/LynxHoldStressAction.h
+43
-0
include/bcs/LynxHoldStressBC.h
include/bcs/LynxHoldStressBC.h
+49
-0
src/actions/LynxHoldStressAction.C
src/actions/LynxHoldStressAction.C
+72
-0
src/base/LynxApp.C
src/base/LynxApp.C
+3
-0
src/bcs/LynxHoldStressBC.C
src/bcs/LynxHoldStressBC.C
+69
-0
No files found.
include/actions/LynxHoldStressAction.h
0 → 100644
View file @
145074ca
/******************************************************************************/
/* LYNX, a MOOSE-based application */
/* */
/* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
/* GFZ Potsdam, German Research Centre for Geosciences */
/* */
/* This program is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/> */
/******************************************************************************/
#ifndef LYNXHOLDSTRESSACTION_H
#define LYNXHOLDSTRESSACTION_H
#include "Action.h"
class
LynxHoldStressAction
;
template
<
>
InputParameters
validParams
<
LynxHoldStressAction
>
();
class
LynxHoldStressAction
:
public
Action
{
public:
LynxHoldStressAction
(
const
InputParameters
&
params
);
virtual
void
act
()
override
;
protected:
std
::
vector
<
std
::
vector
<
AuxVariableName
>>
_save_in_vars
;
std
::
vector
<
bool
>
_has_save_in_vars
;
};
#endif // LYNXHOLDSTRESSACTION_H
include/bcs/LynxHoldStressBC.h
0 → 100644
View file @
145074ca
/******************************************************************************/
/* LYNX, a MOOSE-based application */
/* */
/* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
/* GFZ Potsdam, German Research Centre for Geosciences */
/* */
/* This program is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/> */
/******************************************************************************/
#ifndef LYNXHOLDSTRESSBC_H
#define LYNXHOLDSTRESSBC_H
#include "IntegratedBC.h"
class
LynxHoldStressBC
;
class
Function
;
template
<
>
InputParameters
validParams
<
LynxHoldStressBC
>
();
class
LynxHoldStressBC
:
public
IntegratedBC
{
public:
LynxHoldStressBC
(
const
InputParameters
&
parameters
);
protected:
virtual
Real
computeQpResidual
();
bool
_coupled_pf
;
const
VariableValue
&
_pf
;
const
int
_component
;
const
Real
_bulk_modulus
;
const
Real
_shear_modulus
;
const
MaterialProperty
<
RankTwoTensor
>
&
_elastic_strain_old
;
const
MaterialProperty
<
Real
>
&
_biot_coeff
;
};
#endif // LYNXHOLDSTRESSBC_H
src/actions/LynxHoldStressAction.C
0 → 100644
View file @
145074ca
/******************************************************************************/
/* LYNX, a MOOSE-based application */
/* */
/* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
/* GFZ Potsdam, German Research Centre for Geosciences */
/* */
/* This program is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/> */
/******************************************************************************/
#include "LynxHoldStressAction.h"
#include "Factory.h"
#include "FEProblem.h"
#include "Conversion.h"
registerMooseAction
(
"LynxApp"
,
LynxHoldStressAction
,
"add_bc"
);
template
<>
InputParameters
validParams
<
LynxHoldStressAction
>
()
{
InputParameters
params
=
validParams
<
Action
>
();
params
.
addClassDescription
(
"Set up hold stress boundary conditions."
);
params
.
addRequiredParam
<
std
::
vector
<
BoundaryName
>>
(
"boundary"
,
"The list of boundary IDs from the mesh where the pressure will be applied."
);
params
.
addRequiredParam
<
std
::
vector
<
NonlinearVariableName
>>
(
"displacements"
,
"The displacements appropriate for the simulation geometry and coordinate system"
);
// Elastic moduli parameters
params
.
addRangeCheckedParam
<
Real
>
(
"bulk_modulus"
,
"bulk_modulus >= 0.0"
,
"The drained bulk modulus of the material."
);
params
.
addRangeCheckedParam
<
Real
>
(
"shear_modulus"
,
"shear_modulus >= 0.0"
,
"The shear modulus of the material."
);
params
.
addCoupledVar
(
"fluid_pressure"
,
"The fluid pressure variable."
);
return
params
;
}
LynxHoldStressAction
::
LynxHoldStressAction
(
const
InputParameters
&
params
)
:
Action
(
params
)
{}
void
LynxHoldStressAction
::
act
()
{
const
std
::
string
kernel_name
=
"LynxHoldStressBC"
;
std
::
vector
<
NonlinearVariableName
>
displacements
=
getParam
<
std
::
vector
<
NonlinearVariableName
>>
(
"displacements"
);
// Create pressure BCs
for
(
unsigned
int
i
=
0
;
i
<
displacements
.
size
();
++
i
)
{
// Create unique kernel name for each of the components
std
::
string
unique_kernel_name
=
kernel_name
+
"_"
+
_name
+
"_"
+
Moose
::
stringify
(
i
);
InputParameters
params
=
_factory
.
getValidParams
(
kernel_name
);
params
.
applyParameters
(
parameters
());
params
.
set
<
bool
>
(
"use_displaced_mesh"
)
=
true
;
params
.
set
<
unsigned
int
>
(
"component"
)
=
i
;
params
.
set
<
NonlinearVariableName
>
(
"variable"
)
=
displacements
[
i
];
_problem
->
addBoundaryCondition
(
kernel_name
,
unique_kernel_name
,
params
);
}
}
src/base/LynxApp.C
View file @
145074ca
...
...
@@ -46,6 +46,9 @@ associateSyntaxInner(Syntax & syntax, ActionFactory & /*action_factory*/)
registerSyntax
(
"EmptyAction"
,
"BCs/LynxPressure"
);
registerSyntax
(
"LynxPressureAction"
,
"BCs/LynxPressure/*"
);
registerSyntax
(
"EmptyAction"
,
"BCs/LynxHoldStress"
);
registerSyntax
(
"LynxHoldStressAction"
,
"BCs/LynxHoldStress/*"
);
}
void
...
...
src/bcs/LynxHoldStressBC.C
0 → 100644
View file @
145074ca
/******************************************************************************/
/* LYNX, a MOOSE-based application */
/* */
/* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
/* GFZ Potsdam, German Research Centre for Geosciences */
/* */
/* This program is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/> */
/******************************************************************************/
#include "LynxHoldStressBC.h"
#include "Function.h"
registerMooseObject
(
"LynxApp"
,
LynxHoldStressBC
);
template
<>
InputParameters
validParams
<
LynxHoldStressBC
>
()
{
InputParameters
params
=
validParams
<
IntegratedBC
>
();
params
.
addClassDescription
(
"Hold the stress on a given boundary in a given direction."
);
params
.
addCoupledVar
(
"fluid_pressure"
,
"The fluid pressure variable."
);
params
.
addRequiredParam
<
unsigned
int
>
(
"component"
,
"The component for the pressure."
);
// Elastic moduli parameters
params
.
addRangeCheckedParam
<
Real
>
(
"bulk_modulus"
,
"bulk_modulus >= 0.0"
,
"The drained bulk modulus of the material."
);
params
.
addRangeCheckedParam
<
Real
>
(
"shear_modulus"
,
"shear_modulus >= 0.0"
,
"The shear modulus of the material."
);
params
.
set
<
bool
>
(
"use_displaced_mesh"
)
=
false
;
return
params
;
}
LynxHoldStressBC
::
LynxHoldStressBC
(
const
InputParameters
&
parameters
)
:
IntegratedBC
(
parameters
),
_coupled_pf
(
isCoupled
(
"fluid_pressure"
)),
_pf
(
_coupled_pf
?
coupledValueOld
(
"fluid_pressure"
)
:
_zero
),
_component
(
getParam
<
unsigned
int
>
(
"component"
)),
_bulk_modulus
(
getParam
<
Real
>
(
"bulk_modulus"
)),
_shear_modulus
(
getParam
<
Real
>
(
"shear_modulus"
)),
_elastic_strain_old
(
getMaterialPropertyOld
<
RankTwoTensor
>
(
"elastic_strain"
)),
_biot_coeff
(
getMaterialProperty
<
Real
>
(
"biot_coefficient"
))
{
if
(
_component
>
2
)
mooseError
(
"Invalid component given for "
,
name
(),
": "
,
_component
,
".
\n
"
);
}
Real
LynxHoldStressBC
::
computeQpResidual
()
{
Real
vol_strain
=
_elastic_strain_old
[
_qp
].
trace
();
RankTwoTensor
dev_strain
=
_elastic_strain_old
[
_qp
].
deviatoric
();
RankTwoTensor
stress
=
2
.
0
*
_shear_modulus
*
dev_strain
;
stress
.
addIa
(
_bulk_modulus
*
vol_strain
);
Real
value
=
-
(
stress
(
_component
,
_component
)
-
_biot_coeff
[
_qp
]
*
_pf
[
_qp
]);
return
value
*
(
_normals
[
_qp
](
_component
)
*
_test
[
_i
][
_qp
]);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment