Skip to content

Commit 7e7791d

Browse files
authored
Merge pull request #928 from thelfer/906-add-second-order-estimate-from-ponte-castaneda-1996
906 add tuto on affine formulation for viscoplastic polycrystal (Masson 2000)
2 parents 8a32c7c + 77234fb commit 7e7791d

26 files changed

+961
-70
lines changed

bindings/python/tfel/material/IsotropicModuli.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,6 @@ void declareIsotropicModuli(pybind11::module_& m) {
9292
declareKGModuli<double>(m, "KGModuli");
9393
declareYoungNuModuli<double>(m, "YoungNuModuli");
9494
declareLambdaMuModuli<double>(m, "LambdaMuModuli");
95+
m.def("computeKGModuli", &tfel::material::computeKGModuli<double>);
96+
m.def("computeIsotropicStiffnessTensor", &tfel::material::computeIsotropicStiffnessTensor<double>);
9597
}

bindings/python/tfel/material/LinearHomogenizationSchemes.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <pybind11/pybind11.h>
1515
#include <pybind11/stl.h>
1616
#include "TFEL/Material/LinearHomogenizationSchemes.hxx"
17+
#include "TFEL/Material/HomogenizationSecondMoments.hxx"
1718

1819
template <tfel::math::ScalarConcept StressType>
1920
requires(tfel::math::checkUnitCompatibility<
@@ -233,4 +234,10 @@ void declareLinearHomogenizationSchemes(pybind11::module_& m) {
233234
return homogenization::elasticity::computeOrientedPCWScheme(
234235
IM, f, IMi, n_a, a, n_b, b, c, D);
235236
});
237+
m.def("computeMeanSquaredEquivalentStrain", &homogenization::elasticity::computeMeanSquaredEquivalentStrain<double>,
238+
pybind11::arg("IsotropicModuli_of_the_matrix"),
239+
pybind11::arg("volume_fraction"),
240+
pybind11::arg("IsotropicModuli_of_the_inclusion"),
241+
pybind11::arg("squared_of_hydrostatic_macro_strain"),
242+
pybind11::arg("squared_of_equivalent_macro_strain"));
236243
}

docs/web/BetaRule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ The implementation requires the integration of the local behaviours.
192192
These are carried out via the `@BehaviourVariable` keyword.
193193
The implementation of the local behaviour is explained [here](./MericCailletaudSingleCrystalPlasticity.html).
194194

195-
All files `MericCailletaudSingleCrystalViscoPlasticity.mfront`, `BetaRule.mfront` and `BetaRule.mtest` can be downloaded [here](./downloads/BetaRule.zip).
195+
All files `MericCailletaudSingleCrystalViscoPlasticity.mfront`, `BetaRule.mfront` and `BetaRule.mtest` are available in the `MFrontGallery` project, [here](https://github.com/thelfer/MFrontGallery/tree/master/generic-behaviours/homogenization/).
196196

197197

198198
For the example, we assume that the composites is made of only 2 phases.

docs/web/BiphasicLinearHomogenization.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ std::array<stress,2> tab_k={k0,ki};
127127
auto mu0=E0/2/(1+nu0);
128128
auto mui=Ei/2/(1+nui);
129129
std::array<stress,2> tab_mu={mu0,mui};
130-
auto pa2=computeIsotropicHashinShtrikmanBounds<3u,2u,stress>(tab_f,tab_k,tab_mu);
130+
auto pa2=computeIsotropicHashinShtrikmanBounds<3u,stress>(tab_f,tab_k,tab_mu);
131131
auto UB=std::get<1>(pa2);
132132
auto kh=std::get<0>(UB);
133-
auto muh=std::get<1>(UB)
134-
kg=KGModuli<stress>(kh,muh);
135-
auto Enu=kg.ToYoungNu();
133+
auto muh=std::get<1>(UB);
134+
kg=tfel::material::KGModuli<stress>(kh,muh);
136135
};
136+
auto Enu=kg.ToYoungNu();
137137
E=Enu.young;
138138
}
139139
~~~~

docs/web/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ pandoc_html(Taylor "--toc" "--toc-depth=2")
9595
pandoc_html(Sachs "--toc" "--toc-depth=1")
9696
pandoc_html(BetaRule "--toc" "--toc-depth=2")
9797
pandoc_html(PonteCastaneda1992 "--toc" "--toc-depth=2")
98+
pandoc_html(MassonAffineFormulation "--toc" "--toc-depth=2")
9899
pandoc_html(Norton-web)
99100
pandoc_html(Norton-full)
100101
pandoc_html(coverity-scan)

docs/web/MassonAffineFormulation.md

Lines changed: 614 additions & 0 deletions
Large diffs are not rendered by default.

docs/web/PonteCastaneda1992.md

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,27 @@ In the variational approach, the homogenization problem is equivalent to a minim
7575

7676
Ponte-Castaneda's idea is to use the dual function $f_r^*$ of $f_r$, under an hypothesis of concavity of $f_r$. Note that $w_r$ is convex relatively to $\tepsilon$, but the hypothesis is: $f_r$ concave relatively to $\epsiloneq^2$, which adds a supplementary restriction to the behaviour.
7777
\begin{aligned}
78-
w_r(\tepsilon)=\underset{\mu_0^r(\tenseur x)}{\min} \left\{\Frac92 k_r\, \varepsilon_m^2+\Frac32 \mu_0^r(\tenseur x)\, \epsiloneq^2-f_r^*(\mu_0^r(\tenseur x))\right\}
78+
w_r(\tepsilon)=\underset{\mu_0^r(\tenseur x)}{\min} \left\{\Frac92 k_r\, \varepsilon_m^2+\Frac32 \mu_0^r(\tenseur x)\, \epsiloneq^2-f_r^*(\dfrac32\mu_0^r(\tenseur x))\right\}
7979
\end{aligned}
8080
where the dual function $f_r^*$ is defined as
8181
\begin{aligned}
82-
f_r^*(\mu_0)=\underset{e}{\min} \left\{\mu_0 e-f_r(e)\right\}
82+
f_r^*(\lambda_0)=\underset{e}{\min} \left\{\lambda_0 e-f_r(e)\right\}
8383
\end{aligned}
8484

8585
Considering uniform per phase shear moduli $\mu_0^r$ (also called the 'secant moduli'), and after a few manipulations, Ponte-Castaneda arrives at the following bound on the effective energy $W^{\mathrm{eff}}(\overline{\tepsilon})$:
8686
\begin{aligned}
87-
W^{\mathrm{eff}}(\overline{\tepsilon})=\underset{\tepsilon\in\mathcal K(\overline{\tepsilon})}{\textrm{min}} \langle w(\tepsilon)\rangle \leq \overline{w}(\overline{\tepsilon})=\underset{\mu_0^r}{\min} \left\{W_0^{\mathrm{eff}}(\overline{\tepsilon})-\sum_r c_r\, f_r^*(\mu_0^r)\right\}
87+
W^{\mathrm{eff}}(\overline{\tepsilon})=\underset{\tepsilon\in\mathcal K(\overline{\tepsilon})}{\textrm{min}} \langle w(\tepsilon)\rangle \leq \overline{w}(\overline{\tepsilon})=\underset{\mu_0^r}{\min} \left\{W_0^{\mathrm{eff}}(\overline{\tepsilon})-\sum_r c_r\, f_r^*(\dfrac32\mu_0^r)\right\}
8888
\end{aligned}
8989
where $c_r$ is the volume fraction of phase $r$ and $W_0^{\mathrm{eff}}(\overline{\tepsilon})$ is the effective energy relative to a 'linear comparison composite' which is heterogeneous, and whose elastic moduli are the $k_r$ and the $\mu_0^r$.
9090

9191
The stationarity conditions associated to the minimization on $\mu_0^r$ are:
9292
\begin{aligned}
93-
\deriv{W_0^{\mathrm{eff}}}{\mu_0^r} = c_r\,\deriv{f_r^*}{\mu_0^r}
93+
\deriv{W_0^{\mathrm{eff}}}{\mu_0^r} = \dfrac{3c_r}{2}\,\left(f_r^*\right)'(\dfrac32 \mu_0^r)
9494
\end{aligned}
9595

9696
which can be shown to be equivalent to
9797
\begin{aligned}
98-
\mu_0^r= \Frac23 \deriv{f_r}{e}\left(\langle \epsiloneq^2\rangle_r\right)
98+
\mu_0^r= \Frac23 f_r'\left(\langle \epsiloneq^2\rangle_r\right)
9999
\end{aligned}
100100
where $\epsiloneq$ is relative to $\tepsilon$ solution of the homogenization problem:
101101
\begin{aligned}
@@ -111,34 +111,55 @@ which can be shown to be equivalent to
111111
\langle \epsiloneq^2\rangle_r= \Frac{2}{3c_r}\deriv{W_0^{\mathrm{eff}}}{\mu_0^r}
112112
\end{aligned}
113113

114-
## Summary
115-
116-
The resolution hence consists in
117-
\[
118-
\text{Find}\,e^r=\langle \epsiloneq^2\rangle_r\,\text{such that}\quad\langle \epsiloneq^2\rangle_r= \Frac{2}{3c_r}\deriv{W_0^{\mathrm{eff}}}{\mu_0^r}
119-
\]
120-
where \(W_0^{\mathrm{eff}}\) is the effective energy of a linear comparison composite whose elastic moduli are \(k_r\) annd \(\mu_0^r\) such that:
121-
\[
122-
\mu_0^r= \Frac23\deriv{f_r}{e}\left(\langle \epsiloneq^2\rangle_r\right).
123-
\]
124-
125114
## Macroscopic stress and tangent operator
126115

127116
The macroscopic stress $\overline{\tsigma}$ is also shown to be (see [@ponte_castaneda_nonlinear_1998], eq. (4.41)):
128117
\begin{aligned}
129-
\tsigma=\deriv{\overline{w}}{\overline{\tepsilon}}=\deriv{W_0^{\mathrm{eff}}}{\overline{\tepsilon}}=\tenseurq C_0^{\mathrm{eff}}\dbldot\overline{\tepsilon}
118+
\overline{\tsigma}=\deriv{\overline{w}}{\overline{\tepsilon}}=\deriv{W_0^{\mathrm{eff}}}{\overline{\tepsilon}}=\tenseurq C_0^{\mathrm{eff}}\dbldot\overline{\tepsilon}
130119
\end{aligned}
131120
where $\tenseurq C_0^{\mathrm{eff}}$ is the effective elasticity of the linear comparison composite. In our case, we use Hashin-Shtrikman bounds.
132121

133122
The tangent operator is given by
134123
\begin{aligned}
135-
\dfrac{\mathrm{d}\tsigma}{\mathrm{d}\overline{\tepsilon}}=\tenseurq C_0^{\mathrm{eff}}+\dfrac{\mathrm{d}\tenseurq C_0^{\mathrm{eff}}}{\mathrm{d}\overline{\tepsilon}}
124+
\dfrac{\mathrm{d}\overline{\tsigma}}{\mathrm{d}\overline{\tepsilon}}=\tenseurq C_0^{\mathrm{eff}}+\dfrac{\mathrm{d}\tenseurq C_0^{\mathrm{eff}}}{\mathrm{d}\overline{\tepsilon}}
136125
\end{aligned}
137126
Here, the derivative of $\tenseurq C_0^{\mathrm{eff}}$ w.r.t. $\overline{\tepsilon}$ can be computed by derivating the Hashin-Shtrikman
138127
moduli w.r.t. the secant moduli $\mu_0^r$ and the derivatives of these moduli w.r.t. $\overline{\tepsilon}$. However, it is tedious and in the implementation, we see that the convergence of the Newton Raphson algorithm is good if we only retain the first term \(\tenseurq C_0^{\mathrm{eff}}\) in the tangent operator.
128+
129+
130+
## Summary and possible implementations
131+
132+
The resolution hence consists in
133+
\[
134+
\text{Find}\,e^r=\langle \epsiloneq^2\rangle_r\,\text{such that}\quad\langle \epsiloneq^2\rangle_r= \Frac{2}{3c_r}\deriv{W_0^{\mathrm{eff}}}{\mu_0^r}
135+
\]
136+
where \(W_0^{\mathrm{eff}}\) is the effective energy of a linear comparison composite whose elastic moduli are \(k_r\) annd \(\mu_0^r\) such that:
137+
\[
138+
\mu_0^r= \Frac23\deriv{f_r}{e}\left(\langle \epsiloneq^2\rangle_r\right).
139+
\]
140+
141+
### Possible implementations
142+
143+
The iterative resolution of the non-linear equation can be summarized as
144+
\[
145+
\underset{\substack{\\ \\ \\ \Downarrow\\ \\ \\\text{analytic / finite difference}\\ \\ \\\text{\texttt{@BehaviourVariable} / directly provided}}}{\mu_0^r= \Frac23\deriv{f_r}{e}\left(\langle \epsiloneq^2\rangle_r\right)}\quad\rightarrow\quad \underset{\substack{\\ \\ \\ \Downarrow\\ \\ \\\text{mean-field scheme / morphological tensors}\\ \\ \\\texttt{tfel::material::homogenization}}}{W_0^{\mathrm{eff}}\left(\mu_0^r\right)= \dfrac12\overline{\tepsilon}\dbldot\tenseurq C_0^{\mathrm{eff}}\dbldot\overline{\tepsilon}}\quad\rightarrow\quad\underset{\substack{\\ \\ \\ \Downarrow\\ \\ \\\text{analytic / finite difference}\\ \\ \\\texttt{tfel::material::homogenization}}}{\langle \epsiloneq^2\rangle_r= \Frac{2}{3c_r}\deriv{W_0^{\mathrm{eff}}}{\mu_0^r}}
146+
\]
147+
148+
And the macroscopic stress must also be computed:
149+
\[
150+
\overline{\tsigma}=\tenseurq C_0^{\mathrm{eff}}\dbldot\overline{\tepsilon}
151+
\]
152+
153+
The first step of the resolution consists in computing the secant modulus $\mu_0^r$ and it can be done analytically (as below) or via finite difference or automatic differentiation. Moreover, for both strategies, we could use a `BehaviourVariable`, defining the function $f_r$ in an external file (in our example, the function is to simple to do that).
154+
155+
The second step consists in computing the effective energy $W_0^{\mathrm{eff}}$. This will be done via `tfel::material::homogenization`. This `namespace` provides classical mean-field schemes (we use a Hashin-Shtrikman bound in our example below). This could also be done with interaction tensors, providing externally. In another [tutorial](./MassonAffineFormulation.html) we show that we can take into account more specifically the morphology of a polycrystal by providing interaction tensors.
156+
157+
The third step consists in the computation of the second-moments. This is also done via `tfel::material::homogenization`. Here again, there are two strategies: analytical computation when possible, and finite difference or automatic differentiation when the analytical derivation is too tedious or even impossible. In our example below, the computation is analytic.
139158

140159
# Implementation in MFront
141160

161+
## Example used for the implementation
162+
142163
In the application of the implementation, we take the example of the following behaviour:
143164
\begin{aligned}
144165
w_r(\tepsilon)=\dfrac{9}{2}k_r\,\varepsilon_{m}^2+\dfrac{\sigma_r^0}{n+1}\,\varepsilon_{eq}^{n+1}
@@ -161,7 +182,7 @@ which means that we only need the derivative of the Hashin-Shtrikman bound. This
161182

162183
## Details of implementation
163184

164-
All the files are available [here](./downloads/PonteCastaneda1992.zip)
185+
The file `PonteCastaneda1992.mfront` is available in the `MFrontGallery` project, [here](https://github.com/thelfer/MFrontGallery/tree/master/generic-behaviours/homogenization/).
165186

166187
For the jacobian, we adopt the `Numerical Jacobian`, which
167188
means that the beginning of the `mfront` file reads:
@@ -171,7 +192,7 @@ means that the beginning of the `mfront` file reads:
171192
@Behaviour PC_VB_92;
172193
@Author Martin Antoine;
173194
@Date 12 / 12 / 25;
174-
@Description{"Ponte Castaneda second-order estimates for homogenization of non-linear elasticity (one potential), based on second-moments computation"};
195+
@Description{"Ponte Castaneda variational bounds for homogenization of non-linear elasticity (one potential), based on second-moments computation"};
175196
@UseQt true;
176197
@Algorithm NewtonRaphson_NumericalJacobian;
177198
@PerturbationValueForNumericalJacobianComputation 1e-10;
@@ -214,8 +235,9 @@ The second moment is given by the function `computeMeanSquaredEquivalentStrain`
214235
215236
~~~~ {#Integrator .cpp .numberLines}
216237
//second moments/////////////////////////////////
217-
const auto em2 = tfel::math::trace(eto+deto)/3.;
238+
const auto em = tfel::math::trace(eto+deto)/3.;
218239
const auto ed = tfel::math::deviator(eto+deto);
240+
const auto em2 = em*em;
219241
const auto eeq2 = 2./3.*(ed|ed);
220242
using namespace tfel::material;
221243
const auto kg0 = KGModuli<stress>(k_m,mu0);

docs/web/Sachs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ The jacobian matrix is:
9494

9595
# Implementation in MFront
9696

97+
The files `Plasticity.mfront` and `Sachs.mfront` are available in the `MFrontGallery` project, [here](https://github.com/thelfer/MFrontGallery/tree/master/generic-behaviours/homogenization/).
98+
9799
As for Taylor's scheme, we will use `BehaviourVariable`
98100
for the integration of local behaviours.
99101
The integration of global behavior, which requires solving a non-linear equation,

docs/web/Taylor.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ The macroscopic tangent operator is given by
5151

5252
# Implementation in MFront
5353

54+
The files `Plasticity.mfront` and `Taylor.mfront` are available in the `MFrontGallery` project, [here](https://github.com/thelfer/MFrontGallery/tree/master/generic-behaviours/homogenization/).
55+
5456
It is possible to implement this homogenization scheme through a `Behaviour`.
5557
This `Behaviour` must call the behaviour laws of each phase.
5658
So, an interesting solution is to use a `BehaviourVariable`.

0 commit comments

Comments
 (0)