KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Namespaces | Functions | Variables
isotropic_damage_automatic_differentiation.py File Reference

Namespaces

 isotropic_damage_automatic_differentiation
 

Functions

def isotropic_damage_automatic_differentiation.SetUp2DProblem ()
 
def isotropic_damage_automatic_differentiation.SetUp3DProblem ()
 
def isotropic_damage_automatic_differentiation.ComputePredictorStressVector2D (Young, nu, Strain0, Strain1, Strain2)
 
def isotropic_damage_automatic_differentiation.ComputePredictorStressVector3D (Young, nu, Strain0, Strain1, Strain2, Strain3, Strain4, Strain5)
 
def isotropic_damage_automatic_differentiation.ComputeJ2Invariant2D (Deviator, pmean)
 
def isotropic_damage_automatic_differentiation.ComputeJ2Invariant3D (Deviator, pmean)
 
def isotropic_damage_automatic_differentiation.ComputeJ3Invariant2D (Deviator)
 
def isotropic_damage_automatic_differentiation.ComputeJ3Invariant3D (Deviator)
 
def isotropic_damage_automatic_differentiation.ComputePmean2D (StressVector)
 
def isotropic_damage_automatic_differentiation.ComputePmean3D (StressVector)
 
def isotropic_damage_automatic_differentiation.ComputeDamage (UniaxialStress, Threshold, Gf, L, Young, Softening)
 
def isotropic_damage_automatic_differentiation.ComputeDamageLinear (UniaxialStress, Threshold, A)
 
def isotropic_damage_automatic_differentiation.ComputeDamageExponential (UniaxialStress, Threshold, A)
 
def isotropic_damage_automatic_differentiation.ComputeAParameterLinear (Threshold, Gf, L, Young)
 
def isotropic_damage_automatic_differentiation.ComputeAParameterExponential (Threshold, Gf, L, Young)
 

Variables

int isotropic_damage_automatic_differentiation.dimension = 2
 
string isotropic_damage_automatic_differentiation.yield_surface = "DruckerPrager"
 
string isotropic_damage_automatic_differentiation.softening = "Linear"
 
string isotropic_damage_automatic_differentiation.mode = "c"
 
float isotropic_damage_automatic_differentiation.J2 = 0.0;
 
 isotropic_damage_automatic_differentiation.Strain0
 
 isotropic_damage_automatic_differentiation.Strain1
 
 isotropic_damage_automatic_differentiation.Strain2
 
 isotropic_damage_automatic_differentiation.Seff
 
 isotropic_damage_automatic_differentiation.Stress = (1.0 - damage)*Seff
 
 isotropic_damage_automatic_differentiation.Deviator
 
 isotropic_damage_automatic_differentiation.Ct
 
 isotropic_damage_automatic_differentiation.Young
 
 isotropic_damage_automatic_differentiation.nu
 
 isotropic_damage_automatic_differentiation.threshold
 
 isotropic_damage_automatic_differentiation.Gf
 
 isotropic_damage_automatic_differentiation.characteristic_length
 
def isotropic_damage_automatic_differentiation.pmean = ComputePmean2D(Seff)
 
 isotropic_damage_automatic_differentiation.VonMisesStress = sqrt(3.0*J2)
 
def isotropic_damage_automatic_differentiation.damage = ComputeDamage(VonMisesStress, threshold, Gf, characteristic_length, Young, softening)
 
float isotropic_damage_automatic_differentiation.rankine_yield = 0.5 * (Seff[0] + Seff[1]) + sqrt((0.5 * (Seff[0] - Seff[1]))**2 + (Seff[2])**2)
 
 isotropic_damage_automatic_differentiation.sin_phi = Symbol("sin_phi")
 
 isotropic_damage_automatic_differentiation.root_3 = math.sqrt(3.0)
 
 isotropic_damage_automatic_differentiation.CFL = -root_3 * (3.0 - sin_phi) / (3.0 * sin_phi - 3.0)
 
float isotropic_damage_automatic_differentiation.TEN0 = 6.0 * pmean * sin_phi / (root_3 * (3.0 - sin_phi)) + sqrt(J2)
 
float isotropic_damage_automatic_differentiation.DruckerPragerStress = CFL*TEN0
 
 isotropic_damage_automatic_differentiation.damage_threshold = abs(threshold * (3.0 + sin_phi) / (3.0 * sin_phi - 3.0))
 
float isotropic_damage_automatic_differentiation.A = 1.0 / (Gf * Young / (characteristic_length * threshold**2) - 0.5)
 
 isotropic_damage_automatic_differentiation.phi = Symbol("phi")
 
 isotropic_damage_automatic_differentiation.threshold_tension = Symbol("threshold_tension")
 
 isotropic_damage_automatic_differentiation.threshold_compression = Symbol("threshold_compression")
 
 isotropic_damage_automatic_differentiation.R = abs(threshold_compression / threshold_tension)
 
tuple isotropic_damage_automatic_differentiation.Rmohr = (tan((math.pi / 4.0) + phi / 2.0))**2
 
tuple isotropic_damage_automatic_differentiation.alpha_r = R / Rmohr
 
def isotropic_damage_automatic_differentiation.J3 = ComputeJ3Invariant2D(Deviator)
 
float isotropic_damage_automatic_differentiation.K1 = 0.5 * (1.0 + alpha_r) - 0.5 * (1.0 - alpha_r) * sin_phi;
 
float isotropic_damage_automatic_differentiation.K2 = 0.5 * (1.0 + alpha_r) - 0.5 * (1.0 - alpha_r) / sin_phi;
 
float isotropic_damage_automatic_differentiation.K3 = 0.5 * (1.0 + alpha_r) * sin_phi - 0.5 * (1.0 - alpha_r);
 
tuple isotropic_damage_automatic_differentiation.sint3 = (-3.0 * sqrt(3.0) * J3) / (2.0 * J2 * sqrt(J2))
 
float isotropic_damage_automatic_differentiation.LodeAngle = asin(sint3) / 3.0;
 
tuple isotropic_damage_automatic_differentiation.ModifiedMohrCoulombStress = (2.0 * tan(math.pi * 0.25 + phi * 0.5) / cos(phi)) * ((3.0*pmean * K3 / 3.0) +sqrt(J2) * (K1 * cos(LodeAngle) - K2 * sin(LodeAngle) * sin_phi / sqrt(3.0)))
 
list isotropic_damage_automatic_differentiation.Strain = [Strain0, Strain1, Strain2]
 
 isotropic_damage_automatic_differentiation.out = OutputMatrix_CollectingFactors(Ct, "r_Ct", mode)
 
 isotropic_damage_automatic_differentiation.Strain3
 
 isotropic_damage_automatic_differentiation.Strain4
 
 isotropic_damage_automatic_differentiation.Strain5
 
 isotropic_damage_automatic_differentiation.norm_stress_vector = DefineVector('norm_stress_vector', 6)
 
 isotropic_damage_automatic_differentiation.PrincipalStresses = DefineVector('PrincipalStresses', 3)
 
 isotropic_damage_automatic_differentiation.norm_frobenius = sqrt(Seff[0]**2 + Seff[1]**2 + Seff[2]**2+Seff[3]**2 + Seff[4]**2 + Seff[5]**2)
 
 isotropic_damage_automatic_differentiation.I1 = norm_stress_vector[0] + norm_stress_vector[1] + norm_stress_vector[2]
 
tuple isotropic_damage_automatic_differentiation.I2 = (norm_stress_vector[0] + norm_stress_vector[2]) * norm_stress_vector[1] + norm_stress_vector[0] * norm_stress_vector[2] -norm_stress_vector[3] * norm_stress_vector[3] - norm_stress_vector[4] * norm_stress_vector[4] - norm_stress_vector[5] * norm_stress_vector[5];
 
tuple isotropic_damage_automatic_differentiation.I3 = (norm_stress_vector[1] * norm_stress_vector[2] - norm_stress_vector[4] * norm_stress_vector[4]) * norm_stress_vector[0] - norm_stress_vector[1] * norm_stress_vector[5] * norm_stress_vector[5] - norm_stress_vector[2] * norm_stress_vector[3] * norm_stress_vector[3] + 2.0 * norm_stress_vector[3] * norm_stress_vector[4] * norm_stress_vector[5]
 
int isotropic_damage_automatic_differentiation.II1 = I1**2
 
tuple isotropic_damage_automatic_differentiation.Q = (3.0 * I2 - II1) / 9.0;
 
 isotropic_damage_automatic_differentiation.cos_phi = R / (sqrt(-Q**3));
 
float isotropic_damage_automatic_differentiation.phi_3 = phi / 3.0;
 
float isotropic_damage_automatic_differentiation.aux1 = 2.0 * sqrt(-Q);
 
float isotropic_damage_automatic_differentiation.aux2 = I1 / 3.0;
 
float isotropic_damage_automatic_differentiation.deg_120 = 2.0 / 3.0 * math.pi;