import numpy as np
from echoes import *
import math
np.set_printoptions(precision=8, suppress=True)11 Representative Volume Element
Construction of a rve
In Echoes a rve object inherits from the Python dict (dictionary) with string keys and phase values. A phase is either an ellipsoid (see Section 7.2), a sphere_nlayers (see Section 8.2), or a crack (see Chapter 9).
A rve is defined with optional keyword-arguments:
myrve = rve(matrix=phasename, prop={"C": C, ...})
where phasename is a string referring to the name of one of the phases and the prop argument is a dictionary of tensors indexed by property names. The matrix keyword designates:
- the phase playing the role of the matrix in matrix/inclusion schemes (e.g. Mori-Tanaka),
- the phase used to initialize the fixed-point algorithm in the self-consistent scheme (unless
propis provided, in which case that property is used as initial value).
Defining phases
The rve is completed by defining phases:
myrve["PHASE1"] = ellipsoid(shape=..., prop=..., fraction=f1, symmetrize=[ISO])
myrve["PHASE2"] = ellipsoid(shape=..., prop=..., fraction=f2)
myrve["PHASE3"] = sphere_nlayers(..., fraction=f3)
myrve["CRACK"] = crack(shape=spheroidal(ω), density=ε, prop={"C": tZ4})
NoteNotes
- If the
matrixkeyword was not used in the definition of therve, the first phase plays the role of the matrix by default if necessary. - The
fractionkeyword denotes the volume fraction within therve. The sum of all fractions should be equal to 1. If it is not the case, the volume fraction of the matrix is adjusted. - The
symmetrize=[ISO]argument “isotropifies” the directions of the ellipsoid: although the ellipsoid is defined with a specified direction, the phase is considered to represent an isotropic distribution of orientations. This argument should be used only if the reference medium of the homogenization scheme is itself isotropic. - For
crackphases thefractionkeyword is not used. Instead, the Budiansky–O’Connell crack density \(\varepsilon = n\,a^3\) (see Chapter 9) is set via thedensitykeyword. The volume fraction of a crack family vanishes as the aspect ratio \(\omega \to 0\), so density is the relevant parameter.
Modifying phases
Each phase can be modified after construction:
myrve["PHASE1"].fraction = ...
myrve["PHASE1"].shape = ...
myrve["PHASE1"].set_prop("C", C)
myrve["PHASE1"].symmetrize(ISO)
myrve["PHASE1"].set_param_eshelby(algo=NUMINT, epsroots=1.e-4,
epsabs=1.e-4, epsrel=1.e-4, maxnb=100000)
TipTip
set_param_eshelby can also be applied at the level of the rve: myrve.set_param_eshelby(...). In this case the parameters apply to all ellipsoidal phases.
\(\,\)