Skip to content

Commit

Permalink
Work on Issue #2
Browse files Browse the repository at this point in the history
  • Loading branch information
thelfer committed Apr 1, 2022
1 parent 3caf61e commit 35b2dce
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 5 deletions.
1 change: 1 addition & 0 deletions generic-behaviours/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add_subdirectory(elasticity)
add_subdirectory(heattransfer)
add_subdirectory(damage)
add_subdirectory(hyperelasticity)
Expand Down
15 changes: 15 additions & 0 deletions generic-behaviours/elasticity/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mfront_behaviours_library(Elasticity
WoodOrthotropicElasticity_2022
SEARCH_PATH generic-behaviours/viscoelasticity)

foreach(tn test1)
genericmtest(Elasticity
WoodOrthotropicElasticity_2022_test1
BEHAVIOUR WoodOrthotropicElasticity_2022)
astermtest(Elasticity
WoodOrthotropicElasticity_2022_test1
BEHAVIOUR asterwoodorthotropicelasticity_2022)
castemmtest(Elasticity
WoodOrthotropicElasticity_2022_test1
BEHAVIOUR umatwoodorthotropicelasticity_2022)
endforeach()
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
@DSL DefaultDSL;
@Behaviour OrthotropicElasticity_2022;
@Material Wood;
@Author Riparbelli Lorenzo and Helfer Thomas;
@Date 01/03/22;
@Description{
"This generic behaviour is suitable to describe the "
"elastic behaviour of a wood plate with growth rings "
"that have conical shape in the vertical direction of "
"the tree and which is also subjected to a swelling "
"proportional to the moisture content."
""
"Most solvers allows to define the orthotropic axes "
"in a cylindrical frame but the definition of those "
"axes to describe a plane making angle with respect to "
"the pith of the tree is much more difficult, so this "
"implementation handles the rotation from the cylindrical "
"frame to the material frame."
}

@ModellingHypotheses {Tridimensional};
@OrthotropicBehaviour;
@RequireStiffnessOperator;

@MaterialProperty real phi;
phi.setEntryName("MaterialAngleWithRespectToThePith");

@MaterialProperty real ar;
ar.setEntryName("RadialSwellingCoefficient");
@MaterialProperty real al;
al.setEntryName("LongitudinalSwellingCoefficient");
@MaterialProperty real at;
at.setEntryName("TangentialSwellingCoefficient");

@ExternalStateVariable real w;
w.setEntryName("MoistureContent");

//! stiffness tensor in the global frame
@LocalVariable StiffnessTensor hh;
//! rotation matrix
@LocalVariable tmatrix<3, 3, real> r;

@InitLocalVariables {
constexpr auto zero = real{0};
const auto c = cos(-phi);
const auto s = sin(-phi);
r = tmatrix<3, 3, real>{{c, zero, -s, //
zero, real{1}, zero, //
s, zero, c}};
hh = change_basis(D, r);
}

@PredictionOperator {
static_cast<void>(smt);
Dt = hh;
}

@Integrator{
constexpr auto zero = real{0};
// swelling in the material frame at the end of the time step
const auto el = (w + dw) * Stensor{ar, al, at, zero, zero, zero};
// swelling in the global frame
const auto eg = change_basis(el, r);
// mechanical strain at the end of the time step
const auto em = eto + deto - eg;
// final stress
sig = hh * em;
}

@TangentOperator {
static_cast<void>(smt);
Dt = hh;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@Author Thomas Helfer;
@Date 01/04/2022;

@ModellingHypothesis 'Tridimensional';
@Behaviour<@interface@> @library@ @behaviour@;

// material properties
@MaterialProperty<constant> 'YoungModulus1' 635.;
@MaterialProperty<constant> 'YoungModulus2' 10285;
@MaterialProperty<constant> 'YoungModulus3' 369;
@MaterialProperty<constant> 'PoissonRatio12' 0.029;
@MaterialProperty<constant> 'PoissonRatio23' 0.42;
@MaterialProperty<constant> 'PoissonRatio13' 0.165;
@MaterialProperty<constant> 'ShearModulus12' 786.;
@MaterialProperty<constant> 'ShearModulus23' 838.;
@MaterialProperty<constant> 'ShearModulus13' 114.;
@MaterialProperty<constant> 'RadialSwellingCoefficient' 0.00064;
@MaterialProperty<constant> 'LongitudinalSwellingCoefficient' 0.00013;
@MaterialProperty<constant> 'TangentialSwellingCoefficient' 0.00115;
@MaterialProperty<constant> 'MaterialAngleWithRespectToThePith' 0;

// external state variable
@ExternalStateVariable 'Temperature' 293.15 ;
@ExternalStateVariable 'MoistureContent' {0 : 0, 1 : 1};

@ImposedStress 'SXX' {0 : 0, 1 : 1};

@Times{0, 1};

@Real 'EXX_ref' '2.21480e-03';
@Real 'EYY_ref' '8.43307e-05';
@Real 'EZZ_ref' '8.90157e-04';
@Test<function>{
'EXX' : 'EXX_ref * t',
'EYY' : 'EYY_ref * t',
'EZZ' : 'EZZ_ref * t',
'EXY' : '0',
'EXZ' : '0',
'EYZ' : '0'
} 1e-8;

@Test<function> 'SXX' '1 * t' 1.e-8;
@Test<function> {
'SYY' : '0', 'SZZ' : '0', 'SXY' : '0', 'SXZ' : '0', 'SYZ' : '0'
}
1e-8;
5 changes: 0 additions & 5 deletions materials/Wood/behaviours/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
mfront_behaviours_library(Wood
PoplarOrthotropicGeneralizedMaxwell_2021
SEARCH_PATH generic-behaviours/viscoelasticity)

#genericmtest(Wood
# PoplarOrthotropicGeneralizedMaxwell_2021-RadialTest
# BEHAVIOUR PoplarOrthotropicGeneralizedMaxwell_2021
# REFERENCE_FILE ${CMAKE_SOURCE_DIR}/generic_behaviours/viscoelasticity/references/OrthotropicGeneralizedMaxwellRadialTest.ref)

0 comments on commit 35b2dce

Please sign in to comment.