Material parameters
Wrapper for material parameters
Region
This class is a wrapper for material parameters. It is used to set all material parameters of a given region at once.
- class genepy.Region(region: int, density: MaterialConstants = None, viscosity: MaterialConstants = None, plasticity: MaterialConstants = None, softening: MaterialConstants = None, energy: MaterialConstants = None)
- class Region(region: int, density: MaterialConstants = None, viscosity: MaterialConstants = None, plasticity: MaterialConstants = None, softening: MaterialConstants = None, energy: MaterialConstants = None)
Class to define the material parameters of a region of the model. The region number is enforced for all material parameters.
- Parameters:
region (int) – Region number to which the material parameters are applied.
density (MaterialConstants) – instance of Density class of the region.
viscosity (MaterialConstants) – instance of Viscosity class of the region.
plasticity (MaterialConstants) – instance of Plasticity class of the region.
softening (MaterialConstants) – instance of Softening class of the region.
energy (MaterialConstants) – instance of Energy class of the region.
Note
If the user does not provide any material parameter, the default values are set to:
Constant Density: 3300 kg/m3Constant Viscosity: 1022 Pa.s
Example
Default values for all material parameters
>>> import genepy as gp >>> region = gp.Region(1)
Custom values for material parameters
import genepy as gp region1 = gp.Region(1, # region tag gp.DensityBoussinesq(2700.0,3.0e-5,1.0e-11), # density gp.ViscosityArrhenius2("Quartzite"), # viscosity (values from the database using rock name) gp.SofteningLinear(0.0,0.5), # softening gp.PlasticDruckerPrager(), # plasticity (default values, can be modified using the corresponding parameters) gp.Energy(gp.EnergySource(EnergySourceConstant(1.0e-6)), # energy heat source 2.7)) # energy conductivity
- sprint_option(self)
- Returns:
String containing all the options for all material parameters of the given region.
- Return type:
str
Model regions
- class genepy.ModelRegions(regions: list[MaterialConstants], mesh_file: str = 'path_to_file', region_file: str = 'path_to_file', model_name: str = 'model_GENE3D')
- class ModelRegions(regions: list[Region], mesh_file: str = 'path_to_file', region_file: str = 'path_to_file', model_name: str = 'model_GENE3D')
Class to define the material parameters of a model. The user can provide a list of instances of class
Regionwith their material parameters. The model name is enforced for all material parameters.
- add_region(self, region: Region)
Adds a region to the list of regions after the instance of the class has been created.
- Parameters:
region (Region) – Instance of class py:class:Region with its material parameters.
- sprint_option(self)
- Returns:
String containing all the options for all regions of the model.
- Return type:
str
Parent class for all material parameters.
- class genepy.MaterialConstants(model_name: str = 'model_GENE3D', region: int = 0)
- class MaterialConstants(model_name: str = 'model_GENE3D', region: int = 0)
Abstract class to generate the options for a given type and region. All the material parameters classes inherit from this class and use its
MaterialConstants.sprint_option()method to generate the options for the given material parameter. Thus, the classes attributes must be named as the options of the material parameter. If an instance class attribute is not an option of the material parameter, it must be excluded from theMaterialConstants.sprint_option()method.- Parameters:
model_name (str) – Name of the model, default is “model_GENE3D”
region (int) – Region number, default is 0.
Note
Except if the
MaterialConstantsclass (or one of its children) is used outside of the context of theRegionsclass, the name of the model and the region should not be defined when calling the class.Attributes
- model_name: str
Name of the model, default is “model_GENE3D”
- region: int
Region number, default is 0
Methods
- sprint_option(self)
Return the options of the material parameter as a string. The option generation is automatised based on the attributes of the class (and its children).
- Returns:
The options of the material parameter as a string.
- Return type:
str
Density
Constant density
- class genepy.DensityConstant(density: float, model_name: str = 'model_GENE3D', region: int = 0)
- class DensityConstant(density: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply a constant density to a region of the model.
- Parameters:
density (float) – Constant density value in kg.m-3 to be applied to the region.
model_name (str) – Name of the model to which the density is applied. Default is
"model_GENE3D".region (int) – Region number to which the density is applied. Default is 0.
Note
- The density is given by:
\(\rho(p,T) = \rho_0\)
Attributes
- density: float
Constant density value (\(\rho_0\)) in kg.m-3 to be applied to the region.
- model_name: str
Name of the model to which the density is applied. Default is “model_GENE3D”
- region: int
Region number to which the density is applied. Default is 0.
Boussinesq approximation
- class genepy.DensityBoussinesq(density: float, thermal_expansion: float = 0.0, compressibility: float = 0.0, model_name: str = 'model_GENE3D', region: int = 0)
- class DensityBoussinesq(density: float, thermal_expansion: float = 0.0, compressibility: float = 0.0, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply a density using the Boussinesq approximation to a region of the model.
- Parameters:
density (float) – Reference density value in kg.m-3 (\(\rho_0\)).
thermal_expansion (float) – Thermal expansion coefficient in K-1 (\(\alpha\)).
compressibility (float) – Compressibility coefficient in Pa-1 (\(\beta\)).
model_name (str) – Name of the model to which the density is applied. Default is “model_GENE3D”.
region (int) – Region number to which the density is applied. Default is 0.
Note
- The density is given by:
\(\rho(p,T) = \rho_0 (1 - \alpha T + \beta p)\)
Attributes
- density: float
Reference density value in kg.m-3 (\(\rho_0\)).
- thermal_expansion: float
Thermal expansion coefficient in K-1 (\(\alpha\)).
- compressibility: float
Compressibility coefficient in Pa-1 (\(\beta\)).
- model_name: str
Name of the model to which the density is applied. Default is “model_GENE3D”
- region: int
Region number to which the density is applied. Default is 0.
Thermodynamic table
- class genepy.DensityTable(density: float, map: str, model_name: str = 'model_GENE3D', region: int = 0)
- class DensityTable(density: float, map: str, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply a density read from a thermodynamic table to a region of the model.
- Parameters:
density (float) – Density value in kg.m-3 in case the map does not contain the \(p,T\) conditions.
map (str) – Name of the file containing the density map.
model_name (str) – Name of the model to which the density is applied. Default is “model_GENE3D”.
region (int) – Region number to which the density is applied. Default is 0.
Attributes
- density: float
Density value in kg.m-3 in case the map does not contain the \(p,T\) conditions.
- map: str
Name of the file containing the density map.
- model_name: str
Name of the model to which the density is applied. Default is “model_GENE3D”
- region: int
Region number to which the density is applied. Default is 0.
Viscosity
Constant viscosity
- class genepy.ViscosityConstant(viscosity: float, model_name: str = 'model_GENE3D', region: int = 0)
- class ViscosityConstant(viscosity: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply a constant viscosity to a region of the model.
- Parameters:
viscosity (float) – Constant viscosity value in Pa.s to be applied to the region.
model_name (str) – Name of the model to which the viscosity is applied. Default is “model_GENE3D”.
region (int) – Region number to which the viscosity is applied. Default is 0.
Note
- The viscosity is given by:
\(\eta = \eta_0\)
Attributes
- viscosity: float
Constant viscosity value (\(\eta_0\)) in Pa.s to be applied to the region.
- model_name: str
Name of the model to which the viscosity is applied. Default is “model_GENE3D”
- region: int
Region number to which the viscosity is applied. Default is 0.
Frank-Kamenetskii viscosity
- class genepy.ViscosityFrankK(eta0: float, exponent: float, model_name: str = 'model_GENE3D', region: int = 0)
- class ViscosityFrankK(eta0: float, exponent: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply a Frank-Kamenetskii viscosity to a region of the model.
- Parameters:
eta0 (float) – Viscosity value at the reference temperature (\(\eta_0\)) in Pa.s.
exponent (float) – Exponent of the viscosity law (\(\theta\)).
model_name (str) – Name of the model to which the viscosity is applied. Default is “model_GENE3D”.
region (int) – Region number to which the viscosity is applied. Default is 0.
Note
- The viscosity is given by:
\(\eta(T) = \eta_0 \exp(-\theta T)\)
Attributes
- eta0: float
Viscosity value at the reference temperature (\(\eta_0\)) in Pa.s.
- exponent: float
Exponent of the viscosity law (\(\theta\)).
- model_name: str
Name of the model to which the viscosity is applied. Default is “model_GENE3D”
- region: int
Region number to which the viscosity is applied. Default is 0.
Depth-dependent viscosity
- class genepy.ViscosityZ(eta0: float, zeta: float, zref: float, model_name: str = 'model_GENE3D', region: int = 0)
- class ViscosityZ(eta0: float, zeta: float, zref: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply a depth dependant viscosity to a region of the model.
- Parameters:
eta0 (float) – Viscosity value at the reference depth (\(\eta_0\)) in Pa.s.
zeta (float) – Depth scale (\(y_{\eta}\)) in m.
zref (float) – Reference depth (\(y_{\text{ref}}\)) in m.
model_name (str) – Name of the model to which the viscosity is applied. Default is “model_GENE3D”.
region (int) – Region number to which the viscosity is applied. Default is 0.
Note
- The viscosity is given by:
\(\eta(y) = \eta_0 \exp \left(- \frac{(y_{\text{ref}} - y)}{y_{\eta}} \right)\)
Attributes
- eta0: float
Viscosity value at the reference depth (\(\eta_0\)) in \(\text{Pa.s}\).
- zeta: float
Depth scale (\(y_{\eta}\)) in \(\text{m}\).
- zref: float
Reference depth (\(y_{\text{ref}}\)) in \(\text{m}\).
- model_name: str
Name of the model to which the viscosity is applied. Default is “model_GENE3D”
- region: int
Region number to which the viscosity is applied. Default is 0.
Arrhenius viscosity
Pre-existing flow laws parameters can be found in genepy/material_parameters/arrhenius_flow_laws.json.
- class genepy.ViscosityArrhenius(rock_name: str, Vmol: float = 0.0, Tref: float = 273.15, model_name: str = 'model_GENE3D', region: int = 0, **kwargs)
- class ViscosityArrhenius(rock_name: str, Vmol: float = 0.0, Tref: float = 273.15, model_name: str = 'model_GENE3D', region: int = 0, **kwargs)
Class to apply an Arrhenius viscosity to a region of the model. For simplicity and to avoid potential errors, a database of standard rocks arrhenius flow laws is provided in the file arrhenius_flow_law.json. The file is loaded by the
ViscosityArrheniusclass (and its children) and the available rocks are stored in the class attributeViscosityArrhenius.__rocks__. The dictionnary containing the rocks can be accessed with the class methodViscosityArrhenius.arrhenius_flow_laws().- Parameters:
rock_name (str) – Name of the rock to retrieve the Arrhenius flow law parameters.
Vmol (float) – Molar volume of the rock in m3.mol-1 . Default is 0.0.
Tref (float) – Reference value to convert the temperature from Celsius to Kelvin. Default is 273.15.
model_name (str) – Name of the model to which the viscosity is applied. Default is “model_GENE3D”.
region (int) – Region number to which the viscosity is applied. Default is 0.
kwargs – Additional arguments to erase parameters from the database if the rock is available or to provide the parameters if the rock is not in the database.
Note
- The viscosity is given by:
\(\eta(\mathbf u, p, T) = \frac{1}{4} \varepsilon^{(\frac{1}{n} - 1)} \left(\frac{3}{4} A \right)^{-\frac{1}{n}} \exp \left( \frac{E + p V}{n R T} \right)\)
with \(\varepsilon\) the strain rate norm, \(A\) the preexpA parameter, \(E\) the entalpy, \(n\) the nexp parameter, \(V\) the molar volume, \(R\) the gas constant and \(T\) the temperature.
Attributes
- preexpA: float
Pre-exponential factor (\(A\)) in Pa-n.s-1.
- Ascale: float
Scaling factor for the viscosity. Should be \(10^6\) if \(A\) is given in MPa-n.s-1 and \(1\) if \(A\) is given in Pa-n.s-1.
- entalpy: float
Activation energy (\(E\)) in J.mol-1.
- Vmol: float
Molar volume of the rock in m3.mol-1.
- nexp: float
Exponent of the viscosity law (\(n\)).
- Tref: float
Reference value to convert the temperature from Celsius to Kelvin. Default is 273.15.
- model_name: str
Name of the model to which the viscosity is applied. Default is “model_GENE3D”
- region: int
Region number to which the viscosity is applied. Default is 0.
- classmethod arrhenius_flow_laws(cls)
Return the dictionnary of standard rocks arrhenius flow laws. The dictionnary is loaded from the file arrhenius_flow_laws.json. The file is loaded by the
ViscosityArrheniusclass (and its children) and the available rocks are stored in the class attributeViscosityArrhenius.__rocks__.- Returns:
The dictionnary of standard rocks arrhenius flow laws.
- Return type:
dict
- class genepy.ViscosityArrhenius2(rock_name: str, Vmol: float = 0.0, Tref: float = 273.15, model_name: str = 'model_GENE3D', region: int = 0, **kwargs)
- class ViscosityArrhenius2(rock_name: str, Vmol: float = 0.0, Tref: float = 273.15, model_name: str = 'model_GENE3D', region: int = 0, **kwargs)
Class to apply an Arrhenius viscosity to a region of the model.
Note
- This class is similar to the
ViscosityArrheniusclass but the viscosity is given by: \(\eta(\mathbf u, p, T) = \varepsilon^{(\frac{1}{n} - 1)} A^{-\frac{1}{n}} \exp \left( \frac{E + p V}{n R T} \right)\)
- This class is similar to the
- class genepy.ViscosityArrheniusDislDiff(rock_name: str, preexpA_diff: float, Ascale_diff: float, entalpy_diff: float, Vmol_diff: float, pexp_diff: float, gsize: float, Vmol_disl: float = 0.0, Tref: float = 273.15, model_name: str = 'model_GENE3D', region: int = 0, **kwargs)
- class ViscosityArrheniusDislDiff(rock_name: str, preexpA_diff: float, Ascale_diff: float, entalpy_diff: float, Vmol_diff: float, pexp_diff: float, gsize: float, Vmol_disl: float = 0.0, Tref: float = 273.15, model_name: str = 'model_GENE3D', region: int = 0, **kwargs)
Class to apply a dislocation-diffusion viscosity to a region of the model.
- Parameters:
rock_name (str) – Name of the rock to retrieve the dislocation flow law parameters.
preexpA_diff (float) – Pre-exponential factor for the diffusion flow law in Pa.s-1.
Ascale_diff (float) – Scaling factor for the diffusion viscosity. Should be \(10^6\) if \(A\) is given in MPa.s-1 and \(1\) if \(A\) is given in Pa.s-1.
entalpy_diff (float) – Activation energy for the diffusion flow law in J.mol-1.
Vmol_diff (float) – Molar volume of the diffusion in m3.mol-1.
pexp_diff (float) – Grain size exponent of the diffusion flow law.
gsize (float) – Grain size in m.
Vmol_disl (float) – Molar volume of the dislocation flow law in m3.mol-1. Default is 0.0.
Tref (float) – Reference value to convert the temperature from Celsius to Kelvin. Default is 273.15.
model_name (str) – Name of the model to which the viscosity is applied. Default is “model_GENE3D”.
region (int) – Region number to which the viscosity is applied. Default is 0.
kwargs – Additional arguments to erase parameters from the database if the rock is available or to provide the parameters if the rock is not in the database.
Note
The viscosity is given by:
\[\begin{split}\eta_{\text{disl}}(\mathbf u, p, T) &= \eta(\mathbf u, p, T) = \varepsilon^{(\frac{1}{n} - 1)} A^{-\frac{1}{n}} \exp \left( \frac{E + p V}{n R T} \right) \\ \eta_{\text{diff}}(p,T) &= A \exp \left( \frac{E + p V}{R T} \right) g^{p} \\ \eta &= \left( \frac{1}{\eta_{\text{disl}} + \frac{1}{\eta_{\text{diff}}}} \right)^{-1}\end{split}\]Attributes
- preexpA_diff: float
Pre-exponential factor for the diffusion flow law in Pa.s-1.
- Ascale_diff: float
Scaling factor for the diffusion viscosity. Should be \(10^6\) if \(A\) is given in MPa.s-1 and \(1\) if \(A\) is given in Pa.s-1.
- entalpy_diff: float
Activation energy for the diffusion flow law in J.mol-1.
- Vmol_diff
Molar volume of the diffusion in m3.mol-1.
- pexp_diff: float
Grain size exponent of the diffusion flow law.
- gsize: float
Grain size in m.
- preexpA_disl: float
Pre-exponential factor for the dislocation flow law in Pa.s-1.
- Ascale_disl: float
Scaling factor for the dislocation viscosity. Should be \(10^6\) if \(A\) is given in MPa.s-1 and \(1\) if \(A\) is given in Pa.s-1.
- entalpy_disl: float
Activation energy for the dislocation flow law in J.mol-1.
- Vmol_disl: float
Molar volume of the dislocation in m3.mol-1.
- nexp_disl: float
Exponent of the dislocation viscosity law (\(n\)).
- Tref: float
Reference value to convert the temperature from Celsius to Kelvin. Default is 273.15.
- model_name: str
Name of the model to which the viscosity is applied. Default is “model_GENE3D”
- region: int
Region number to which the viscosity is applied. Default is 0.
Pasticity
No plasticity
- class genepy.PlasticNone(model_name: str = 'model_GENE3D', region: int = 0)
- class PlasticNone(model_name: str = 'model_GENE3D', region: int = 0)
Class to apply no plasticity to a region of the model. The given region will not have any plastic behavior.
- Parameters:
model_name (str) – Name of the model to which the plasticity is applied. Default is “model_GENE3D”.
region (int) – Region number to which the plasticity is applied. Default is 0.
Attributes
- model_name: str
Name of the model to which the plasticity is applied. Default is “model_GENE3D”
- region: int
Region number to which the plasticity is applied. Default is 0
VonMises plasticity
- class genepy.PlasticMises(yield_stress: float = 50000000.0, yield_stress_inf: float = 5000000.0, healing_rate: float = 0.0, model_name: str = 'model_GENE3D', region: int = 0)
- class PlasticMises(yield_stress: float = 5.e7, yield_stress_inf: float = 5.e6, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply von Mises plasticity to a region of the model.
- Parameters:
yield_stress (float) – Yield stress value in Pa (C). Default is \(50\) MPa.
yield_stress_inf (float) – Yield stress value in Pa after softening (if any). Default is \(5\) MPa.
model_name (str) – Name of the model to which the plasticity is applied. Default is “model_GENE3D”.
region (int) – Region number to which the plasticity is applied. Default is 0.
Note
The yield stress is given by \(\sigma_y = C\)
Attributes
- yield_stress: float
Yield stress value in Pa (C). Default is \(50\) MPa.
- yield_stress_inf: float
Yield stress value in Pa after softening (if any). Default is \(5\) MPa.
- healing_rate: float
Healing rate value in s-1. Rate to reduce the plastic damage on which softening is based.
- model_name: str
Name of the model to which the plasticity is applied. Default is “model_GENE3D”
- region: int
Region number to which the plasticity is applied. Default is 0
Drucker-Prager plasticity
- class genepy.PlasticDruckerPrager(friction: float = np.float64(0.5235987755982988), friction_inf: float = np.float64(0.08726646259971647), cohesion: float = 20000000.0, cohesion_inf: float = 5000000.0, tension_cutoff: float = 10000000.0, highstress_cutoff: float = 400000000.0, healing_rate: float = 0.0, model_name: str = 'model_GENE3D', region: int = 0)
- class PlasticDruckerPrager(friction: float = np.deg2rad(30.), friction_inf: float = np.deg2rad(5.), cohesion: float = 2.e7, cohesion_inf: float = 5.e6, tension_cutoff: float = 1.e7, highstress_cutoff: float = 4.e8, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply Drucker-Prager plasticity to a region of the model.
Note
- The yield stress is given by
\(\sigma_y = C \cos(\phi) + p \sin(\phi)\)
with \(\phi\) the friction angle in radian and \(C\) the cohesion in Pa.
- Parameters:
friction (float) – Friction angle value in radian (\(\phi\)). Default is \(30\) degrees.
friction_inf (float) – Friction angle value in radian after softening (if any). Default is \(5\) degrees.
cohesion (float) – Cohesion value in Pa (\(C\)). Default is \(20\) MPa.
cohesion_inf (float) – Cohesion value in Pa after softening (if any). Default is \(5\) MPa.
tension_cutoff (float) – Tension cutoff value in Pa (if \(\sigma_y < \text{tension_cutoff} : \sigma_y = \text{tension_cutoff}\)). Default is \(10\) MPa.
highstress_cutoff (float) – High stress cutoff value in Pa (if \(\sigma_y > \text{highstress_cutoff} : \sigma_y = \text{highstress_cutoff}\)). Default is \(400\) MPa.
model_name (str) – Name of the model to which the plasticity is applied. Default is “model_GENE3D”.
region (int) – Region number to which the plasticity is applied. Default is 0.
Attributes
- friction: float
Friction angle value in radian (\(\phi\)). Default is \(30\) degrees.
- friction_inf: float
Friction angle value in radian after softening (if any). Default is \(5\) degrees.
- cohesion: float
Cohesion value in Pa (\(C\)). Default is \(20\) MPa.
- cohesion_inf: float
Cohesion value in Pa after softening (if any). Default is \(5\) MPa.
- tension_cutoff: float
Tension cutoff value in Pa (if \(\sigma_y < \text{tension_cutoff} : \sigma_y = \text{tension_cutoff}\)). Default is \(10\) MPa.
- highstress_cutoff: float
High stress cutoff value in Pa (if \(\sigma_y > \text{highstress_cutoff} : \sigma_y = \text{highstress_cutoff}\)). Default is \(400\) MPa.
- healing_rate: float
Healing rate value in s-1. Rate to reduce the plastic damage on which softening is based. Default is 0.
- model_name: str
Name of the model to which the plasticity is applied. Default is “model_GENE3D”
- region: int
Region number to which the plasticity is applied. Default is 0
Plastic strain softening
No softening
- class genepy.SofteningNone(model_name: str = 'model_GENE3D', region: int = 0)
- class SofteningNone(model_name: str = 'model_GENE3D', region: int = 0)
Class to apply no softening to a region of the model. The given region will not have any softening.
- Parameters:
model_name (str) – Name of the model to which the softening is applied. Default is “model_GENE3D”.
region (int) – Region number to which the softening is applied. Default is 0.
Linear softening
- class genepy.SofteningLinear(strain_min: float, strain_max: float, model_name: str = 'model_GENE3D', region: int = 0)
- class SofteningLinear(strain_min: float, strain_max: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply linear softening to a region of the model. Only applies to the plastic deformation.
- Parameters:
strain_min (float) – Minimum strain value (\(\epsilon_{min}\)).
strain_max (float) – Maximum strain value (\(\epsilon_{max}\)).
model_name (str) – Name of the model to which the softening is applied. Default is “model_GENE3D”.
region (int) – Region number to which the softening is applied. Default is 0.
Note
The linear softening is defined by the minimum and maximum plastic strain values and influences the friction and/or the cohesion. For \(t\) the variable to be softened, the softening is given by:
\[t = t_0 - (t_0 - t_{\infty}) \frac{\epsilon_p - \epsilon_{min}}{\epsilon_{max} - \epsilon_{min}}\]where \(t_0\) is the initial value of the variable, \(t_{\infty}\) is the final value of the variable, and \(\epsilon_p\) is the plastic strain.
Attributes
- eps_min: float
Minimum strain value (\(\epsilon_{min}\)).
- eps_max: float
Maximum strain value (\(\epsilon_{max}\)).
- model_name: str
Name of the model to which the softening is applied.
- region: int
Region number to which the softening is applied.
Exponential softening
- class genepy.SofteningExponential(strain_min: float, strain_fold: float, model_name: str = 'model_GENE3D', region: int = 0)
- class SofteningExponential(strain_min: float, strain_fold: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply exponential softening to a region of the model. Only applies to the plastic deformation.
- Parameters:
strain_min (float) – Minimum strain value (\(\epsilon_{min}\)).
strain_fold (float) – Fold strain value (\(\epsilon_{fold}\)).
model_name (str) – Name of the model to which the softening is applied. Default is “model_GENE3D”.
region (int) – Region number to which the softening is applied. Default is 0.
Note
The exponential softening is defined by the minimum and a fold plastic strain values and influences the friction and/or the cohesion. For \(t\) the variable to be softened, the softening is given by:
\[t = t_0 - (t_0 - t_{\infty}) \exp \left(-\frac{\epsilon_p}{\epsilon_{fold}} \right)\]where \(t_0\) is the initial value of the variable, \(t_{\infty}\) is the final value of the variable, and \(\epsilon_p\) is the plastic strain.
Attributes
- eps_min: float
Minimum strain value (epsilon_{min}).
- eps_fold: float
Fold strain value (epsilon_{fold}).
- model_name: str
Name of the model to which the softening is applied.
- region: int
Region number to which the softening is applied.
Temperature-dependent softening
Linear temperature softening
- class genepy.SofteningLinearTemperature(temperature_min: float, temperature_max: float, model_name: str = 'model_GENE3D', region: int = 0)
- class SofteningLinearTemperature(temperature_min: float, temperature_max: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to apply linear softening based on temperature to a region of the model. Only applies to the plastic deformation.
- Parameters:
temperature_min (float) – Minimum temperature value (\(T_{min}\)).
temperature_max (float) – Maximum temperature value (\(T_{max}\)).
model_name (str) – Name of the model to which the softening is applied. Default is “model_GENE3D”.
region (int) – Region number to which the softening is applied. Default is 0.
Note
The linear softening is defined by the minimum and maximum temperature values and influences the friction and/or the cohesion. For \(t\) the variable to be softened, the softening is given by:
\[t = t_0 - (t_0 - t_{\infty}) \frac{T - T_{min}}{T_{max} - T_{min}}\]where \(t_0\) is the initial value of the variable, \(t_{\infty}\) is the final value of the variable, and \(T\) is the temperature.
Attributes
- eps_min: float
Minimum temperature value (\(T_{min}\)).
- eps_max: float
Maximum temperature value (\(T_{max}\)).
- model_name: str
Name of the model to which the softening is applied.
- region: int
Region number to which the softening is applied.
Energy
- class genepy.Energy(heat_source: EnergySource, conductivity: float, Cp: float = 800.0, model_name: str = 'model_GENE3D', region: int = 0)
- class Energy(heat_source: EnergySource, conductivity: float, Cp: float = 800.0, model_name: str = 'model_GENE3D', region: int = 0)
Class to define the energy parameters of a region of the model.
- Parameters:
heat_source (EnergySource) – Instance of the
genepy.EnergySourceclass describing the heat source types.conductivity (float) – Conductivity value in W.m-1.K-1.
Cp (float) – Heat capacity value in J.kg-1.K-1. Default is \(800\) J.kg-1.K-1.
model_name (str) – Name of the model to which the energy parameters are applied. Default is “model_GENE3D”.
region (int) – Region number to which the energy parameters are applied. Default is 0.
Attributes
- heatcapacity: float
Heat capacity value in J.kg-1.K-1. Default is \(800\) J.kg-1.K-1.
- heat_source: float
Instance of the
genepy.EnergySourceclass describing the heat source types.
- conductivity: float
Conductivity value in W.m-1.K-1.
- sprint_option(self)
Return the options of the material parameter as a string. The option generation is automatised based on the attributes of the class (and its children).
- Returns:
The options of the material parameter as a string.
- Return type:
str
Heat sources
- class genepy.EnergySource(*args, model_name: str = 'model_GENE3D', region: int = 0)
- class EnergySource(*args, model_name: str = 'model_GENE3D', region: int = 0)
Class to define the energy source type of a region of the model as a combination of different heat sources. Those sources will be summed in the model such that the total heat source at a point in space and time is defined by
\[H(\mathbf x, t) = \sum_i H_i(\mathbf x, t)\]where \(H_i(\mathbf x, t)\) is the heat source value of the \(i\)-th source type. This way of defining the heat source allows to combine different types of heat sources in the model.
Example:
To define a region with a combination of heat sources defined on
material points, plus aconstantof 1.5 \(\mu\)W.m-3 and ashear heatingsource, one can use:import genepy as gp gp.EnergySource(gp.EnergySourceMaterialPointValue(), gp.EnergySourceConstant(1.5e-6), gp.EnergySourceShearHeating())
- param args:
Heat sources to combine for the given region, can pass multiple heat sources. Can only be of type:
- param str model_name:
Name of the model to which the energy parameters are applied. Default is “model_GENE3D”.
- param int region:
Region number to which the energy parameters are applied. Default is 0.
- sprint_option(self)
Return the options of the material parameter as a string. The option generation is automatised based on the attributes of the class (and its children).
- Returns:
The options of the material parameter as a string.
- Return type:
str
No source (default)
- class genepy.EnergySourceNone(model_name: str = 'model_GENE3D', region: int = 0)
- class EnergySourceNone(model_name: str = 'model_GENE3D', region: int = 0)
Class to define the energy source type of a region of the model as none. Default behavior of pTatin3d.
- Parameters:
model_name (str) – Name of the model to which the energy parameters are applied. Default is “model_GENE3D”.
region (int) – Region number to which the energy parameters are applied. Default is 0.
Defined on material points
- class genepy.EnergySourceMaterialPointValue(model_name: str = 'model_GENE3D', region: int = 0)
- class EnergySourceMaterialPointValue(model_name: str = 'model_GENE3D', region: int = 0)
Class to define the energy source type of a region of the model as a defined on material points. This class only sets the type of heat source to be used. The actual values of the heat source to apply on the material points should be defined in the
genepy.InitialHeatSourceclass with an expression or an instance of thegenepy.Gaussianclass describing the heat source spatial repartition.- Parameters:
model_name (str) – Name of the model to which the energy parameters are applied. Default is “model_GENE3D”.
region (int) – Region number to which the energy parameters are applied. Default is 0.
Constant by region
- class genepy.EnergySourceConstant(heat_source: float, model_name: str = 'model_GENE3D', region: int = 0)
- class EnergySourceConstant(heat_source: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to define the energy source type of a region of the model as a constant value. The heat source value should be given in W.m-3.
- Parameters:
heat_source (float) – Heat source value in W.m-3.
model_name (str) – Name of the model to which the energy parameters are applied. Default is “model_GENE3D”.
region (int) – Region number to which the energy parameters are applied. Default is 0.
Shear heating
- class genepy.EnergySourceShearHeating(model_name: str = 'model_GENE3D', region: int = 0)
- class EnergySourceShearHeating(model_name: str = 'model_GENE3D', region: int = 0)
Class to define the energy source type of a region of the model as shear heating. The source derived from shear heating is defined as:
\[\begin{split}H &= \boldsymbol{\sigma} : \boldsymbol{\varepsilon} \\ &= 2 \eta \boldsymbol{\varepsilon} : \boldsymbol{\varepsilon} \\ &= 2 \eta \sum_{ij} \varepsilon_{ij} \varepsilon_{ij}\end{split}\]with \(\eta\) the viscosity and \(\boldsymbol{\varepsilon}\) the strain rate tensor.
- Parameters:
model_name (str) – Name of the model to which the energy parameters are applied. Default is “model_GENE3D”.
region (int) – Region number to which the energy parameters are applied. Default is 0.
Exponential decay
- class genepy.EnergySourceDecay(heat_source: float, decay: float, model_name: str = 'model_GENE3D', region: int = 0)
- class EnergySourceDecay(heat_source: float, half_life: float, model_name: str = 'model_GENE3D', region: int = 0)
Class to define the energy source type of a region of the model as a decaying heat source such that
\[H_0 e^{-\lambda t}\]where \(H_0\) is the reference heat source value in W.m-3, \(\lambda\) is the decay constant in s-1 and \(t\) is the time.
- Parameters:
heat_source (float) – Reference heat source value \(H_0\) in W.m-3.
half_life (float) – Decay constant in s-1
model_name (str) – Name of the model to which the energy parameters are applied. Default is “model_GENE3D”.
region (int) – Region number to which the energy parameters are applied. Default is 0.