-
Notifications
You must be signed in to change notification settings - Fork 13
added PC92 #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
thelfer
merged 2 commits into
master
from
67-mfront---add-test-for-ponte-castaneda-1992-homogenization-scheme
Jan 14, 2026
Merged
added PC92 #69
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| mfront_behaviours_library(Homogenization | ||
| PonteCastaneda1992 | ||
| ) | ||
|
|
||
| genericmtest(Homogenization PonteCastaneda1992 | ||
| BEHAVIOUR PonteCastaneda1992 | ||
| REFERENCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/references/PonteCastaneda1992.ref) |
86 changes: 86 additions & 0 deletions
86
generic-behaviours/homogenization/PonteCastaneda1992.mfront
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| @DSL ImplicitII; | ||
| @Behaviour PonteCastaneda1992; | ||
| @Author Martin Antoine; | ||
| @Date 12 / 12 / 25; | ||
| @Description{"Ponte Castaneda second-order estimates for homogenization of non-linear elasticity (one potential), based on second-moments computation"}; | ||
| @UseQt true; | ||
| @Algorithm NewtonRaphson_NumericalJacobian; | ||
| @PerturbationValueForNumericalJacobianComputation 1e-10; | ||
| @Epsilon 1e-12; | ||
|
|
||
| @TFELLibraries {"Material"}; | ||
| @Includes{ | ||
| #include "TFEL/Material/IsotropicModuli.hxx" | ||
| #include "TFEL/Material/HomogenizationSecondMoments.hxx" | ||
| #include "TFEL/Material/LinearHomogenizationBounds.hxx" | ||
| } | ||
|
|
||
| @MaterialProperty stress sig0; | ||
| sig0.setEntryName("sig0"); | ||
| @MaterialProperty real n_; | ||
| n_.setEntryName("n_"); | ||
| @MaterialProperty stress k_m; | ||
| k_m.setEntryName("k_m"); | ||
| @MaterialProperty stress kar; | ||
| kar.setEntryName("kar"); | ||
| @MaterialProperty stress mur; | ||
| mur.setEntryName("mur"); | ||
| @MaterialProperty real fr; | ||
| fr.setEntryName("fr"); | ||
|
|
||
| @ModellingHypothesis Tridimensional; | ||
| @PhysicalBounds T in [0. : *[; | ||
|
|
||
| @StateVariable real e_0; | ||
| e_0.setEntryName("MatrixSquaredEquivalentStrain"); | ||
| @StateVariable real e_r; | ||
| e_r.setEntryName("InclusionSquaredEquivalentStrain"); | ||
|
|
||
| @LocalVariable StiffnessTensor Chom; | ||
| @LocalVariable Stensor4 I; | ||
| @LocalVariable Stensor4 J; | ||
| @LocalVariable Stensor4 K; | ||
|
|
||
| @InitLocalVariables{ | ||
| I=tfel::math::st2tost2<3u,real>::Id(); | ||
| J=tfel::math::st2tost2<3u,real>::J(); | ||
| K=tfel::math::st2tost2<3u,real>::K(); | ||
| } | ||
|
|
||
| @Integrator { | ||
| //secant modulus///////////////////////////////// | ||
| const auto po = std::pow(max(e_0+de_0,real(1e-10)),0.5*(n_-1)); | ||
| const auto mu0 = sig0/3.*po; | ||
|
|
||
| //second moments///////////////////////////////// | ||
| const auto em2 = tfel::math::trace(eto+deto)/3.; | ||
| const auto ed = tfel::math::deviator(eto+deto); | ||
| const auto eeq2 = 2./3.*(ed|ed); | ||
| using namespace tfel::material; | ||
| const auto kg0 = KGModuli<stress>(k_m,mu0); | ||
| const auto kgr = KGModuli<stress>(kar,mur); | ||
| using namespace tfel::material::homogenization::elasticity; | ||
| const auto eeq2_ = computeMeanSquaredEquivalentStrain(kg0,fr,kgr,em2,eeq2); | ||
| const auto eeq20=std::get<0>(eeq2_); | ||
| const auto eeq2r=std::get<1>(eeq2_); | ||
|
|
||
| //residues///////////////////////////////////// | ||
| fe_0 = e_0+de_0 - eeq20; | ||
| fe_r = e_r+de_r - eeq2r; | ||
|
|
||
| //sigma////////////////////////////////////// | ||
| vector<real> tab_f={1-fr,fr}; | ||
| vector<stress> tab_k = {k_m,kar}; | ||
| vector<stress> tab_mu = {mu0,mur}; | ||
| const auto HSB=computeIsotropicHashinShtrikmanBounds<3,stress>(tab_f,tab_k,tab_mu); | ||
| const auto LB=std::get<0>(HSB); | ||
| const auto kHS=std::get<0>(LB); | ||
| const auto muHS=std::get<1>(LB); | ||
| Chom=3*kHS*J+2*muHS*K; | ||
| sig = Chom*(eto+deto); | ||
| } | ||
|
|
||
|
|
||
| @TangentOperator{ | ||
| Dt=Chom; | ||
| } |
28 changes: 28 additions & 0 deletions
28
generic-behaviours/homogenization/PonteCastaneda1992.mtest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| @ModellingHypothesis 'Tridimensional'; | ||
| @Behaviour<@interface@> @library@ @behaviour@; | ||
|
|
||
| @ExternalStateVariable 'Temperature' {0 : 1000,1:1000}; | ||
|
|
||
| @MaterialProperty<constant> 'sig0' 1.e9; | ||
| @MaterialProperty<constant> 'n_' 0.05; | ||
| @MaterialProperty<constant> 'k_m' 1.e9; | ||
| @MaterialProperty<constant> 'kar' 1.e15; | ||
| @MaterialProperty<constant> 'mur' 1.e15; | ||
| @MaterialProperty<constant> 'fr' 0.25; | ||
|
|
||
| @ImposedStrain 'EXX' {0 : 0, 100 : 0.8660254}; | ||
| @ImposedStrain 'EYY' {0 : 0, 100 : -0.8660254}; | ||
| @ImposedStrain 'EZZ' {0 : 0, 100 : 0}; | ||
| @ImposedStrain 'EXY' {0 : 0, 100 : 0}; | ||
| @ImposedStrain 'EXZ' {0 : 0, 100 : 0}; | ||
| @ImposedStrain 'EYZ' {0 : 0, 100 : 0}; | ||
| @Times {0.,10 in 300}; | ||
|
|
||
| @Test<file> @reference_file@ 'EXX' 2 1.e-7; | ||
| @Test<file> @reference_file@ 'EYY' 3 1.e-7; | ||
| @Test<file> @reference_file@ 'SXX' 8 1e3; | ||
| @Test<file> @reference_file@ 'SYY' 9 1e3; | ||
|
|
||
|
|
||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.