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.
|
This utility can be used to calculate the enriched shape function for tetrahedra element. More...
#include <enrich_2d_2dofs.h>
Static Public Member Functions | |
template<class TMatrixType , class TVectorType , class TGradientType > | |
static int | CalculateTriangleEnrichedShapeFuncions (TMatrixType const &rPoints, TGradientType const &DN_DX, TVectorType rDistances, TVectorType &rVolumes, TMatrixType &rGPShapeFunctionValues, TVectorType &rPartitionsSign, std::vector< TMatrixType > &rGradientsValue, TMatrixType &NEnriched, TVectorType &face_gauss_N, TVectorType &face_gauss_Nenriched, double &face_Area, TVectorType &face_n, unsigned int &type_of_cut) |
This utility can be used to calculate the enriched shape function for tetrahedra element.
The metodology consists in partitioning the tetrahedra in a set of sub-tetrahedra and calculate the enrichment information using these partitions.
|
inlinestatic |
The method to calculate the ernriched shape functions for given triangle Basically, two shape functions are provided, 1)one is the enrichment to capturate discontinuities in the gradients of the pressure ("Improving Eulerian two-phase flow finite element approximation with discontinuous gradient (i.e pressure) shape functions" Coppola-Owen and Codina) 2) the second one is to capturate discontinuities in the varialbe(ie. pressure). it is a shape function that is zero on the nodes and has a constant discontinuity along the found interfase)
rPoints | A 3x3 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 3 size which holds relative distance for each node. it is used internally to mark the position of the zero level |
rVolumes | Result vector with size (3+1) (maximum number of partitions) holding the volume of each partition. Partitions are given in the following order: first the one that is "alone". meaning that it is on the side of the interfase where there's only a triangle and the other 2 are the ones in the other side. So the paritition signs will be allways -1,1,1 or 1,-1,-1 Note:volume 4 is not a partition itself, but is added to be used in the element. it would be the result of creating the 2 triangles of the cuadrilateral paritition with the opposite edge as the current configuration (joining node k_aux with node_4 instead of the current node_j-node5) |
rShapeFunctionValues | Result 3x3 matrix where each row represents a partition and holds the shape functions N1 to N3 ( the cut) of the original triangle evaluated in the gauss point (center) of the partition. so that it is N(gauss_index, node_index) |
rPartitionsSign | A result vector of 3 holding the sign of the distance for the partition. Read rVolumes 5 lines above The value -1 represents the negative distance sign, 1 represents positive distance and 0 stands for not used partition |
rGradientsValue | Restult vector of size 3 holding the gradient of the enriched shape funciton for each volume. Each element of vector is a 1x3 matrix representing the gradient of enriched shape function. 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" |
face_gauss_N | is the location of the (single) integration point of the interfase: its midpoint. |
face_gauss_N_enrich | is the value of the enrichment shape functions in the integration point actually it's value is always the same so no need to use it: the shape functions were defined to make it 1 in the first shape function, And 1 and -1 the second shape function (it's discontinous, so it has these two values in the interfase) |
type_of_cut | the partition that is 'alone': the one that is on one side of the shape function the other two are the ones in the other side, meaning they have the same derivatives and , for example, densities. |