diff options
author | brenda-br | 2023-02-23 22:14:39 +0530 |
---|---|---|
committer | brenda-br | 2023-02-23 22:14:39 +0530 |
commit | d476d2e053f937c0060f696312f301591e4f43ea (patch) | |
tree | 5d1643ba487082f986d8cc1868fba482293f1e37 /src/main/Simulator/Flowsheet_model.h | |
parent | c5f533673ea9ab4315e76940f6d014e349f97884 (diff) | |
download | Chemical-Simulator-GUI-d476d2e053f937c0060f696312f301591e4f43ea.tar.gz Chemical-Simulator-GUI-d476d2e053f937c0060f696312f301591e4f43ea.tar.bz2 Chemical-Simulator-GUI-d476d2e053f937c0060f696312f301591e4f43ea.zip |
Restructure Code -1
Diffstat (limited to 'src/main/Simulator/Flowsheet_model.h')
-rw-r--r-- | src/main/Simulator/Flowsheet_model.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/src/main/Simulator/Flowsheet_model.h b/src/main/Simulator/Flowsheet_model.h new file mode 100644 index 0000000..332b292 --- /dev/null +++ b/src/main/Simulator/Flowsheet_model.h @@ -0,0 +1,98 @@ +/* Simulation code for Flowsheet generated by the OpenModelica Compiler v1.12.0 (64-bit). */ +#if !defined(Flowsheet__MODEL_H) +#define Flowsheet__MODEL_H +#include "openmodelica.h" +#include "openmodelica_func.h" +#include "simulation_data.h" +#include "simulation/simulation_info_json.h" +#include "simulation/simulation_runtime.h" +#include "util/omc_error.h" +#include "simulation/solver/model_help.h" +#include "simulation/solver/delay.h" +#include "simulation/solver/linearSystem.h" +#include "simulation/solver/nonlinearSystem.h" +#include "simulation/solver/mixedSystem.h" + +#include <string.h> + +#include "Flowsheet_functions.h" + +#define Simulator_Files_ThermodynamicFunctions_HLiqId_index 0 +#define Simulator_Files_ThermodynamicFunctions_HV_index 1 +#define Simulator_Files_ThermodynamicFunctions_HVapId_index 2 +#define Simulator_Files_ThermodynamicFunctions_LiqCpId_index 3 +#define Simulator_Files_ThermodynamicFunctions_Psat_index 4 +#define Simulator_Files_ThermodynamicFunctions_SId_index 5 +#define Simulator_Files_ThermodynamicFunctions_VapCpId_index 6 + +extern void Flowsheet_callExternalObjectDestructors(DATA *_data, threadData_t *threadData); +#if !defined(OMC_NUM_NONLINEAR_SYSTEMS) || OMC_NUM_NONLINEAR_SYSTEMS>0 +extern void Flowsheet_initialNonLinearSystem(int nNonLinearSystems, NONLINEAR_SYSTEM_DATA *data); +#endif +#if !defined(OMC_NUM_LINEAR_SYSTEMS) || OMC_NUM_LINEAR_SYSTEMS>0 +extern void Flowsheet_initialLinearSystem(int nLinearSystems, LINEAR_SYSTEM_DATA *data); +#endif +#if !defined(OMC_NUM_MIXED_SYSTEMS) || OMC_NUM_MIXED_SYSTEMS>0 +#endif +#if !defined(OMC_NO_STATESELECTION) +extern void Flowsheet_initializeStateSets(int nStateSets, STATE_SET_DATA* statesetData, DATA *data); +#endif +extern int Flowsheet_functionAlgebraics(DATA *data, threadData_t *threadData); +extern int Flowsheet_function_storeDelayed(DATA *data, threadData_t *threadData); +extern int Flowsheet_updateBoundVariableAttributes(DATA *data, threadData_t *threadData); +extern int Flowsheet_functionInitialEquations(DATA *data, threadData_t *threadData); +extern int Flowsheet_functionInitialEquations_lambda0(DATA *data, threadData_t *threadData); +extern int Flowsheet_functionRemovedInitialEquations(DATA *data, threadData_t *threadData); +extern int Flowsheet_updateBoundParameters(DATA *data, threadData_t *threadData); +extern int Flowsheet_checkForAsserts(DATA *data, threadData_t *threadData); +extern int Flowsheet_function_ZeroCrossingsEquations(DATA *data, threadData_t *threadData); +extern int Flowsheet_function_ZeroCrossings(DATA *data, threadData_t *threadData, double* gout); +extern int Flowsheet_function_updateRelations(DATA *data, threadData_t *threadData, int evalZeroCross); +extern int Flowsheet_checkForDiscreteChanges(DATA *data, threadData_t *threadData); +extern const char* Flowsheet_zeroCrossingDescription(int i, int **out_EquationIndexes); +extern const char* Flowsheet_relationDescription(int i); +extern void Flowsheet_function_initSample(DATA *data, threadData_t *threadData); +extern int Flowsheet_initialAnalyticJacobianG(void* data, threadData_t *threadData); +extern int Flowsheet_initialAnalyticJacobianA(void* data, threadData_t *threadData); +extern int Flowsheet_initialAnalyticJacobianB(void* data, threadData_t *threadData); +extern int Flowsheet_initialAnalyticJacobianC(void* data, threadData_t *threadData); +extern int Flowsheet_initialAnalyticJacobianD(void* data, threadData_t *threadData); +extern int Flowsheet_functionJacG_column(void* data, threadData_t *threadData); +extern int Flowsheet_functionJacA_column(void* data, threadData_t *threadData); +extern int Flowsheet_functionJacB_column(void* data, threadData_t *threadData); +extern int Flowsheet_functionJacC_column(void* data, threadData_t *threadData); +extern int Flowsheet_functionJacD_column(void* data, threadData_t *threadData); +extern const char* Flowsheet_linear_model_frame(void); +extern const char* Flowsheet_linear_model_datarecovery_frame(void); +extern int Flowsheet_mayer(DATA* data, modelica_real** res, short *); +extern int Flowsheet_lagrange(DATA* data, modelica_real** res, short *, short *); +extern int Flowsheet_pickUpBoundsForInputsInOptimization(DATA* data, modelica_real* min, modelica_real* max, modelica_real*nominal, modelica_boolean *useNominal, char ** name, modelica_real * start, modelica_real * startTimeOpt); +extern int Flowsheet_setInputData(DATA *data, const modelica_boolean file); +extern int Flowsheet_getTimeGrid(DATA *data, modelica_integer * nsi, modelica_real**t); +extern void Flowsheet_function_initSynchronous(DATA * data, threadData_t *threadData); +extern void Flowsheet_function_updateSynchronous(DATA * data, threadData_t *threadData, long i); +extern int Flowsheet_function_equationsSynchronous(DATA * data, threadData_t *threadData, long i); +extern void Flowsheet_read_input_fmu(MODEL_DATA* modelData, SIMULATION_INFO* simulationData); +extern void Flowsheet_function_savePreSynchronous(DATA *data, threadData_t *threadData); +extern int Flowsheet_inputNames(DATA* data, char ** names); +extern int Flowsheet_initializeDAEmodeData(DATA *data, DAEMODE_DATA*); +extern int Flowsheet_functionLocalKnownVars(DATA*, threadData_t*); +extern int Flowsheet_symbolicInlineSystem(DATA*, threadData_t*); + +#include "Flowsheet_literals.h" + + + + +#if defined(HPCOM) && !defined(_OPENMP) + #error "HPCOM requires OpenMP or the results are wrong" +#endif +#if defined(_OPENMP) + #include <omp.h> +#else + /* dummy omp defines */ + #define omp_get_max_threads() 1 +#endif + +#endif + |