OGS
ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface Class Reference

Detailed Description

Base class for BHENetwork. This class will get Python bindings and is intended to be to be derived in Python.

Definition at line 18 of file BHEInflowPythonBoundaryConditionPythonSideInterface.h.

#include <BHEInflowPythonBoundaryConditionPythonSideInterface.h>

Inheritance diagram for ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface:
[legend]

Public Member Functions

virtual std::tuple< double, std::vector< double >, std::vector< double >, std::vector< int >, std::vector< double > > initializeDataContainer () const
 
virtual std::tuple< bool, bool, std::vector< double >, std::vector< double > > tespySolver (double, std::vector< double > const &, std::vector< double > const &) const
 
virtual std::tuple< std::vector< double >, std::vector< double > > serverCommunication (double, double, std::vector< double > const &, std::vector< double > const &, std::vector< double > const &) const
 
bool isOverriddenEssential () const
 
bool isOverriddenTespy () const
 
bool isOverriddenServerCommunication () const
 
virtual ~BHEInflowPythonBoundaryConditionPythonSideInterface ()=default
 

Public Attributes

std::tuple< double, std::vector< double >, std::vector< double >, std::vector< int >, std::vector< double > > dataframe_network
 

Private Attributes

bool _overridden_essential = true
 
bool _overridden_tespy = true
 
bool _overridden_server_communication = true
 

Constructor & Destructor Documentation

◆ ~BHEInflowPythonBoundaryConditionPythonSideInterface()

virtual ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::~BHEInflowPythonBoundaryConditionPythonSideInterface ( )
virtualdefault

Member Function Documentation

◆ initializeDataContainer()

virtual std::tuple<double , std::vector<double> , std::vector<double> , std::vector<int> , std::vector<double> > ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::initializeDataContainer ( ) const
inlinevirtual

Initialize network dataframe return a tuple (time, BHE inflow temperature, BHE outflow temperature, BHE outflow bc node id, BHE flowrate) set at that position and the parameters of the BHE network.

Reimplemented in ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterfaceTrampoline.

Definition at line 32 of file BHEInflowPythonBoundaryConditionPythonSideInterface.h.

33  {
34  _overridden_essential = false;
35  return std::tuple<double,
36  std::vector<double>,
37  std::vector<double>,
38  std::vector<int>,
39  std::vector<double>>{
40  std::numeric_limits<double>::quiet_NaN(), {}, {}, {}, {}};
41  }

References _overridden_essential.

◆ isOverriddenEssential()

bool ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::isOverriddenEssential ( ) const
inline

Tells if initializeDataContainer() has been overridden in the derived class in Python.

Precondition
initializeDataContainer() must already have been called once.

Definition at line 89 of file BHEInflowPythonBoundaryConditionPythonSideInterface.h.

89 { return _overridden_essential; }

References _overridden_essential.

◆ isOverriddenServerCommunication()

bool ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::isOverriddenServerCommunication ( ) const
inline

◆ isOverriddenTespy()

bool ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::isOverriddenTespy ( ) const
inline

◆ serverCommunication()

virtual std::tuple<std::vector<double>, std::vector<double> > ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::serverCommunication ( double  ,
double  ,
std::vector< double > const &  ,
std::vector< double > const &  ,
std::vector< double > const &   
) const
inlinevirtual

transfer BHE network dataframe to python script where function serverCommunication takes t, dt, Tin_val, Tout_val, BHE_flowrate as arguments and returns updated Tin_val and flowrate after each time step specific use case: interface between OGS and SimulationX via TCP/IP where OGS is connected as one client

Returns
a tuple (BHE Tin value, BHE flow rate for all BHEs from serverCommunication)

Reimplemented in ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterfaceTrampoline.

Definition at line 74 of file BHEInflowPythonBoundaryConditionPythonSideInterface.h.

79  {
81  return {};
82  }

References _overridden_server_communication.

Referenced by ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::postTimestepConcreteProcess().

◆ tespySolver()

virtual std::tuple<bool, bool, std::vector<double>, std::vector<double> > ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::tespySolver ( double  ,
std::vector< double > const &  ,
std::vector< double > const &   
) const
inlinevirtual

transfer BHE network dataframe to TESPy and get Tin and flow rate from TESPy

Returns
a tuple (if use tespyThermalSolver, if convergence achieved in tespy, BHE Tin value, BHE flow rate from TESPy) indicating if tespyThermalSolver shall be used at that position, if themal convergence has been achieved in the tespy, the new inflow temperature and flow rate for all BHEs.

Reimplemented in ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterfaceTrampoline.

Definition at line 54 of file BHEInflowPythonBoundaryConditionPythonSideInterface.h.

57  {
58  _overridden_tespy = false;
59  return std::tuple<bool, bool, std::vector<double>, std::vector<double>>{
60  false, false, {}, {}};
61  }

References _overridden_tespy.

Referenced by ProcessLib::bheInflowpythonBindBoundaryCondition(), and ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::postIterationConcreteProcess().

Member Data Documentation

◆ _overridden_essential

bool ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::_overridden_essential = true
mutableprivate

Tells if initializeDataContainer() has been overridden in the derived class in Python.

Definition at line 119 of file BHEInflowPythonBoundaryConditionPythonSideInterface.h.

Referenced by initializeDataContainer(), and isOverriddenEssential().

◆ _overridden_server_communication

bool ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::_overridden_server_communication = true
mutableprivate

Tells if serverCommunication() has been overridden in the derived class in Python.

Definition at line 125 of file BHEInflowPythonBoundaryConditionPythonSideInterface.h.

Referenced by isOverriddenServerCommunication(), and serverCommunication().

◆ _overridden_tespy

bool ProcessLib::BHEInflowPythonBoundaryConditionPythonSideInterface::_overridden_tespy = true
mutableprivate

Tells if tespySolver() has been overridden in the derived class in Python.

Definition at line 122 of file BHEInflowPythonBoundaryConditionPythonSideInterface.h.

Referenced by isOverriddenTespy(), and tespySolver().

◆ dataframe_network


The documentation for this class was generated from the following file: