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 | DefineMatrix (name, m, n) |
This method defines a symbolic matrix. More... | |
def | DefineSymmetricMatrix (name, m, n) |
This method defines a symbolic symmetric matrix. More... | |
def | DefineSymmetricFourthOrderTensor (name, m, n, o, p) |
This method defines a symbolic symmetric 4th order tensor. More... | |
def | DefineVector (name, m) |
This method defines a symbolic vector. More... | |
def | DefineShapeFunctions (nnodes, dim, impose_partion_of_unity=False) |
This method defines shape functions and derivatives. More... | |
def | StrainToVoigt (M) |
This method transform the strains matrix to Voigt notation. More... | |
def | MatrixToVoigt (M) |
This method transform a symmetric matrix to Voigt notation. More... | |
def | ConvertTensorToVoigtMatrix (C) |
This method converts a 4th order tensor given to a matrix in Voigt notation. More... | |
def | ConvertVoigtMatrixToTensor (C) |
This method converts a matrix given in Voigt notation in a 4th order tensor. More... | |
def | DoubleContraction (A, B) |
This method performs the double contraction A:B. More... | |
def | MatrixB (DN) |
This method defines the deformation matrix B. More... | |
def | grad_sym_voigtform (DN, x) |
This method defines a symmetric gradient. More... | |
def | DfjDxi (DN, f) |
This method defines a gradient. More... | |
def | DfiDxj (DN, f) |
This method defines a gradient This returns a matrix D such that D(i,j) = D(fi)/D(xj). More... | |
def | div (DN, x) |
This method defines the divergence. More... | |
def | SubstituteMatrixValue (where_to_substitute, what_to_substitute, substituted_value) |
This method substitutes values into a matrix. More... | |
def | SubstituteScalarValue (where_to_substitute, what_to_substitute, substituted_value) |
This method substitutes values into a scalar. More... | |
def | SubstituteMatrixValueByVoigtSymbols (where_to_substitute, what_to_substitute, substituted_value, is_strain) |
This method substitutes values into a matrix. More... | |
def | Compute_RHS (functional, testfunc, do_simplifications=False) |
This computes the RHS vector. More... | |
def | Compute_LHS (rhs, testfunc, dofs, do_simplifications=False) |
This computes the LHS matrix. More... | |
def | Compute_RHS_and_LHS (functional, testfunc, dofs, do_simplifications=False) |
This computes the LHS matrix and the RHS vector. More... | |
def | OutputScalar (scalar_expression, name, language, indentation_level=0, replace_indices=True, assignment_op="=") |
This function generates code to assign to a (pre-declared) scalar. More... | |
def | OutputVector (vector_expression, name, language, indentation_level=0, replace_indices=True, assignment_op="=") |
This function generates code to fill a (pre-declared) vector. More... | |
def | OutputMatrix (matrix_expression, name, language, indentation_level=0, replace_indices=True, assignment_op="=") |
This function generates code to fill a (pre-declared) matrix. More... | |
def | OutputSymbolicVariable (expression, language, replace_indices=True) |
This function generates code from an expression. More... | |
def | OutputSymbolicVariableDeclaration (expression, name, language, indentation_level=0, replace_indices=True) |
This function generates code to declare and assign an expression, such as: More... | |
def | OutputMatrix_CollectingFactors (A, name, language, indentation_level=0, max_index=None, optimizations='basic', replace_indices=True, assignment_op="=") |
This method collects the constants of the replacement for matrices. More... | |
def | OutputVector_CollectingFactors (A, name, language, indentation_level=0, max_index=None, optimizations='basic', replace_indices=True, assignment_op="=") |
This method collects the constants of the replacement for vectors. More... | |
def | OutputScalar_CollectingFactors (A, name, language, indentation_level=0, optimizations='basic', replace_indices=True, assignment_op="=") |
This method collects the constants of the replacement for vectors. More... | |
def sympy_fe_utilities.Compute_LHS | ( | rhs, | |
testfunc, | |||
dofs, | |||
do_simplifications = False |
|||
) |
This computes the LHS matrix.
Keyword arguments:
def sympy_fe_utilities.Compute_RHS | ( | functional, | |
testfunc, | |||
do_simplifications = False |
|||
) |
This computes the RHS vector.
Keyword arguments:
def sympy_fe_utilities.Compute_RHS_and_LHS | ( | functional, | |
testfunc, | |||
dofs, | |||
do_simplifications = False |
|||
) |
This computes the LHS matrix and the RHS vector.
Keyword arguments:
def sympy_fe_utilities.ConvertTensorToVoigtMatrix | ( | C | ) |
This method converts a 4th order tensor given to a matrix in Voigt notation.
Keyword arguments:
def sympy_fe_utilities.ConvertVoigtMatrixToTensor | ( | C | ) |
This method converts a matrix given in Voigt notation in a 4th order tensor.
Keyword arguments:
def sympy_fe_utilities.DefineMatrix | ( | name, | |
m, | |||
n | |||
) |
This method defines a symbolic matrix.
Keyword arguments:
def sympy_fe_utilities.DefineShapeFunctions | ( | nnodes, | |
dim, | |||
impose_partion_of_unity = False |
|||
) |
This method defines shape functions and derivatives.
Note that partition of unity is imposed the name HAS TO BE --> N and DN
Keyword arguments:
def sympy_fe_utilities.DefineSymmetricFourthOrderTensor | ( | name, | |
m, | |||
n, | |||
o, | |||
p | |||
) |
This method defines a symbolic symmetric 4th order tensor.
Keyword arguments:
def sympy_fe_utilities.DefineSymmetricMatrix | ( | name, | |
m, | |||
n | |||
) |
This method defines a symbolic symmetric matrix.
Keyword arguments:
def sympy_fe_utilities.DefineVector | ( | name, | |
m | |||
) |
This method defines a symbolic vector.
Keyword arguments:
def sympy_fe_utilities.DfiDxj | ( | DN, | |
f | |||
) |
This method defines a gradient This returns a matrix D such that D(i,j) = D(fi)/D(xj).
This is the standard in structural mechanics, that is: D(f1)/D(x1) D(f1)/D(x2) D(f1)/D(x3) D(f2)/D(x1) D(f2)/D(x2) D(f2)/D(x3) D(f3)/D(x1) D(f3)/D(x2) D(f3)/D(x3)
Keyword arguments:
def sympy_fe_utilities.DfjDxi | ( | DN, | |
f | |||
) |
This method defines a gradient.
Returns a matrix D such that D(i,j) = D(fj)/D(xi)
This is the standard in fluid dynamics, that is: D(f1)/D(x1) D(f2)/D(x1) D(f3)/D(x1) D(f1)/D(x2) D(f2)/D(x2) D(f3)/D(x2) D(f1)/D(x3) D(f2)/D(x3) D(f3)/D(x3)
Keyword arguments:
def sympy_fe_utilities.div | ( | DN, | |
x | |||
) |
This method defines the divergence.
Keyword arguments:
def sympy_fe_utilities.DoubleContraction | ( | A, | |
B | |||
) |
This method performs the double contraction A:B.
Keyword arguments:
def sympy_fe_utilities.grad_sym_voigtform | ( | DN, | |
x | |||
) |
This method defines a symmetric gradient.
Keyword arguments:
def sympy_fe_utilities.MatrixB | ( | DN | ) |
This method defines the deformation matrix B.
Keyword arguments:
def sympy_fe_utilities.MatrixToVoigt | ( | M | ) |
This method transform a symmetric matrix to Voigt notation.
Keyword arguments:
def sympy_fe_utilities.OutputMatrix | ( | matrix_expression, | |
name, | |||
language, | |||
indentation_level = 0 , |
|||
replace_indices = True , |
|||
assignment_op = "=" |
|||
) |
This function generates code to fill a (pre-declared) matrix.
Keyword arguments:
True
to replace matrix_i_j
with matrix[i,j]
(And similarly for vectors)def sympy_fe_utilities.OutputMatrix_CollectingFactors | ( | A, | |
name, | |||
language, | |||
indentation_level = 0 , |
|||
max_index = None , |
|||
optimizations = 'basic' , |
|||
replace_indices = True , |
|||
assignment_op = "=" |
|||
) |
This method collects the constants of the replacement for matrices.
Keyword arguments:
True
to replace matrix[i,j] with matrix_i_j (And similarly for vectors)def sympy_fe_utilities.OutputScalar | ( | scalar_expression, | |
name, | |||
language, | |||
indentation_level = 0 , |
|||
replace_indices = True , |
|||
assignment_op = "=" |
|||
) |
This function generates code to assign to a (pre-declared) scalar.
Keyword arguments:
True
to replace matrix[i,j] with matrix_i_j (And similarly for vectors)def sympy_fe_utilities.OutputScalar_CollectingFactors | ( | A, | |
name, | |||
language, | |||
indentation_level = 0 , |
|||
optimizations = 'basic' , |
|||
replace_indices = True , |
|||
assignment_op = "=" |
|||
) |
This method collects the constants of the replacement for vectors.
Keyword arguments:
True
to replace matrix[i,j] with matrix_i_j (And similarly for vectors)def sympy_fe_utilities.OutputSymbolicVariable | ( | expression, | |
language, | |||
replace_indices = True |
|||
) |
This function generates code from an expression.
Keyword arguments:
True
to replace matrix[i,j] with matrix_i_j (And similarly for vectors) def sympy_fe_utilities.OutputSymbolicVariableDeclaration | ( | expression, | |
name, | |||
language, | |||
indentation_level = 0 , |
|||
replace_indices = True |
|||
) |
This function generates code to declare and assign an expression, such as:
Keyword arguments:
True
to replace matrix[i,j] with matrix_i_j (And similarly for vectors) def sympy_fe_utilities.OutputVector | ( | vector_expression, | |
name, | |||
language, | |||
indentation_level = 0 , |
|||
replace_indices = True , |
|||
assignment_op = "=" |
|||
) |
This function generates code to fill a (pre-declared) vector.
Keyword arguments:
True
to replace matrix_i_j with matrix[i,j] (And similarly for vectors)def sympy_fe_utilities.OutputVector_CollectingFactors | ( | A, | |
name, | |||
language, | |||
indentation_level = 0 , |
|||
max_index = None , |
|||
optimizations = 'basic' , |
|||
replace_indices = True , |
|||
assignment_op = "=" |
|||
) |
This method collects the constants of the replacement for vectors.
Keyword arguments:
True
to replace matrix[i,j] with matrix_i_j (And similarly for vectors)def sympy_fe_utilities.StrainToVoigt | ( | M | ) |
This method transform the strains matrix to Voigt notation.
Keyword arguments:
def sympy_fe_utilities.SubstituteMatrixValue | ( | where_to_substitute, | |
what_to_substitute, | |||
substituted_value | |||
) |
This method substitutes values into a matrix.
Keyword arguments:
def sympy_fe_utilities.SubstituteMatrixValueByVoigtSymbols | ( | where_to_substitute, | |
what_to_substitute, | |||
substituted_value, | |||
is_strain | |||
) |
This method substitutes values into a matrix.
Note that this is intended to be used to substitute matrix indices by their corresponding Voigt ones
Keyword arguments:
def sympy_fe_utilities.SubstituteScalarValue | ( | where_to_substitute, | |
what_to_substitute, | |||
substituted_value | |||
) |
This method substitutes values into a scalar.
Keyword arguments: