# Non-equilibrium initial state variables in SmallDeformation process. #2501

Merged
merged 6 commits into from May 27, 2019

## Conversation

Member

### endJunction commented May 20, 2019 • edited

 Adds a possibility of non-equilibrium initial state in the small deformation process. Two new methods for the finite element creation and coordinates interpolation added for convenience. Feature description was added to the changelog Tests covering your feature were added? Any new feature or behavior change was documented? (pdf in the Tests/Data together with the project files.)

# Codecov Report

Merging #2501 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2501   +/-   ##
=======================================
Coverage   31.75%   31.75%
=======================================
Files         571      571
Lines       21533    21533
Branches    10211    10211
=======================================
Hits         6837     6837
Misses      11185    11185
Partials     3511     3511

Δ = absolute <relative> (impact), ø = not affected, ? = missing data

### TomFischer reviewed May 23, 2019

 SmallDeformationProcessData process_data{ materialIDs(mesh), std::move(solid_constitutive_relations), solid_density, specific_body_force, reference_temperature}; materialIDs(mesh), std::move(solid_constitutive_relations),

#### TomFischer May 23, 2019

Member

Is this clang formatted?

Member

### TomFischer left a comment

 Checked the code technical. Except the format issue: ⏩

### TomFischer reviewed May 23, 2019

 @@ -272,6 +296,24 @@ class SmallDeformationLocalAssembler auto const& b = _process_data.specific_body_force; local_b.noalias() -= (B.transpose() * sigma - N_u_op.transpose() * rho * b) * w; if (_process_data.nonequilibrium_sigma) {

#### TomFischer May 23, 2019

Member

Possible code duplication?

#### endJunction May 24, 2019

Author Member

Yes. Removing, and as suggested by @wenqing storing in the ip_data.

### wenqing reviewed May 23, 2019

 { nonequilibrium_sigma = &ParameterLib::findParameter( *nonequilibrium_state_variables_config, //! \ogs_file_param_special{prj__processes__process__SMALL_DEFORMATION__nonequilibrium_state_variables__sigma}

#### wenqing May 23, 2019

Member

Not for this PR: I think it is better to use the variable name instead of the symbol name of variable, e.g sigma to stress, for input data in the project file.

#### wenqing May 23, 2019 • edited

Member

if (nonequilibrium_state_variables_config), set body force=zero.

 MathLib::KelvinVector::KelvinVectorDimensions< DisplacementDim>::value, 1); ip_data.sigma = sigma_ref;

#### wenqing May 23, 2019

Member

I think that sigma_ref can computed once at here and store it to ip_data.

#### wenqing May 23, 2019

Member

initial_sigma or initial_stress could be a proper name.

 @@ -272,6 +296,24 @@ class SmallDeformationLocalAssembler auto const& b = _process_data.specific_body_force; local_b.noalias() -= (B.transpose() * sigma - N_u_op.transpose() * rho * b) * w; if (_process_data.nonequilibrium_sigma) { x_position.setCoordinates(MathLib::Point3d(

#### wenqing May 23, 2019

Member

Here I think sigma_ref can be directly fetched from ip_data if it keeps sigma_ref.

Collaborator

### norihiro-w commented May 23, 2019

 perhaps you also need to include reference traction force, ie, neumann bc.
Member

### wenqing commented May 23, 2019

 @norihiro-w Good idea!. Since this gives a non-equilibrium initial state, I think, only a reference of body force has to be excluded. The traction bc can be considered in the project file directly.
Member

### wenqing commented May 23, 2019

 @norihiro-w The reference body force can be also excluded from the input data, e.g, if no change in body force, set 0 in , otherwise, give the increment value.
Collaborator

### norihiro-w commented May 23, 2019

 @wenqing though I'm not checking the implementation, i guess here you want to solve the volume integration of \nabla \cdot (stress - stress_ref) + (b-b_ref) = 0 (if i'm wrong, please correct it). Then., in addition to stress_ref, you need to set b_ref (i forgot about this in previous comment) and boundary integrals of stress_ref which is the traction force (Nuemann bc). Of course, if b=b_ref (e.g. no density changes) or 't=t_ref'(e.g. constant crustal stress), you can simply set 'b=0' or 't=0' in the input file. However, I find the approach implicit and actual model setup becomes unclear for users.
Member

### wenqing commented May 24, 2019

 @norihiro-w I think that you are right that this PR is aimed to solve \nabla \cdot (stress - stress_ref) + (b-b_ref) = 0. Where non-equilibrium means that the given reference stress and the reference body force do not need to satisfy the momentum balance equation strictly, and they should be excluded in displacement change. Therefore the raised traction BC of (stress - stress_ref) \cdot n can be configured in the project file directly. Of course, the stress associated material parameters must be calculated by using the value of 'stress'. You know well that in some cases of geo-engineering application only measured normal stresses are available, which may does not strictly satisfy \nabla \cdot stress_ref + b_ref = 0, and one only can or want to obtain the displacement from the initial status (0).
Member

### wenqing commented May 24, 2019

 I think to add an explanation in the document about how to set body force and traction BC under the nonequilibrium condition is better than to change the corresponding source code. Because this can explicitly remind one the balance equation \nabla \cdot (stress - stress_ref) + (b-b_ref) = 0. This is just my opinion.
Member Author

### endJunction commented May 27, 2019

 @norihiro-w We have mentioned some points in the pdf (see the test case folder). Especially the handling of the body-force term when density is not constant. We might miss some points and can improve the code when the need arises. For this PR the density in the small deformation process is constant.

### endJunction and others added some commits May 2, 2019

 [PL] SD; Non-equilibrium initial stress state. 
 d825ea5 
 Nonequilibrium initial states docu. 
 167866a 
 [PL] Add interpolateCoordinates for elements. 
 e27b61e 
 [NL] Add a create function for common FE type. 
 b63c384 
 [T] SD; equilibrium and non-equilibrium tests. 
 0fb7675 
 [doc] SD; Non-equilibrium initial state variables. 
Copied from the pdf documentation.
 0f5109a 

### endJunction merged commit 3f6133c into ufz:master May 27, 2019 3 checks passed

#### 3 checks passed

continuous-integration/jenkins/pr-merge This commit looks good
Details