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.
|
Variables | |
string | mode = "c" |
list | dim_vect = [2, 3] |
bool | do_simplifications = False |
string | output_filename = "total_lagrangian_mixed_volumetric_strain_element.cpp" |
string | template_filename = "total_lagrangian_mixed_volumetric_strain_element_template.cpp" |
list | tokens_filenames = [] |
int | n_nodes = dim + 1 |
int | block_size = dim + 1 |
int | local_size = n_nodes * block_size |
int | strain_size = 3 |
bool | impose_partion_of_unity = False |
N | |
DN | |
u = DefineMatrix('u',n_nodes,dim) | |
b = DefineMatrix('b',n_nodes,dim) | |
th = DefineVector('th',n_nodes) | |
w = DefineMatrix('w',n_nodes,dim) | |
q = DefineVector('q',n_nodes) | |
w_g = sympy.Symbol("w_g", positive=True) | |
tau_u = sympy.Symbol("tau_u",positive=True) | |
tau_th = sympy.Symbol("tau_th",positive=True) | |
S = DefineVector('S',strain_size) | |
C = DefineSymmetricMatrix("C",strain_size,strain_size) | |
int | th_gauss = 0 |
grad_th_gauss = DN.transpose()*th | |
b_gauss = DefineVector('b_gauss',dim) | |
grad_w_gauss = w.transpose()*DN | |
grad_q_gauss = q.transpose()*DN | |
w_gauss = w.transpose()*N | |
q_gauss = q.transpose()*N | |
F_gauss = sympy.Matrix(sympy.eye(dim,dim)) | |
j_gauss = sympy.det(F_gauss) | |
invF_gauss = F_gauss.inv(method="LU") | |
cofF_gauss = j_gauss*(invF_gauss.transpose()) | |
tuple | Fbar_gauss = (1/j_gauss**sympy.Rational(1,dim))*F_gauss |
tuple | Cbar_gauss = Fbar_gauss.transpose() * Fbar_gauss |
float | Ebar_gauss = 0.5*(Cbar_gauss - sympy.eye(dim,dim)) |
tuple | Fmod_gauss = ((1.0 + th_gauss)**sympy.Rational(1,dim))*Fbar_gauss |
tuple | Cmod_gauss = Fmod_gauss.transpose() * Fmod_gauss |
float | Emod_gauss = 0.5*(Cmod_gauss - sympy.eye(dim,dim)) |
tuple | tmp = (DoubleContraction(C, F_gauss.transpose()*F_gauss)).tomatrix() |
mom_first = DoubleContraction(grad_w_gauss, F_gauss* S) | |
tuple | mom_second = (w_gauss.transpose() * b_gauss)[0] |
tuple | mom_aux_scalar = (tau_th / dim) * ((1+th_gauss)**sympy.Rational(2-dim,dim)) * (1.0/j_gauss**sympy.Rational(2,dim)) |
mom_stab = DoubleContraction(grad_w_gauss, mom_aux_scalar * (1 + th_gauss - j_gauss) * tmp) | |
tuple | mass_first = (1.0 - tau_th) * q_gauss[0] * (1.0+th_gauss - j_gauss) |
tuple | mass_aux_scalar = (tau_u / dim) * ((j_gauss / (1.0+th_gauss))**sympy.Rational(dim-2,dim)) |
tuple | mass_stab_1 = (mass_aux_scalar * grad_q_gauss * tmp * grad_th_gauss)[0] |
tuple | mass_stab_2 = (tau_u * grad_q_gauss * cofF_gauss.transpose() * b_gauss)[0] |
tuple | functional = mom_second - mom_first + mom_stab + mass_first + mass_stab_1 + mass_stab_2 |
functional_array = sympy.Matrix([functional]) | |
dofs = sympy.zeros(local_size, 1) | |
testfunc = sympy.zeros(local_size, 1) | |
rhs = Compute_RHS(functional_array.copy(), testfunc, do_simplifications) | |
rhs_out = OutputVector_CollectingFactors(w_g*rhs, "rRightHandSideVector", mode, indentation_level=2, assignment_op="+=") | |
E = sympy.MatrixSymbol("E", dim, dim).as_mutable() | |
S_func = sympy.MatrixSymbol("S", dim, dim).as_mutable() | |
n_dofs = rhs.shape[0] | |
dictionary | substitution_list = {} |
t = sympy.diff(S_func[i, j], E[k, l]) | |
lhs = sympy.zeros(n_dofs, n_dofs) | |
lhs_out = OutputMatrix_CollectingFactors(w_g*lhs, "rLeftHandSideMatrix", mode, indentation_level=2, assignment_op="+=") | |
Fmod_gauss_out = OutputMatrix_CollectingFactors(Fmod_gauss, "r_eq_def_gradient", mode, indentation_level=1) | |
det_Fmod_gauss_out = OutputScalar_CollectingFactors(Fmod_gauss.det(), "r_det_eq_def_gradient", mode, indentation_level=0) | |
Emod_gauss_out = OutputVector_CollectingFactors(StrainToVoigt(Emod_gauss), "r_eq_green_strain", mode, indentation_level=1) | |
dictionary | tokens_dict |
bool | has_token = False |
generate_total_lagrangian_mixed_volumetric_strain_element.b = DefineMatrix('b',n_nodes,dim) |
generate_total_lagrangian_mixed_volumetric_strain_element.b_gauss = DefineVector('b_gauss',dim) |
int generate_total_lagrangian_mixed_volumetric_strain_element.block_size = dim + 1 |
generate_total_lagrangian_mixed_volumetric_strain_element.C = DefineSymmetricMatrix("C",strain_size,strain_size) |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.Cbar_gauss = Fbar_gauss.transpose() * Fbar_gauss |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.Cmod_gauss = Fmod_gauss.transpose() * Fmod_gauss |
generate_total_lagrangian_mixed_volumetric_strain_element.cofF_gauss = j_gauss*(invF_gauss.transpose()) |
generate_total_lagrangian_mixed_volumetric_strain_element.det_Fmod_gauss_out = OutputScalar_CollectingFactors(Fmod_gauss.det(), "r_det_eq_def_gradient", mode, indentation_level=0) |
list generate_total_lagrangian_mixed_volumetric_strain_element.dim_vect = [2, 3] |
generate_total_lagrangian_mixed_volumetric_strain_element.DN |
bool generate_total_lagrangian_mixed_volumetric_strain_element.do_simplifications = False |
generate_total_lagrangian_mixed_volumetric_strain_element.dofs = sympy.zeros(local_size, 1) |
generate_total_lagrangian_mixed_volumetric_strain_element.E = sympy.MatrixSymbol("E", dim, dim).as_mutable() |
float generate_total_lagrangian_mixed_volumetric_strain_element.Ebar_gauss = 0.5*(Cbar_gauss - sympy.eye(dim,dim)) |
float generate_total_lagrangian_mixed_volumetric_strain_element.Emod_gauss = 0.5*(Cmod_gauss - sympy.eye(dim,dim)) |
generate_total_lagrangian_mixed_volumetric_strain_element.Emod_gauss_out = OutputVector_CollectingFactors(StrainToVoigt(Emod_gauss), "r_eq_green_strain", mode, indentation_level=1) |
generate_total_lagrangian_mixed_volumetric_strain_element.F_gauss = sympy.Matrix(sympy.eye(dim,dim)) |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.Fbar_gauss = (1/j_gauss**sympy.Rational(1,dim))*F_gauss |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.Fmod_gauss = ((1.0 + th_gauss)**sympy.Rational(1,dim))*Fbar_gauss |
generate_total_lagrangian_mixed_volumetric_strain_element.Fmod_gauss_out = OutputMatrix_CollectingFactors(Fmod_gauss, "r_eq_def_gradient", mode, indentation_level=1) |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.functional = mom_second - mom_first + mom_stab + mass_first + mass_stab_1 + mass_stab_2 |
generate_total_lagrangian_mixed_volumetric_strain_element.functional_array = sympy.Matrix([functional]) |
generate_total_lagrangian_mixed_volumetric_strain_element.grad_q_gauss = q.transpose()*DN |
generate_total_lagrangian_mixed_volumetric_strain_element.grad_th_gauss = DN.transpose()*th |
generate_total_lagrangian_mixed_volumetric_strain_element.grad_w_gauss = w.transpose()*DN |
bool generate_total_lagrangian_mixed_volumetric_strain_element.has_token = False |
bool generate_total_lagrangian_mixed_volumetric_strain_element.impose_partion_of_unity = False |
generate_total_lagrangian_mixed_volumetric_strain_element.invF_gauss = F_gauss.inv(method="LU") |
generate_total_lagrangian_mixed_volumetric_strain_element.j_gauss = sympy.det(F_gauss) |
generate_total_lagrangian_mixed_volumetric_strain_element.lhs_out = OutputMatrix_CollectingFactors(w_g*lhs, "rLeftHandSideMatrix", mode, indentation_level=2, assignment_op="+=") |
int generate_total_lagrangian_mixed_volumetric_strain_element.local_size = n_nodes * block_size |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.mass_aux_scalar = (tau_u / dim) * ((j_gauss / (1.0+th_gauss))**sympy.Rational(dim-2,dim)) |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.mass_first = (1.0 - tau_th) * q_gauss[0] * (1.0+th_gauss - j_gauss) |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.mass_stab_1 = (mass_aux_scalar * grad_q_gauss * tmp * grad_th_gauss)[0] |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.mass_stab_2 = (tau_u * grad_q_gauss * cofF_gauss.transpose() * b_gauss)[0] |
string generate_total_lagrangian_mixed_volumetric_strain_element.mode = "c" |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.mom_aux_scalar = (tau_th / dim) * ((1+th_gauss)**sympy.Rational(2-dim,dim)) * (1.0/j_gauss**sympy.Rational(2,dim)) |
generate_total_lagrangian_mixed_volumetric_strain_element.mom_first = DoubleContraction(grad_w_gauss, F_gauss* S) |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.mom_second = (w_gauss.transpose() * b_gauss)[0] |
generate_total_lagrangian_mixed_volumetric_strain_element.mom_stab = DoubleContraction(grad_w_gauss, mom_aux_scalar * (1 + th_gauss - j_gauss) * tmp) |
generate_total_lagrangian_mixed_volumetric_strain_element.N |
generate_total_lagrangian_mixed_volumetric_strain_element.n_dofs = rhs.shape[0] |
int generate_total_lagrangian_mixed_volumetric_strain_element.n_nodes = dim + 1 |
string generate_total_lagrangian_mixed_volumetric_strain_element.output_filename = "total_lagrangian_mixed_volumetric_strain_element.cpp" |
generate_total_lagrangian_mixed_volumetric_strain_element.q = DefineVector('q',n_nodes) |
generate_total_lagrangian_mixed_volumetric_strain_element.q_gauss = q.transpose()*N |
generate_total_lagrangian_mixed_volumetric_strain_element.rhs = Compute_RHS(functional_array.copy(), testfunc, do_simplifications) |
generate_total_lagrangian_mixed_volumetric_strain_element.rhs_out = OutputVector_CollectingFactors(w_g*rhs, "rRightHandSideVector", mode, indentation_level=2, assignment_op="+=") |
generate_total_lagrangian_mixed_volumetric_strain_element.S = DefineVector('S',strain_size) |
generate_total_lagrangian_mixed_volumetric_strain_element.S_func = sympy.MatrixSymbol("S", dim, dim).as_mutable() |
int generate_total_lagrangian_mixed_volumetric_strain_element.strain_size = 3 |
dictionary generate_total_lagrangian_mixed_volumetric_strain_element.substitution_list = {} |
generate_total_lagrangian_mixed_volumetric_strain_element.tau_th = sympy.Symbol("tau_th",positive=True) |
generate_total_lagrangian_mixed_volumetric_strain_element.tau_u = sympy.Symbol("tau_u",positive=True) |
string generate_total_lagrangian_mixed_volumetric_strain_element.template_filename = "total_lagrangian_mixed_volumetric_strain_element_template.cpp" |
generate_total_lagrangian_mixed_volumetric_strain_element.testfunc = sympy.zeros(local_size, 1) |
generate_total_lagrangian_mixed_volumetric_strain_element.th = DefineVector('th',n_nodes) |
int generate_total_lagrangian_mixed_volumetric_strain_element.th_gauss = 0 |
tuple generate_total_lagrangian_mixed_volumetric_strain_element.tmp = (DoubleContraction(C, F_gauss.transpose()*F_gauss)).tomatrix() |
dictionary generate_total_lagrangian_mixed_volumetric_strain_element.tokens_dict |
list generate_total_lagrangian_mixed_volumetric_strain_element.tokens_filenames = [] |
generate_total_lagrangian_mixed_volumetric_strain_element.u = DefineMatrix('u',n_nodes,dim) |
generate_total_lagrangian_mixed_volumetric_strain_element.w = DefineMatrix('w',n_nodes,dim) |
generate_total_lagrangian_mixed_volumetric_strain_element.w_g = sympy.Symbol("w_g", positive=True) |
generate_total_lagrangian_mixed_volumetric_strain_element.w_gauss = w.transpose()*N |