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.
|
#include <enrichment_utilities_duplicate_dofs.h>
Static Public Member Functions | |
template<class TMatrixType , class TVectorType , class TGradientType > | |
static int | CalculateTetrahedraEnrichedShapeFuncions (TMatrixType const &rPoints, TGradientType const &DN_DX, TVectorType &rDistances, TVectorType &rVolumes, TMatrixType &rShapeFunctionValues, TVectorType &rPartitionsSign, std::vector< TMatrixType > &rGradientsValue, TMatrixType &NEnriched) |
This function implements the calculation of enrichment functions, where the position of the discontinuity is prescribed by giving a level set function prescribing the distance the enrichmenet surface. WARNING: the function works only for simplicial elements (Triangles and tetrahedras) TODO: only implemented for Tetrahedras so far
The essential idea is that the element is divided by the level set functions into 2 parts one + and the other - let's suppose for a moment that nodes 1 and 2 (in local numeration) lay on the negative side and nodes 3,4 on the positive side if N1, N2, N3, N4 are the shape functions "centered" in the node with corresponding id, the enrichment shape functions are defined as follows:
POSITIVE SIDE N1enriched = N1, N2enriched = N2, N3enriched=0, N4enriched=0
NEGATIVE SIDE N1enriched = 0, N2enriched = 0, N3enriched=N3, N4enriched=N4
the combination of the original element shape functions and of thos enrichements can model a discontinuity and a discontinuity of the gradient of the function to be enriched.
WARNING: difficulties can be expected if the division prescribed passes exactly in one node or if one of the two sides has a volume approximately 0. In this case the definition above works correctly but the use of the enrichment shape functions requires some care
|
inlinestatic |
The method to calculate the ernriched shape functions for given tetrahedra. 4 ENRICHED SHAPE FUNCTIONS ARE GENERATED!!
rPoints | A 4x3 matrix where row i has the coordinates of node i. |
DN_DX | The gradient of the shape functions Ni respect to the reference coordinates |
rDistances | is an input vector of 4 size which holds relative distance (not need to be exact) for each node. it is used internally to mark the position of the zero level |
rVolumes | Result vector with size 6 (maximumn number of partitions) holding the volume of each partition |
rShapeFunctionValues | Result 6x4 matrix where each row represents a partition and holds the shape functions N1 to N4 of the original tetrahedra evaluated in the gauss point (center) of the partition. so that it is N(gauss_index, node_index) |
rPartitionsSign | A result vector of 6 holding the sign of the distance for the partition. The value -1 represents the negative distance sign, 1 represents positive distance and 0 stands for not used partition |
rGradientsValue | Restult vector of size 6 holding the gradient of the enriched shape funciton for each volume. Each element of vector is a 4*3 matrix representing the gradient of enriched shape functions. The use of matrix is for possible future improvement. |
Nenriched | is a Matrix that contains for every gauss point the values of the enriched shape functions at the position of the gauss point so that Nenriched(1,0) contains the value of the enriched shape function "0" at the gauss point "1" |