Itasca C++ Interface
Loading...
Searching...
No Matches
contactmodelfluid.h
1#pragma once
2// contactmodelfluid.h
3
4#include "contactmodel/interface/icontactmodelfluid.h"
5#include "contactmodel.h"
6
7#ifndef __GNUC__
8#pragma warning(push)
9#pragma warning(disable : 4251)
10#endif
11namespace itascaxd {
12 class IContactFluid;
13 class IContactMechanical;
14}
15
16namespace cmodelsxd {
17 using namespace itasca;
18 using namespace itascaxd;
19
20 class ContactModelFluidState : public ContactModelState { //DPfuture: remove?
21 public:
23 : gapInc_(0.0), dp_geom_(0.0) {};
24
25 ~ContactModelFluidState() override{};
26
27 virtual const IContactFluid* getFluidContact() const = 0;
28 virtual const IContactMechanical* getMechanicalContact() const = 0;
29 const IProgram* getProgram() const override = 0;
30
31 double gapInc_; // gap increment in contact since last coupling step
32 double dp_geom_; // strain-induced pressure increment
33 };
34
35 class CONTACTMODEL_EXPORT ContactModelFluid : public IContactModelFluid,
36 public ContactModel {
37 public:
39 ~ContactModelFluid() override;
40
41 static const char* getPluginPrefix() { return "contactmodelfluid"; }
42 static const char* getPluginDirectory() { return "contactmodels/fluid"; }
43 IContactModel* getContactModel() override { return this; }
44 const IContactModel* getContactModel() const override { return this; }
45
46 virtual bool endPropertyUpdated(const QString& name, const IContactFluid* c) = 0;
47 virtual bool validate( ContactModelFluidState* state ) = 0;
48 virtual bool checkActivity( ContactModelFluidState* state ) const = 0;
49 double getActivityDistance() const override { return 0.0; }
50
51 virtual double getMassDensity() const {
52 throw Exception( "Fluid model %1 does not have property mass density.", getName() );
53 }
54 virtual double getMobilityCoef() const {
55 throw Exception( "Fluid model %1 does not have property mobility coefficient.", getName() );
56 }
57 virtual double getSpecificStorage() const {
58 throw Exception( "Fluid model %1 does not have property specific storage.", getName() );
59 }
60
61 // For contact specific plotting
62 void getSphereList(const IContact*, std::vector<DVect>*, std::vector<double>*,
63 std::vector<double>*) override {}
64#ifdef THREED
65 void getDiskList(const IContact*, std::vector<DVect>*, std::vector<DVect>*,
66 std::vector<double>*, std::vector<double>*) override {}
67#endif
68 void getCylinderList(const IContact*, std::vector<DVect>*, std::vector<DVect>*,
69 std::vector<double>*, std::vector<double>*, std::vector<double>*) override {}
70 };
71}
72#ifndef __GNUC__
73#pragma warning(pop)
74#endif
Base exception class for all Itasca code.
Definition baseexception.h:10
Definition contactmodelfluid.h:36
void getSphereList(const IContact *, std::vector< DVect > *, std::vector< double > *, std::vector< double > *) override
For contact specific plotting.
Definition contactmodelfluid.h:62
void getCylinderList(const IContact *, std::vector< DVect > *, std::vector< DVect > *, std::vector< double > *, std::vector< double > *, std::vector< double > *) override
For contact specific plotting.
Definition contactmodelfluid.h:68
Definition contactmodelfluid.h:20
const IProgram * getProgram() const override=0
Return a const pointer to the IPrgram interface.
Contact model implementation.
Definition contactmodel.h:77
The ContactModelState class holds necessary information to communicate back and forth between the cod...
Definition contactmodel.h:45
The main program access point.
Definition iprogram.h:37
Definition icontactfluid.h:17
Contact class.
Definition icontact.h:33
ContactMechanical class.
Definition icontactmechanical.h:37
Contact model class.
EXPORT_TAG const char * getName()
Definition fishexample.cpp:43
namespace Itasca
Definition basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4