![]() |
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.
|
Functions | |
| def | SetUp2DProblem () |
| def | SetUp3DProblem () |
| def | ComputePredictorStressVector2D (Young, nu, Strain0, Strain1, Strain2) |
| def | ComputePredictorStressVector3D (Young, nu, Strain0, Strain1, Strain2, Strain3, Strain4, Strain5) |
| def | ComputeJ2Invariant2D (Deviator, pmean) |
| def | ComputeJ2Invariant3D (Deviator, pmean) |
| def | ComputeJ3Invariant2D (Deviator) |
| def | ComputeJ3Invariant3D (Deviator) |
| def | ComputePmean2D (StressVector) |
| def | ComputePmean3D (StressVector) |
| def | ComputeDamage (UniaxialStress, Threshold, Gf, L, Young, Softening) |
| def | ComputeDamageLinear (UniaxialStress, Threshold, A) |
| def | ComputeDamageExponential (UniaxialStress, Threshold, A) |
| def | ComputeAParameterLinear (Threshold, Gf, L, Young) |
| def | ComputeAParameterExponential (Threshold, Gf, L, Young) |
Variables | |
| int | dimension = 2 |
| string | yield_surface = "DruckerPrager" |
| string | softening = "Linear" |
| string | mode = "c" |
| float | J2 = 0.0; |
| Strain0 | |
| Strain1 | |
| Strain2 | |
| Seff | |
| Stress = (1.0 - damage)*Seff | |
| Deviator | |
| Ct | |
| Young | |
| nu | |
| threshold | |
| Gf | |
| characteristic_length | |
| def | pmean = ComputePmean2D(Seff) |
| VonMisesStress = sqrt(3.0*J2) | |
| def | damage = ComputeDamage(VonMisesStress, threshold, Gf, characteristic_length, Young, softening) |
| float | rankine_yield = 0.5 * (Seff[0] + Seff[1]) + sqrt((0.5 * (Seff[0] - Seff[1]))**2 + (Seff[2])**2) |
| sin_phi = Symbol("sin_phi") | |
| root_3 = math.sqrt(3.0) | |
| CFL = -root_3 * (3.0 - sin_phi) / (3.0 * sin_phi - 3.0) | |
| float | TEN0 = 6.0 * pmean * sin_phi / (root_3 * (3.0 - sin_phi)) + sqrt(J2) |
| float | DruckerPragerStress = CFL*TEN0 |
| damage_threshold = abs(threshold * (3.0 + sin_phi) / (3.0 * sin_phi - 3.0)) | |
| float | A = 1.0 / (Gf * Young / (characteristic_length * threshold**2) - 0.5) |
| phi = Symbol("phi") | |
| threshold_tension = Symbol("threshold_tension") | |
| threshold_compression = Symbol("threshold_compression") | |
| R = abs(threshold_compression / threshold_tension) | |
| tuple | Rmohr = (tan((math.pi / 4.0) + phi / 2.0))**2 |
| tuple | alpha_r = R / Rmohr |
| def | J3 = ComputeJ3Invariant2D(Deviator) |
| float | K1 = 0.5 * (1.0 + alpha_r) - 0.5 * (1.0 - alpha_r) * sin_phi; |
| float | K2 = 0.5 * (1.0 + alpha_r) - 0.5 * (1.0 - alpha_r) / sin_phi; |
| float | K3 = 0.5 * (1.0 + alpha_r) * sin_phi - 0.5 * (1.0 - alpha_r); |
| tuple | sint3 = (-3.0 * sqrt(3.0) * J3) / (2.0 * J2 * sqrt(J2)) |
| float | LodeAngle = asin(sint3) / 3.0; |
| tuple | 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 | Strain = [Strain0, Strain1, Strain2] |
| out = OutputMatrix_CollectingFactors(Ct, "r_Ct", mode) | |
| Strain3 | |
| Strain4 | |
| Strain5 | |
| norm_stress_vector = DefineVector('norm_stress_vector', 6) | |
| PrincipalStresses = DefineVector('PrincipalStresses', 3) | |
| norm_frobenius = sqrt(Seff[0]**2 + Seff[1]**2 + Seff[2]**2+Seff[3]**2 + Seff[4]**2 + Seff[5]**2) | |
| I1 = norm_stress_vector[0] + norm_stress_vector[1] + norm_stress_vector[2] | |
| tuple | 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 | 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 | II1 = I1**2 |
| tuple | Q = (3.0 * I2 - II1) / 9.0; |
| cos_phi = R / (sqrt(-Q**3)); | |
| float | phi_3 = phi / 3.0; |
| float | aux1 = 2.0 * sqrt(-Q); |
| float | aux2 = I1 / 3.0; |
| float | deg_120 = 2.0 / 3.0 * math.pi; |
| def isotropic_damage_automatic_differentiation.ComputeAParameterExponential | ( | Threshold, | |
| Gf, | |||
| L, | |||
| Young | |||
| ) |
| def isotropic_damage_automatic_differentiation.ComputeAParameterLinear | ( | Threshold, | |
| Gf, | |||
| L, | |||
| Young | |||
| ) |
| def isotropic_damage_automatic_differentiation.ComputeDamage | ( | UniaxialStress, | |
| Threshold, | |||
| Gf, | |||
| L, | |||
| Young, | |||
| Softening | |||
| ) |
| def isotropic_damage_automatic_differentiation.ComputeDamageExponential | ( | UniaxialStress, | |
| Threshold, | |||
| A | |||
| ) |
| def isotropic_damage_automatic_differentiation.ComputeDamageLinear | ( | UniaxialStress, | |
| Threshold, | |||
| A | |||
| ) |
| 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.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.SetUp2DProblem | ( | ) |
| def isotropic_damage_automatic_differentiation.SetUp3DProblem | ( | ) |
| int isotropic_damage_automatic_differentiation.A = 1.0 / (Gf * Young / (characteristic_length * threshold**2) - 0.5) |
| float isotropic_damage_automatic_differentiation.aux1 = 2.0 * sqrt(-Q); |
| float isotropic_damage_automatic_differentiation.aux2 = I1 / 3.0; |
| isotropic_damage_automatic_differentiation.characteristic_length |
| isotropic_damage_automatic_differentiation.Ct |
| tuple isotropic_damage_automatic_differentiation.damage = ComputeDamage(VonMisesStress, threshold, Gf, characteristic_length, Young, softening) |
| isotropic_damage_automatic_differentiation.damage_threshold = abs(threshold * (3.0 + sin_phi) / (3.0 * sin_phi - 3.0)) |
| float isotropic_damage_automatic_differentiation.deg_120 = 2.0 / 3.0 * math.pi; |
| isotropic_damage_automatic_differentiation.Deviator |
| int isotropic_damage_automatic_differentiation.dimension = 2 |
| isotropic_damage_automatic_differentiation.Gf |
| 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 |
| def isotropic_damage_automatic_differentiation.J2 = 0.0; |
| 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); |
| float isotropic_damage_automatic_differentiation.LodeAngle = asin(sint3) / 3.0; |
| string isotropic_damage_automatic_differentiation.mode = "c" |
| 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))) |
| 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.norm_stress_vector = DefineVector('norm_stress_vector', 6) |
| isotropic_damage_automatic_differentiation.nu |
| isotropic_damage_automatic_differentiation.out = OutputMatrix_CollectingFactors(Ct, "r_Ct", mode) |
| isotropic_damage_automatic_differentiation.phi = Symbol("phi") |
| float isotropic_damage_automatic_differentiation.phi_3 = phi / 3.0; |
| def isotropic_damage_automatic_differentiation.pmean = ComputePmean2D(Seff) |
| isotropic_damage_automatic_differentiation.PrincipalStresses = DefineVector('PrincipalStresses', 3) |
| tuple isotropic_damage_automatic_differentiation.R = abs(threshold_compression / threshold_tension) |
| isotropic_damage_automatic_differentiation.rankine_yield = 0.5 * (Seff[0] + Seff[1]) + sqrt((0.5 * (Seff[0] - Seff[1]))**2 + (Seff[2])**2) |
| tuple isotropic_damage_automatic_differentiation.Rmohr = (tan((math.pi / 4.0) + phi / 2.0))**2 |
| isotropic_damage_automatic_differentiation.root_3 = math.sqrt(3.0) |
| isotropic_damage_automatic_differentiation.Seff |
| isotropic_damage_automatic_differentiation.sin_phi = Symbol("sin_phi") |
| tuple isotropic_damage_automatic_differentiation.sint3 = (-3.0 * sqrt(3.0) * J3) / (2.0 * J2 * sqrt(J2)) |
| string isotropic_damage_automatic_differentiation.softening = "Linear" |
| isotropic_damage_automatic_differentiation.Strain0 |
| isotropic_damage_automatic_differentiation.Strain1 |
| isotropic_damage_automatic_differentiation.Strain2 |
| isotropic_damage_automatic_differentiation.Strain3 |
| isotropic_damage_automatic_differentiation.Strain4 |
| isotropic_damage_automatic_differentiation.Strain5 |
| float isotropic_damage_automatic_differentiation.TEN0 = 6.0 * pmean * sin_phi / (root_3 * (3.0 - sin_phi)) + sqrt(J2) |
| isotropic_damage_automatic_differentiation.threshold |
| isotropic_damage_automatic_differentiation.threshold_compression = Symbol("threshold_compression") |
| isotropic_damage_automatic_differentiation.threshold_tension = Symbol("threshold_tension") |
| isotropic_damage_automatic_differentiation.VonMisesStress = sqrt(3.0*J2) |
| string isotropic_damage_automatic_differentiation.yield_surface = "DruckerPrager" |
| isotropic_damage_automatic_differentiation.Young |