Commit 640c5f0a authored by Dmitry Yu. Naumov's avatar Dmitry Yu. Naumov
Browse files

Merge branch 'Use2DCoordinateSystemForSolidMaterialOrthotropy' into 'master'

Use 2D coordinate system for solid material orthotropy

See merge request ogs/ogs!3165
parents d7a82351 aec7064c
......@@ -70,10 +70,12 @@ LinearElasticOrthotropic<DisplacementDim>::getElasticTensor(
auto const Q = [this, &x]() -> KelvinMatrixType<3> {
if (!_local_coordinate_system)
{
return MathLib::KelvinVector::KelvinMatrixType<3>::Identity();
return KelvinMatrixType<3>::Identity();
}
return MathLib::KelvinVector::fourthOrderRotationMatrix(
_local_coordinate_system->transformation<3>(x));
Eigen::Matrix3d R = Eigen::Matrix3d::Identity();
R.template topLeftCorner<DisplacementDim, DisplacementDim>().noalias() =
_local_coordinate_system->transformation<DisplacementDim>(x);
return fourthOrderRotationMatrix(R);
}();
// Rotate the forth-order tenser in Kelvin mapping with Q*C_ortho*Q^T and
......
......@@ -17,8 +17,6 @@ if (NOT OGS_USE_MPI)
OgsTest(PROJECTFILE Mechanics/Linear/Orthotropy/m3_3Dtopload.prj)
OgsTest(PROJECTFILE Mechanics/Linear/Orthotropy/m3_3Dtoploadlc.prj)
OgsTest(PROJECTFILE Mechanics/Linear/Orthotropy/square_1e0_orthotropic_xyz.prj)
OgsTest(PROJECTFILE Mechanics/Linear/Orthotropy/square_1e0_orthotropic_yzx.prj)
OgsTest(PROJECTFILE Mechanics/Linear/Orthotropy/square_1e0_orthotropic_zxy.prj)
OgsTest(PROJECTFILE Mechanics/Linear/Orthotropy/square_1e0_orthotropic_45xy_z.prj)
OgsTest(PROJECTFILE Mechanics/Linear/Orthotropy/square_1e0_orthotropic_y-xz.prj)
OgsTest(PROJECTFILE Mechanics/Burgers/cube_1e0.prj)
......
......@@ -69,23 +69,17 @@
<local_coordinate_system>
<basis_vector_0>e0</basis_vector_0>
<basis_vector_1>e1</basis_vector_1>
<basis_vector_2>e2</basis_vector_2>
</local_coordinate_system>
<parameters>
<parameter>
<name>e0</name>
<type>Constant</type>
<values>0.7071067811865475244 0.7071067811865475244 0</values>
<values>0.7071067811865475244 0.7071067811865475244</values>
</parameter>
<parameter>
<name>e1</name>
<type>Constant</type>
<values>-0.7071067811865475244 0.7071067811865475244 0</values>
</parameter>
<parameter>
<name>e2</name>
<type>Constant</type>
<values>0 0 1</values>
<values>-0.7071067811865475244 0.7071067811865475244</values>
</parameter>
<parameter>
<name>E</name>
......
......@@ -69,23 +69,17 @@
<local_coordinate_system>
<basis_vector_0>e0</basis_vector_0>
<basis_vector_1>e1</basis_vector_1>
<basis_vector_2>e2</basis_vector_2>
</local_coordinate_system>
<parameters>
<parameter>
<name>e0</name>
<type>Constant</type>
<values>1 0 0</values>
<values>1 0</values>
</parameter>
<parameter>
<name>e1</name>
<type>Constant</type>
<values>0 1 0</values>
</parameter>
<parameter>
<name>e2</name>
<type>Constant</type>
<values>0 0 1</values>
<values>0 1</values>
</parameter>
<parameter>
<name>E</name>
......
......@@ -69,23 +69,17 @@
<local_coordinate_system>
<basis_vector_0>e1</basis_vector_0>
<basis_vector_1>e0_negative</basis_vector_1>
<basis_vector_2>e2</basis_vector_2>
</local_coordinate_system>
<parameters>
<parameter>
<name>e0_negative</name>
<type>Constant</type>
<values>-1 0 0</values>
<values>-1 0</values>
</parameter>
<parameter>
<name>e1</name>
<type>Constant</type>
<values>0 1 0</values>
</parameter>
<parameter>
<name>e2</name>
<type>Constant</type>
<values>0 0 1</values>
<values>0 1</values>
</parameter>
<parameter>
<name>E</name>
......
<?xml version="1.0" encoding="ISO-8859-1"?>
<OpenGeoSysProject>
<mesh>square_1x1_quad_1e0.vtu</mesh>
<geometry>square_1x1.gml</geometry>
<processes>
<process>
<name>SD</name>
<type>SMALL_DEFORMATION</type>
<integration_order>2</integration_order>
<constitutive_relation>
<type>LinearElasticOrthotropic</type>
<youngs_moduli>E</youngs_moduli>
<shear_moduli>G</shear_moduli>
<poissons_ratios>nu</poissons_ratios>
</constitutive_relation>
<solid_density>rho_sr</solid_density>
<specific_body_force>0 0</specific_body_force>
<process_variables>
<process_variable>displacement</process_variable>
</process_variables>
<secondary_variables>
<secondary_variable internal_name="sigma" output_name="sigma"/>
<secondary_variable internal_name="epsilon" output_name="epsilon"/>
</secondary_variables>
</process>
</processes>
<time_loop>
<processes>
<process ref="SD">
<nonlinear_solver>basic_newton</nonlinear_solver>
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<abstol>1e-15</abstol>
</convergence_criterion>
<time_discretization>
<type>BackwardEuler</type>
</time_discretization>
<time_stepping>
<type>FixedTimeStepping</type>
<t_initial>0</t_initial>
<t_end>1</t_end>
<timesteps>
<pair>
<repeat>4</repeat>
<delta_t>0.25</delta_t>
</pair>
</timesteps>
</time_stepping>
</process>
</processes>
<output>
<type>VTK</type>
<prefix>square_1e0_orthotropic_yzx_pcs_{:process_id}</prefix>
<timesteps>
<pair>
<repeat>1</repeat>
<each_steps>10000000</each_steps>
</pair>
</timesteps>
<variables>
<variable>displacement</variable>
<variable>sigma</variable>
<variable>epsilon</variable>
</variables>
<suffix>_ts_{:timestep}_t_{:time}</suffix>
</output>
</time_loop>
<local_coordinate_system>
<basis_vector_0>e1</basis_vector_0>
<basis_vector_1>e2</basis_vector_1>
<basis_vector_2>e0</basis_vector_2>
</local_coordinate_system>
<parameters>
<parameter>
<name>e0</name>
<type>Constant</type>
<values>1 0 0</values>
</parameter>
<parameter>
<name>e1</name>
<type>Constant</type>
<values>0 1 0</values>
</parameter>
<parameter>
<name>e2</name>
<type>Constant</type>
<values>0 0 1</values>
</parameter>
<parameter>
<name>E</name>
<type>Constant</type>
<values>1 0.5 1</values>
</parameter>
<parameter>
<name>G</name>
<type>Constant</type>
<values>1 1 1</values>
</parameter>
<parameter>
<name>nu</name>
<type>Constant</type>
<values>.3 .2 .2</values>
</parameter>
<parameter>
<name>rho_sr</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>displacement0</name>
<type>Constant</type>
<values>0 0</values>
</parameter>
<parameter>
<name>dirichlet0</name>
<type>Constant</type>
<value>0</value>
</parameter>
<parameter>
<name>Neumann_force_top</name>
<type>Constant</type>
<value>0.01</value>
</parameter>
</parameters>
<process_variables>
<process_variable>
<name>displacement</name>
<components>2</components>
<order>1</order>
<initial_condition>displacement0</initial_condition>
<boundary_conditions>
<!-- fixed boundaries -->
<boundary_condition>
<geometrical_set>square_1x1_geometry</geometrical_set>
<geometry>left</geometry>
<type>Dirichlet</type>
<component>0</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<geometrical_set>square_1x1_geometry</geometrical_set>
<geometry>bottom</geometry>
<type>Dirichlet</type>
<component>1</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<geometrical_set>square_1x1_geometry</geometrical_set>
<geometry>top</geometry>
<type>Neumann</type>
<component>1</component>
<parameter>Neumann_force_top</parameter>
</boundary_condition>
</boundary_conditions>
</process_variable>
</process_variables>
<nonlinear_solvers>
<nonlinear_solver>
<name>basic_newton</name>
<type>Newton</type>
<max_iter>4</max_iter>
<linear_solver>general_linear_solver</linear_solver>
</nonlinear_solver>
</nonlinear_solvers>
<linear_solvers>
<linear_solver>
<name>general_linear_solver</name>
<lis>-i cg -p jacobi -tol 1e-16 -maxiter 10000</lis>
<eigen>
<solver_type>CG</solver_type>
<precon_type>DIAGONAL</precon_type>
<max_iteration_step>10000</max_iteration_step>
<error_tolerance>1e-16</error_tolerance>
</eigen>
<petsc>
<prefix>sd</prefix>
<parameters>-sd_ksp_type cg -sd_pc_type bjacobi -sd_ksp_rtol 1e-16 -sd_ksp_max_it 10000</parameters>
</petsc>
</linear_solver>
</linear_solvers>
<test_definition>
<vtkdiff>
<file>square_1e0_orthotropic_yzx_pcs_0_ts_4_t_1.000000.vtu</file>
<field>displacement</field>
<absolute_tolerance>1e-16</absolute_tolerance>
<relative_tolerance>1e-16</relative_tolerance>
</vtkdiff>
<vtkdiff>
<file>square_1e0_orthotropic_yzx_pcs_0_ts_4_t_1.000000.vtu</file>
<field>NodalForces</field>
<absolute_tolerance>1e-14</absolute_tolerance>
<relative_tolerance>1e-15</relative_tolerance>
</vtkdiff>
<vtkdiff>
<file>square_1e0_orthotropic_yzx_pcs_0_ts_4_t_1.000000.vtu</file>
<field>sigma</field>
<absolute_tolerance>1e-16</absolute_tolerance>
<relative_tolerance>1e-16</relative_tolerance>
</vtkdiff>
<vtkdiff>
<file>square_1e0_orthotropic_yzx_pcs_0_ts_4_t_1.000000.vtu</file>
<field>epsilon</field>
<absolute_tolerance>1e-14</absolute_tolerance>
<relative_tolerance>1e-15</relative_tolerance>
</vtkdiff>
</test_definition>
</OpenGeoSysProject>
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
<UnstructuredGrid>
<FieldData>
<DataArray type="Int8" Name="IntegrationPointMetaData" NumberOfTuples="97" format="binary" RangeMin="34" RangeMax="125">
AQAAAACAAABhAAAAVwAAAA==eF5VjDEKgDAMAP+S2Umc+hWREDVKhiQlrYOU/t2ujncH10Cs8h1UxQ2zD0KKoLdAWtsvepwckOYJjJQhQZFbCSXDMI/uHOgXHq7Zja2OwdK3/gELTCQs
</DataArray>
<DataArray type="Int8" Name="OGS_VERSION" NumberOfTuples="19" format="binary" RangeMin="45" RangeMax="103">
AQAAAACAAAATAAAAGwAAAA==eF4z0zPSM9A1N9NNNzEwTjIzTrI0BgAouwRT
</DataArray>
<DataArray type="Float64" Name="sigma_ip" NumberOfComponents="4" NumberOfTuples="4" format="binary" RangeMin="0.010111874208078341" RangeMax="0.010111874208078343">
AQAAAACAAACAAAAAWwAAAA==eF4T4FrQr53EvadaZJ37w6oW+191WXtKJkfYn7GuT5u34Jt1kffmCNNWMxuY/B+ovOWnd2duyujvaZFiidz0UB+u/weKfjObJ3VeNs6MKjZVWM0XswEA9mw7Rg==
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0.010111874208
</Value>
<Value index="1">
0.010111874208
</Value>
</InformationKey>
</DataArray>
</FieldData>
<Piece NumberOfPoints="4" NumberOfCells="1">
<PointData>
<DataArray type="Float64" Name="MaterialForces" NumberOfComponents="2" format="binary" RangeMin="0.000033764348801657646" RangeMax="0.000033764348801657646">
AQAAAACAAABAAAAAIwAAAA==eF6rrDjf+JTj575qCG1XCaWroHQFVB7K31eBKr8PAK28JSw=
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
3.3764348802e-05
</Value>
<Value index="1">
3.3764348802e-05
</Value>
</InformationKey>
</DataArray>
<DataArray type="Float64" Name="NodalForces" NumberOfComponents="2" format="binary" RangeMin="0.004999999999999999" RangeMax="0.005">
AQAAAACAAABAAAAAOQAAAA==eF7TYsk/16jGbVMtss79YVXJ/lJ29+eLt0vvqYLx/820/7lbag9U3v7VwSvyegUqNlB5ewCz+B3s
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0.005
</Value>
<Value index="1">
0.005
</Value>
</InformationKey>
</DataArray>
<DataArray type="Float64" Name="displacement" NumberOfComponents="2" format="binary" RangeMin="0" RangeMax="0.009897600719366286">
AQAAAACAAABAAAAAJAAAAA==eF5jYEAFU7+xxc/wSd2PJswgL5bl+7mv2X46VB7GBwAuzw5R
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0
</Value>
<Value index="1">
0.0098976007194
</Value>
</InformationKey>
</DataArray>
<DataArray type="Float64" Name="epsilon" NumberOfComponents="4" format="binary" RangeMin="0.009897600719366274" RangeMax="0.009897600719366285">
AQAAAACAAACAAAAATgAAAA==eF6b+o0tfoZP6n4ZsSzfz33N9gxQ8CX/1b2PBzbungSVl0CTX7XkpYOLr5FND1ReCk1+adtpxvAO3T0w/XJo8npxYv1nr/HYAAAXZy0X
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0.0098976007194
</Value>
<Value index="1">
0.0098976007194
</Value>
</InformationKey>
</DataArray>
<DataArray type="Float64" Name="sigma" NumberOfComponents="4" format="binary" RangeMin="0.010111874208078332" RangeMax="0.01011187420807834">
AQAAAACAAACAAAAAbQAAAA==eF7b3LZ8SfsahT0VIuvcH1a12H+ty9pTMjnC/kv+q3sfDxzcLZppHXaQxW5POVT+E1R+1ZKXDi6+TjaLg80O9vk42ZRC5b9B5Ze2nWYM77DdI8XM9df+qq5NJVT+F1ReL06s/+w1GRsAPks9eQ==
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0.010111874208
</Value>
<Value index="1">
0.010111874208
</Value>
</InformationKey>
</DataArray>
</PointData>
<CellData>
<DataArray type="Int32" Name="MaterialIDs" format="binary" RangeMin="0" RangeMax="0">
AQAAAACAAAAEAAAADAAAAA==eF5jYGBgAAAABAAB
</DataArray>
</CellData>
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3" format="binary" RangeMin="0" RangeMax="1.4142135623730951">
AQAAAACAAABgAAAAFQAAAA==eF5jYMAHPtjjlcaQh/ER4gCW5AS9
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0
</Value>
<Value index="1">
1.4142135624
</Value>
</InformationKey>
</DataArray>
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="binary" RangeMin="0" RangeMax="3">
AQAAAACAAAAgAAAAEwAAAA==eF5jYIAARijNDKWZoDQAAHgABw==
</DataArray>
<DataArray type="Int64" Name="offsets" format="binary" RangeMin="4" RangeMax="4">
AQAAAACAAAAIAAAACwAAAA==eF5jYYAAAAAoAAU=
</DataArray>
<DataArray type="UInt8" Name="types" format="binary" RangeMin="9" RangeMax="9">
AQAAAACAAAABAAAACQAAAA==eF7jBAAACgAK
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
<?xml version="1.0" encoding="ISO-8859-1"?>
<OpenGeoSysProject>
<mesh>square_1x1_quad_1e0.vtu</mesh>
<geometry>square_1x1.gml</geometry>
<processes>
<process>
<name>SD</name>
<type>SMALL_DEFORMATION</type>
<integration_order>2</integration_order>
<constitutive_relation>
<type>LinearElasticOrthotropic</type>
<youngs_moduli>E</youngs_moduli>
<shear_moduli>G</shear_moduli>
<poissons_ratios>nu</poissons_ratios>
</constitutive_relation>
<solid_density>rho_sr</solid_density>
<specific_body_force>0 0</specific_body_force>
<process_variables>
<process_variable>displacement</process_variable>
</process_variables>
<secondary_variables>
<secondary_variable internal_name="sigma" output_name="sigma"/>
<secondary_variable internal_name="epsilon" output_name="epsilon"/>
</secondary_variables>
</process>
</processes>
<time_loop>
<processes>
<process ref="SD">
<nonlinear_solver>basic_newton</nonlinear_solver>
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<abstol>1e-15</abstol>
</convergence_criterion>
<time_discretization>
<type>BackwardEuler</type>
</time_discretization>
<time_stepping>
<type>FixedTimeStepping</type>
<t_initial>0</t_initial>
<t_end>1</t_end>
<timesteps>
<pair>
<repeat>4</repeat>
<delta_t>0.25</delta_t>
</pair>
</timesteps>
</time_stepping>
</process>
</processes>
<output>
<type>VTK</type>
<prefix>square_1e0_orthotropic_zxy_pcs_{:process_id}</prefix>
<timesteps>
<pair>
<repeat>1</repeat>
<each_steps>10000000</each_steps>
</pair>
</timesteps>
<variables>
<variable>displacement</variable>
<variable>sigma</variable>
<variable>epsilon</variable>
</variables>
<suffix>_ts_{:timestep}_t_{:time}</suffix>
</output>
</time_loop>
<local_coordinate_system>
<basis_vector_0>e1</basis_vector_0>
<basis_vector_1>e2</basis_vector_1>
<basis_vector_2>e0</basis_vector_2>
</local_coordinate_system>
<parameters>
<parameter>
<name>e0</name>
<type>Constant</type>
<values>1 0 0</values>
</parameter>
<parameter>
<name>e1</name>
<type>Constant</type>
<values>0 1 0</values>
</parameter>
<parameter>
<name>e2</name>
<type>Constant</type>
<values>0 0 1</values>
</parameter>
<parameter>
<name>E</name>
<type>Constant</type>
<values>1 0.5 1</values>
</parameter>
<parameter>
<name>G</name>
<type>Constant</type>
<values>1 1 1</values>
</parameter>
<parameter>
<name>nu</name>
<type>Constant</type>
<values>.3 .2 .2</values>
</parameter>
<parameter>
<name>rho_sr</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>displacement0</name>
<type>Constant</type>
<values>0 0</values>
</parameter>
<parameter>
<name>dirichlet0</name>
<type>Constant</type>
<value>0</value>
</parameter>
<parameter>
<name>Neumann_force_top</name>
<type>Constant</type>
<value>0.01</value>
</parameter>
</parameters>
<process_variables>
<process_variable>
<name>displacement</name>
<components>2</components>
<order>1</order>
<initial_condition>displacement0</initial_condition>
<boundary_conditions>
<!-- fixed boundaries -->
<boundary_condition>
<geometrical_set>square_1x1_geometry</geometrical_set>
<geometry>left</geometry>
<type>Dirichlet</type>
<component>0</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<geometrical_set>square_1x1_geometry</geometrical_set>
<geometry>bottom</geometry>
<type>Dirichlet</type>
<component>1</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<geometrical_set>square_1x1_geometry</geometrical_set>
<geometry>top</geometry>
<type>Neumann</type>
<component>1</component>
<parameter>Neumann_force_top</parameter>
</boundary_condition>
</boundary_conditions>
</process_variable>
</process_variables>