HydroFemPhysics
The GeMA Hydraulic FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialBrinkman.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_MATERIAL_BRINKMAN_H_
25#define _GEMA_PLUGIN_HYDRAULIC_MATERIAL_BRINKMAN_H_
26
27#include "gmpHydraulic.h"
28
29#include <gmpFemPhysicsCommonMaterial.h>
30#include <gmTrace.h>
31#include <assert.h>
32
33class GMP_HYDRAULIC_PHYSICS_API_EXPORT GmpHydraulicMaterialBrinkman : public GmpFemPhysicsCommonMaterial
34{
35protected:
38 {
43
44
45 // --- NO ADDING BELOW THIS LINE
47 };
48
49public:
50
52 GmpHydraulicMaterialBrinkman(int typeIndex, QString typeName, const GmLogCategory& logger)
53 : GmpFemPhysicsCommonMaterial(typeIndex, typeName, logger) {}
54
56 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
57 {
58 Q_UNUSED(simulation);
59 return new GmpHydraulicMaterialBrinkman(typeIndex, typeName, logger);
60 }
61
62 // set dual porosity material map
63 virtual const QVariantMap* materialMetaDataMap();
64
66 virtual void permeability(const GmElement* e, const GmVector* coord, int ip, GmMatrix& K) const;
67
69 virtual double fluidDensity(const GmElement* e, const GmVector* coord, int ip) const
70 {
71 S_TRACE(); assert(e);
72 //Accessor
73 GmCellAccessor* rhowAcc = propertyAc(rhof_ID);
74
75 if (rhowAcc == NULL)
76 {
77 return 0.0;
78 }
79 return rhowAcc->scalarValueAt(e, coord, ip);
80 }
81
83 virtual double fluidViscosity(const GmElement* e, const GmVector* coord, int ip) const
84 {
85 S_TRACE(); assert(e);
86 return propertyAc(muf_ID)->scalarValueAt(e, coord, ip);
87 }
88
90 virtual double fluidEffectiveViscosity(const GmElement* e, const GmVector* coord, int ip) const
91 {
92 S_TRACE(); assert(e);
93 return propertyAc(mufef_ID)->scalarValueAt(e, coord, ip);
94 }
95};
96
97
98#endif
Definition gmpMaterialBrinkman.h:34
virtual double fluidViscosity(const GmElement *e, const GmVector *coord, int ip) const
Returns the fluid viscosity - Darcy.
Definition gmpMaterialBrinkman.h:83
virtual double fluidDensity(const GmElement *e, const GmVector *coord, int ip) const
Returns the fluid density.
Definition gmpMaterialBrinkman.h:69
GmpHydraulicMaterialBrinkman(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialBrinkman.h:52
static GmpFemPhysicsCommonMaterial * instance(GmSimulationData *simulation, int typeIndex, QString typeName, const GmLogCategory &logger)
A "factory" function used to register the material with the physics material factory.
Definition gmpMaterialBrinkman.h:56
virtual double fluidEffectiveViscosity(const GmElement *e, const GmVector *coord, int ip) const
Returns the fluid effective viscosity - Stokes.
Definition gmpMaterialBrinkman.h:90
BrinkmanElementPropertyIds
IDs for saturated material element properties.
Definition gmpMaterialBrinkman.h:38
@ mufef_ID
Id for retrieving the fluid effective viscosity - Stokes.
Definition gmpMaterialBrinkman.h:42
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialBrinkman.h:46
@ muf_ID
Id for retrieving the fluid viscosity - Darcy.
Definition gmpMaterialBrinkman.h:41
@ rhof_ID
Id for retrieving the density of fluid.
Definition gmpMaterialBrinkman.h:40
@ K_ID
Id for retrieving the permeability tensor accessor.
Definition gmpMaterialBrinkman.h:39
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of the gmpHydraulic classes.