HydroFemPhysics
The GeMA Hydraulic FEM Physics Plugin
Loading...
Searching...
No Matches
inc
gmpInterfaceFlow.h
Go to the documentation of this file.
1
/************************************************************************
2
**
3
** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4
** All rights reserved.
5
**
6
** This file is part of the "GeMA" software. It's use should respect
7
** the terms in the license agreement that can be found together
8
** with this source code.
9
** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10
** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11
** A PARTICULAR PURPOSE.
12
**
13
************************************************************************/
14
24
#ifndef _GEMA_PLUGIN_HYDRAULIC_INTERFACEFLOW_H_
25
#define _GEMA_PLUGIN_HYDRAULIC_INTERFACEFLOW_H_
26
27
#include "
gmpHydraulicInterface.h
"
28
#include <
gmTrace.h
>
29
#include <math.h>
30
31
33
template
<
class
T>
class
GmpInterfaceFlow
:
public
T
34
{
35
public
:
36
GmpInterfaceFlow
(
const
char
* pluginType,
GmSimulationData
* simulation,
QString
id
,
QString
description,
37
const
GmpFemPhysicsCommonMaterialFactory* matFactory,
const
GmLogCategory
& logger)
38
: T(pluginType, simulation,
id
, description, matFactory, logger)
39
{}
40
41
protected
:
42
// Comments on the base class
43
virtual
double
fillBpMatrix(
const
GmShape
* shape,
const
GmVector
& ncoord,
const
GmMatrix
& X,
const
GmVector
& N,
const
GmMatrix
& J,
GmMatrix
& Bp)
44
{
45
S_TRACE
();
46
Q_UNUSED(X); Q_UNUSED(N);
47
48
return
shape->
shapeCartesianPartialsFromJacobian
(ncoord, J, Bp,
true
);
49
}
50
};
51
53
54
template
<
class
T>
class
GmpInterfaceAxFlow
:
public
T
55
{
56
public
:
57
GmpInterfaceAxFlow
(
const
char
* pluginType,
GmSimulationData
* simulation,
QString
id
,
QString
description,
58
const
GmpFemPhysicsCommonMaterialFactory* matFactory,
const
GmLogCategory
& logger)
59
: T(pluginType, simulation,
id
, description, matFactory, logger)
60
{}
61
62
protected
:
63
// Comments on the base class
64
virtual
double
fillBpMatrix(
const
GmShape
* shape,
const
GmVector
& ncoord,
const
GmMatrix
& X,
const
GmVector
& N,
const
GmMatrix
& J,
GmMatrix
& Bp)
65
{
66
S_TRACE
();
67
Q_UNUSED(X); Q_UNUSED(N);
68
//int n = Bp.n_cols;
69
//double rGauss = 0.0;
70
//for(int j = 0; j < n; ++j)
71
// rGauss += N(j)*X(0, j);
72
73
double
detJ = shape->
shapeCartesianPartialsFromJacobian
(ncoord, J, Bp,
true
);
74
75
//for(int k = 0; k < n; ++k)
76
// Bp(0, k) = Bp(0, k)/rGauss;
77
78
return
detJ;
79
}
80
81
// Comments on the base class
82
virtual
double
axisymmetricFactor(
const
GmElement
* e,
const
GmMatrix
& MX,
const
GmVector
& N)
const
83
{
84
S_TRACE
();
85
assert(e);
86
// number of nodes
87
int
n = e->
numNodes
();
88
int
d = GmpFemPhysicsCommon::nodeDim();
89
// number of nodes for tri-nodded interface elements
90
if
(e->
type
() ==
GM_INT2DL6
)
91
{
92
n = n - pow(2, d - 1);
93
}
94
assert(MX.n_rows == n / 2 && MX.n_cols == d);
95
96
double
rGauss = 0.0;
97
for
(
int
j = 0; j < n / 2; ++j)
98
rGauss += N(j)*MX(j, 0);
99
100
return
2 * arma::datum::pi * rGauss;
101
}
102
};
103
104
#endif
GmCell::numNodes
virtual int numNodes() const=0
GmCell::type
virtual GmCellType type() const=0
GmElement
GmLogCategory
GmShape
GmShape::shapeCartesianPartialsFromJacobian
virtual double shapeCartesianPartialsFromJacobian(const GmVector &ncoord, const GmMatrix &J, GmMatrix &dN, bool transposed=false) const
GmSimulationData
GmpInterfaceAxFlow
Hydraulic Axissymetric interface.
Definition
gmpInterfaceFlow.h:55
GmpInterfaceFlow
Hydraulic zero-thickness interface 2D & 3D for Int2dl4, Int2dl6, and Int3dl8.
Definition
gmpInterfaceFlow.h:34
GM_INT2DL6
GM_INT2DL6
GmMatrix
arma::mat GmMatrix
gmTrace.h
S_TRACE
#define S_TRACE()
GmVector
arma::vec GmVector
gmpHydraulicInterface.h
Declaration of the GmpHydraulicInterface classes.
QString
Generated on Mon Aug 3 2026 09:57:40 for HydroFemPhysics by
1.12.0