summaryrefslogtreecommitdiff
path: root/src/main/Simulator/Graph_02nls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/Simulator/Graph_02nls.c')
-rw-r--r--src/main/Simulator/Graph_02nls.c27227
1 files changed, 0 insertions, 27227 deletions
diff --git a/src/main/Simulator/Graph_02nls.c b/src/main/Simulator/Graph_02nls.c
deleted file mode 100644
index 649a6dd..0000000
--- a/src/main/Simulator/Graph_02nls.c
+++ /dev/null
@@ -1,27227 +0,0 @@
-/* Non Linear Systems */
-#include "Graph_model.h"
-#include "Graph_12jac.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* inner equations */
-
-/*
- equation index: 124
- type: SIMPLE_ASSIGN
- points[1]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[1].BIP[2,2,1], T[1])
- */
-void Graph_eqFunction_124(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,124};
- data->localData[0]->realVars[559] /* points[1]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[330],data->localData[0]->realVars[200] /* T[1] variable */,"T[1]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 125
- type: SIMPLE_ASSIGN
- points[1]._Gamma._sum1[2] = exp((-points[1].BIP[2,2,2]) * points[1].Gamma.tau[2,2])
- */
-void Graph_eqFunction_125(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,125};
- data->localData[0]->realVars[397] /* points[1]._Gamma._sum1[2] variable */ = exp(((-data->simulationInfo->realParameter[331])) * (data->localData[0]->realVars[559] /* points[1]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 126
- type: SIMPLE_ASSIGN
- points[1]._Gamma._sum2[2] = points[1].Gamma.tau[2,2] * points[1].Gamma.sum1[2]
- */
-void Graph_eqFunction_126(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,126};
- data->localData[0]->realVars[477] /* points[1]._Gamma._sum2[2] variable */ = (data->localData[0]->realVars[559] /* points[1]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[397] /* points[1]._Gamma._sum1[2] variable */);
- TRACE_POP
-}
-/*
- equation index: 127
- type: SIMPLE_ASSIGN
- points[1]._gamma[2] = exp(DIVISION(points[1].Gamma.sum2[2], points[1].Gamma.sum1[2]) + points[1].Gamma.tau[2,2] - DIVISION(points[1].Gamma.sum2[2], points[1].Gamma.sum1[2]))
- */
-void Graph_eqFunction_127(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,127};
- data->localData[0]->realVars[875] /* points[1]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[477] /* points[1]._Gamma._sum2[2] variable */,data->localData[0]->realVars[397] /* points[1]._Gamma._sum1[2] variable */,"points[1].Gamma.sum1[2]",equationIndexes) + data->localData[0]->realVars[559] /* points[1]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[477] /* points[1]._Gamma._sum2[2] variable */,data->localData[0]->realVars[397] /* points[1]._Gamma._sum1[2] variable */,"points[1].Gamma.sum1[2]",equationIndexes));
- TRACE_POP
-}
-
-void residualFunc129(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,129};
- real_array tmp0;
- /* iteration variables */
- data->localData[0]->realVars[200] /* T[1] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_124(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_125(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_126(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_127(data, threadData);
- /* body */
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11290], (modelica_real)data->simulationInfo->realParameter[11291], (modelica_real)data->simulationInfo->realParameter[11292], (modelica_real)data->simulationInfo->realParameter[11293], (modelica_real)data->simulationInfo->realParameter[11294], (modelica_real)data->simulationInfo->realParameter[11295]);
- res[0] = 1.0 + (-0.0001) * ((data->localData[0]->realVars[875] /* points[1]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[200] /* T[1] variable */)));
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS129(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS129(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[1] */
- sysData->nominal[i] = data->modelData->realVarsData[200].attribute /* T[1] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[200].attribute /* T[1] */.min;
- sysData->max[i++] = data->modelData->realVarsData[200].attribute /* T[1] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS129(sysData);
-}
-
-void getIterationVarsNLS129(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[200] /* T[1] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 141
- type: SIMPLE_ASSIGN
- points[2]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[2].BIP[2,2,1], T[2])
- */
-void Graph_eqFunction_141(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,141};
- data->localData[0]->realVars[563] /* points[2]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[338],data->localData[0]->realVars[201] /* T[2] variable */,"T[2]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 142
- type: SIMPLE_ASSIGN
- points[2]._Gamma._G[2,2] = exp((-points[2].BIP[2,2,2]) * points[2].Gamma.tau[2,2])
- */
-void Graph_eqFunction_142(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,142};
- data->localData[0]->realVars[245] /* points[2]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[339])) * (data->localData[0]->realVars[563] /* points[2]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 143
- type: SIMPLE_ASSIGN
- points[2]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[2].BIP[1,1,1], T[2])
- */
-void Graph_eqFunction_143(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,143};
- data->localData[0]->realVars[560] /* points[2]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[332],data->localData[0]->realVars[201] /* T[2] variable */,"T[2]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 144
- type: SIMPLE_ASSIGN
- points[2]._Gamma._G[1,1] = exp((-points[2].BIP[1,1,2]) * points[2].Gamma.tau[1,1])
- */
-void Graph_eqFunction_144(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,144};
- data->localData[0]->realVars[242] /* points[2]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[333])) * (data->localData[0]->realVars[560] /* points[2]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 145
- type: SIMPLE_ASSIGN
- points[2]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[2].BIP[1,2,1], T[2])
- */
-void Graph_eqFunction_145(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,145};
- data->localData[0]->realVars[561] /* points[2]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[334],data->localData[0]->realVars[201] /* T[2] variable */,"T[2]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 146
- type: SIMPLE_ASSIGN
- points[2]._Gamma._G[1,2] = exp((-points[2].BIP[1,2,2]) * points[2].Gamma.tau[1,2])
- */
-void Graph_eqFunction_146(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,146};
- data->localData[0]->realVars[243] /* points[2]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[335])) * (data->localData[0]->realVars[561] /* points[2]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 147
- type: SIMPLE_ASSIGN
- points[2]._Gamma._sum2[2] = 0.02564102564102564 * points[2].Gamma.tau[1,2] * points[2].Gamma.G[1,2] + 0.9743589743589743 * points[2].Gamma.tau[2,2] * points[2].Gamma.G[2,2]
- */
-void Graph_eqFunction_147(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,147};
- data->localData[0]->realVars[479] /* points[2]._Gamma._sum2[2] variable */ = (0.02564102564102564) * ((data->localData[0]->realVars[561] /* points[2]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[243] /* points[2]._Gamma._G[1,2] variable */)) + (0.9743589743589743) * ((data->localData[0]->realVars[563] /* points[2]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[245] /* points[2]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 148
- type: SIMPLE_ASSIGN
- points[2]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[2].BIP[2,1,1], T[2])
- */
-void Graph_eqFunction_148(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,148};
- data->localData[0]->realVars[562] /* points[2]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[336],data->localData[0]->realVars[201] /* T[2] variable */,"T[2]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 149
- type: SIMPLE_ASSIGN
- points[2]._Gamma._G[2,1] = exp((-points[2].BIP[2,1,2]) * points[2].Gamma.tau[2,1])
- */
-void Graph_eqFunction_149(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,149};
- data->localData[0]->realVars[244] /* points[2]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[337])) * (data->localData[0]->realVars[562] /* points[2]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 150
- type: SIMPLE_ASSIGN
- points[2]._Gamma._sum2[1] = 0.02564102564102564 * points[2].Gamma.tau[1,1] * points[2].Gamma.G[1,1] + 0.9743589743589743 * points[2].Gamma.tau[2,1] * points[2].Gamma.G[2,1]
- */
-void Graph_eqFunction_150(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,150};
- data->localData[0]->realVars[478] /* points[2]._Gamma._sum2[1] variable */ = (0.02564102564102564) * ((data->localData[0]->realVars[560] /* points[2]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[242] /* points[2]._Gamma._G[1,1] variable */)) + (0.9743589743589743) * ((data->localData[0]->realVars[562] /* points[2]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[244] /* points[2]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 151
- type: SIMPLE_ASSIGN
- points[2]._Gamma._sum1[2] = 0.02564102564102564 * points[2].Gamma.G[1,2] + 0.9743589743589743 * points[2].Gamma.G[2,2]
- */
-void Graph_eqFunction_151(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,151};
- data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */ = (0.02564102564102564) * (data->localData[0]->realVars[243] /* points[2]._Gamma._G[1,2] variable */) + (0.9743589743589743) * (data->localData[0]->realVars[245] /* points[2]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 152
- type: SIMPLE_ASSIGN
- points[2]._Gamma._sum1[1] = 0.02564102564102564 * points[2].Gamma.G[1,1] + 0.9743589743589743 * points[2].Gamma.G[2,1]
- */
-void Graph_eqFunction_152(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,152};
- data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */ = (0.02564102564102564) * (data->localData[0]->realVars[242] /* points[2]._Gamma._G[1,1] variable */) + (0.9743589743589743) * (data->localData[0]->realVars[244] /* points[2]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 153
- type: SIMPLE_ASSIGN
- points[2]._gamma[1] = exp(DIVISION(points[2].Gamma.sum2[1], points[2].Gamma.sum1[1]) + 0.02564102564102564 * points[2].Gamma.G[1,1] * DIVISION(points[2].Gamma.tau[1,1] - DIVISION(points[2].Gamma.sum2[1], points[2].Gamma.sum1[1]), points[2].Gamma.sum1[1]) + 0.9743589743589743 * points[2].Gamma.G[1,2] * DIVISION(points[2].Gamma.tau[1,2] - DIVISION(points[2].Gamma.sum2[2], points[2].Gamma.sum1[2]), points[2].Gamma.sum1[2]))
- */
-void Graph_eqFunction_153(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,153};
- data->localData[0]->realVars[876] /* points[2]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[478] /* points[2]._Gamma._sum2[1] variable */,data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes) + (0.02564102564102564) * ((data->localData[0]->realVars[242] /* points[2]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[560] /* points[2]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[478] /* points[2]._Gamma._sum2[1] variable */,data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes))) + (0.9743589743589743) * ((data->localData[0]->realVars[243] /* points[2]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[561] /* points[2]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[479] /* points[2]._Gamma._sum2[2] variable */,data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 154
- type: SIMPLE_ASSIGN
- points[2]._gamma[2] = exp(DIVISION(points[2].Gamma.sum2[2], points[2].Gamma.sum1[2]) + 0.02564102564102564 * points[2].Gamma.G[2,1] * DIVISION(points[2].Gamma.tau[2,1] - DIVISION(points[2].Gamma.sum2[1], points[2].Gamma.sum1[1]), points[2].Gamma.sum1[1]) + 0.9743589743589743 * points[2].Gamma.G[2,2] * DIVISION(points[2].Gamma.tau[2,2] - DIVISION(points[2].Gamma.sum2[2], points[2].Gamma.sum1[2]), points[2].Gamma.sum1[2]))
- */
-void Graph_eqFunction_154(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,154};
- data->localData[0]->realVars[877] /* points[2]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[479] /* points[2]._Gamma._sum2[2] variable */,data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes) + (0.02564102564102564) * ((data->localData[0]->realVars[244] /* points[2]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[562] /* points[2]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[478] /* points[2]._Gamma._sum2[1] variable */,data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes))) + (0.9743589743589743) * ((data->localData[0]->realVars[245] /* points[2]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[563] /* points[2]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[479] /* points[2]._Gamma._sum2[2] variable */,data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 155
- type: SIMPLE_ASSIGN
- points[2]._K[2] = 0.0001 * points[2].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[2].comp[2].VP[1], points[2].comp[2].VP[2], points[2].comp[2].VP[3], points[2].comp[2].VP[4], points[2].comp[2].VP[5], points[2].comp[2].VP[6]}, T[2])
- */
-void Graph_eqFunction_155(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,155};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11302], (modelica_real)data->simulationInfo->realParameter[11303], (modelica_real)data->simulationInfo->realParameter[11304], (modelica_real)data->simulationInfo->realParameter[11305], (modelica_real)data->simulationInfo->realParameter[11306], (modelica_real)data->simulationInfo->realParameter[11307]);
- data->localData[0]->realVars[718] /* points[2]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[877] /* points[2]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[201] /* T[2] variable */)));
- TRACE_POP
-}
-/*
- equation index: 156
- type: SIMPLE_ASSIGN
- points[2]._K[1] = 0.0001 * points[2].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[2].comp[1].VP[1], points[2].comp[1].VP[2], points[2].comp[1].VP[3], points[2].comp[1].VP[4], points[2].comp[1].VP[5], points[2].comp[1].VP[6]}, T[2])
- */
-void Graph_eqFunction_156(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,156};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11296], (modelica_real)data->simulationInfo->realParameter[11297], (modelica_real)data->simulationInfo->realParameter[11298], (modelica_real)data->simulationInfo->realParameter[11299], (modelica_real)data->simulationInfo->realParameter[11300], (modelica_real)data->simulationInfo->realParameter[11301]);
- data->localData[0]->realVars[717] /* points[2]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[876] /* points[2]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[201] /* T[2] variable */)));
- TRACE_POP
-}
-
-void residualFunc158(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,158};
- /* iteration variables */
- data->localData[0]->realVars[201] /* T[2] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_141(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_142(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_143(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_144(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_145(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_146(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_147(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_148(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_149(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_150(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_151(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_152(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_153(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_154(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_155(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_156(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.9743589743589743) * (data->localData[0]->realVars[718] /* points[2]._K[2] variable */) + (-0.02564102564102564) * (data->localData[0]->realVars[717] /* points[2]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS158(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS158(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[2] */
- sysData->nominal[i] = data->modelData->realVarsData[201].attribute /* T[2] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[201].attribute /* T[2] */.min;
- sysData->max[i++] = data->modelData->realVarsData[201].attribute /* T[2] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS158(sysData);
-}
-
-void getIterationVarsNLS158(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[201] /* T[2] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 163
- type: SIMPLE_ASSIGN
- points[3]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[3].BIP[2,2,1], T[3])
- */
-void Graph_eqFunction_163(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,163};
- data->localData[0]->realVars[567] /* points[3]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[346],data->localData[0]->realVars[202] /* T[3] variable */,"T[3]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 164
- type: SIMPLE_ASSIGN
- points[3]._Gamma._G[2,2] = exp((-points[3].BIP[2,2,2]) * points[3].Gamma.tau[2,2])
- */
-void Graph_eqFunction_164(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,164};
- data->localData[0]->realVars[249] /* points[3]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[347])) * (data->localData[0]->realVars[567] /* points[3]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 165
- type: SIMPLE_ASSIGN
- points[3]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[3].BIP[1,1,1], T[3])
- */
-void Graph_eqFunction_165(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,165};
- data->localData[0]->realVars[564] /* points[3]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[340],data->localData[0]->realVars[202] /* T[3] variable */,"T[3]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 166
- type: SIMPLE_ASSIGN
- points[3]._Gamma._G[1,1] = exp((-points[3].BIP[1,1,2]) * points[3].Gamma.tau[1,1])
- */
-void Graph_eqFunction_166(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,166};
- data->localData[0]->realVars[246] /* points[3]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[341])) * (data->localData[0]->realVars[564] /* points[3]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 167
- type: SIMPLE_ASSIGN
- points[3]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[3].BIP[1,2,1], T[3])
- */
-void Graph_eqFunction_167(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,167};
- data->localData[0]->realVars[565] /* points[3]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[342],data->localData[0]->realVars[202] /* T[3] variable */,"T[3]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 168
- type: SIMPLE_ASSIGN
- points[3]._Gamma._G[1,2] = exp((-points[3].BIP[1,2,2]) * points[3].Gamma.tau[1,2])
- */
-void Graph_eqFunction_168(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,168};
- data->localData[0]->realVars[247] /* points[3]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[343])) * (data->localData[0]->realVars[565] /* points[3]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 169
- type: SIMPLE_ASSIGN
- points[3]._Gamma._sum2[2] = 0.05128205128205128 * points[3].Gamma.tau[1,2] * points[3].Gamma.G[1,2] + 0.9487179487179487 * points[3].Gamma.tau[2,2] * points[3].Gamma.G[2,2]
- */
-void Graph_eqFunction_169(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,169};
- data->localData[0]->realVars[481] /* points[3]._Gamma._sum2[2] variable */ = (0.05128205128205128) * ((data->localData[0]->realVars[565] /* points[3]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[247] /* points[3]._Gamma._G[1,2] variable */)) + (0.9487179487179487) * ((data->localData[0]->realVars[567] /* points[3]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[249] /* points[3]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 170
- type: SIMPLE_ASSIGN
- points[3]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[3].BIP[2,1,1], T[3])
- */
-void Graph_eqFunction_170(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,170};
- data->localData[0]->realVars[566] /* points[3]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[344],data->localData[0]->realVars[202] /* T[3] variable */,"T[3]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 171
- type: SIMPLE_ASSIGN
- points[3]._Gamma._G[2,1] = exp((-points[3].BIP[2,1,2]) * points[3].Gamma.tau[2,1])
- */
-void Graph_eqFunction_171(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,171};
- data->localData[0]->realVars[248] /* points[3]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[345])) * (data->localData[0]->realVars[566] /* points[3]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 172
- type: SIMPLE_ASSIGN
- points[3]._Gamma._sum2[1] = 0.05128205128205128 * points[3].Gamma.tau[1,1] * points[3].Gamma.G[1,1] + 0.9487179487179487 * points[3].Gamma.tau[2,1] * points[3].Gamma.G[2,1]
- */
-void Graph_eqFunction_172(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,172};
- data->localData[0]->realVars[480] /* points[3]._Gamma._sum2[1] variable */ = (0.05128205128205128) * ((data->localData[0]->realVars[564] /* points[3]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[246] /* points[3]._Gamma._G[1,1] variable */)) + (0.9487179487179487) * ((data->localData[0]->realVars[566] /* points[3]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[248] /* points[3]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 173
- type: SIMPLE_ASSIGN
- points[3]._Gamma._sum1[2] = 0.05128205128205128 * points[3].Gamma.G[1,2] + 0.9487179487179487 * points[3].Gamma.G[2,2]
- */
-void Graph_eqFunction_173(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,173};
- data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */ = (0.05128205128205128) * (data->localData[0]->realVars[247] /* points[3]._Gamma._G[1,2] variable */) + (0.9487179487179487) * (data->localData[0]->realVars[249] /* points[3]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 174
- type: SIMPLE_ASSIGN
- points[3]._Gamma._sum1[1] = 0.05128205128205128 * points[3].Gamma.G[1,1] + 0.9487179487179487 * points[3].Gamma.G[2,1]
- */
-void Graph_eqFunction_174(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,174};
- data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */ = (0.05128205128205128) * (data->localData[0]->realVars[246] /* points[3]._Gamma._G[1,1] variable */) + (0.9487179487179487) * (data->localData[0]->realVars[248] /* points[3]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 175
- type: SIMPLE_ASSIGN
- points[3]._gamma[1] = exp(DIVISION(points[3].Gamma.sum2[1], points[3].Gamma.sum1[1]) + 0.05128205128205128 * points[3].Gamma.G[1,1] * DIVISION(points[3].Gamma.tau[1,1] - DIVISION(points[3].Gamma.sum2[1], points[3].Gamma.sum1[1]), points[3].Gamma.sum1[1]) + 0.9487179487179487 * points[3].Gamma.G[1,2] * DIVISION(points[3].Gamma.tau[1,2] - DIVISION(points[3].Gamma.sum2[2], points[3].Gamma.sum1[2]), points[3].Gamma.sum1[2]))
- */
-void Graph_eqFunction_175(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,175};
- data->localData[0]->realVars[878] /* points[3]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[480] /* points[3]._Gamma._sum2[1] variable */,data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes) + (0.05128205128205128) * ((data->localData[0]->realVars[246] /* points[3]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[564] /* points[3]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[480] /* points[3]._Gamma._sum2[1] variable */,data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes))) + (0.9487179487179487) * ((data->localData[0]->realVars[247] /* points[3]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[565] /* points[3]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[481] /* points[3]._Gamma._sum2[2] variable */,data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 176
- type: SIMPLE_ASSIGN
- points[3]._gamma[2] = exp(DIVISION(points[3].Gamma.sum2[2], points[3].Gamma.sum1[2]) + 0.05128205128205128 * points[3].Gamma.G[2,1] * DIVISION(points[3].Gamma.tau[2,1] - DIVISION(points[3].Gamma.sum2[1], points[3].Gamma.sum1[1]), points[3].Gamma.sum1[1]) + 0.9487179487179487 * points[3].Gamma.G[2,2] * DIVISION(points[3].Gamma.tau[2,2] - DIVISION(points[3].Gamma.sum2[2], points[3].Gamma.sum1[2]), points[3].Gamma.sum1[2]))
- */
-void Graph_eqFunction_176(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,176};
- data->localData[0]->realVars[879] /* points[3]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[481] /* points[3]._Gamma._sum2[2] variable */,data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes) + (0.05128205128205128) * ((data->localData[0]->realVars[248] /* points[3]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[566] /* points[3]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[480] /* points[3]._Gamma._sum2[1] variable */,data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes))) + (0.9487179487179487) * ((data->localData[0]->realVars[249] /* points[3]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[567] /* points[3]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[481] /* points[3]._Gamma._sum2[2] variable */,data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 177
- type: SIMPLE_ASSIGN
- points[3]._K[2] = 0.0001 * points[3].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[3].comp[2].VP[1], points[3].comp[2].VP[2], points[3].comp[2].VP[3], points[3].comp[2].VP[4], points[3].comp[2].VP[5], points[3].comp[2].VP[6]}, T[3])
- */
-void Graph_eqFunction_177(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,177};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11314], (modelica_real)data->simulationInfo->realParameter[11315], (modelica_real)data->simulationInfo->realParameter[11316], (modelica_real)data->simulationInfo->realParameter[11317], (modelica_real)data->simulationInfo->realParameter[11318], (modelica_real)data->simulationInfo->realParameter[11319]);
- data->localData[0]->realVars[720] /* points[3]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[879] /* points[3]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[202] /* T[3] variable */)));
- TRACE_POP
-}
-/*
- equation index: 178
- type: SIMPLE_ASSIGN
- points[3]._K[1] = 0.0001 * points[3].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[3].comp[1].VP[1], points[3].comp[1].VP[2], points[3].comp[1].VP[3], points[3].comp[1].VP[4], points[3].comp[1].VP[5], points[3].comp[1].VP[6]}, T[3])
- */
-void Graph_eqFunction_178(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,178};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11308], (modelica_real)data->simulationInfo->realParameter[11309], (modelica_real)data->simulationInfo->realParameter[11310], (modelica_real)data->simulationInfo->realParameter[11311], (modelica_real)data->simulationInfo->realParameter[11312], (modelica_real)data->simulationInfo->realParameter[11313]);
- data->localData[0]->realVars[719] /* points[3]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[878] /* points[3]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[202] /* T[3] variable */)));
- TRACE_POP
-}
-
-void residualFunc180(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,180};
- /* iteration variables */
- data->localData[0]->realVars[202] /* T[3] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_163(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_164(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_165(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_166(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_167(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_168(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_169(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_170(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_171(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_172(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_173(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_174(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_175(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_176(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_177(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_178(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.9487179487179487) * (data->localData[0]->realVars[720] /* points[3]._K[2] variable */) + (-0.05128205128205128) * (data->localData[0]->realVars[719] /* points[3]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS180(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS180(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[3] */
- sysData->nominal[i] = data->modelData->realVarsData[202].attribute /* T[3] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[202].attribute /* T[3] */.min;
- sysData->max[i++] = data->modelData->realVarsData[202].attribute /* T[3] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS180(sysData);
-}
-
-void getIterationVarsNLS180(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[202] /* T[3] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 185
- type: SIMPLE_ASSIGN
- points[4]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[4].BIP[2,2,1], T[4])
- */
-void Graph_eqFunction_185(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,185};
- data->localData[0]->realVars[571] /* points[4]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[354],data->localData[0]->realVars[203] /* T[4] variable */,"T[4]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 186
- type: SIMPLE_ASSIGN
- points[4]._Gamma._G[2,2] = exp((-points[4].BIP[2,2,2]) * points[4].Gamma.tau[2,2])
- */
-void Graph_eqFunction_186(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,186};
- data->localData[0]->realVars[253] /* points[4]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[355])) * (data->localData[0]->realVars[571] /* points[4]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 187
- type: SIMPLE_ASSIGN
- points[4]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[4].BIP[1,1,1], T[4])
- */
-void Graph_eqFunction_187(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,187};
- data->localData[0]->realVars[568] /* points[4]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[348],data->localData[0]->realVars[203] /* T[4] variable */,"T[4]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 188
- type: SIMPLE_ASSIGN
- points[4]._Gamma._G[1,1] = exp((-points[4].BIP[1,1,2]) * points[4].Gamma.tau[1,1])
- */
-void Graph_eqFunction_188(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,188};
- data->localData[0]->realVars[250] /* points[4]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[349])) * (data->localData[0]->realVars[568] /* points[4]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 189
- type: SIMPLE_ASSIGN
- points[4]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[4].BIP[1,2,1], T[4])
- */
-void Graph_eqFunction_189(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,189};
- data->localData[0]->realVars[569] /* points[4]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[350],data->localData[0]->realVars[203] /* T[4] variable */,"T[4]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 190
- type: SIMPLE_ASSIGN
- points[4]._Gamma._G[1,2] = exp((-points[4].BIP[1,2,2]) * points[4].Gamma.tau[1,2])
- */
-void Graph_eqFunction_190(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,190};
- data->localData[0]->realVars[251] /* points[4]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[351])) * (data->localData[0]->realVars[569] /* points[4]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 191
- type: SIMPLE_ASSIGN
- points[4]._Gamma._sum2[2] = 0.07692307692307693 * points[4].Gamma.tau[1,2] * points[4].Gamma.G[1,2] + 0.9230769230769231 * points[4].Gamma.tau[2,2] * points[4].Gamma.G[2,2]
- */
-void Graph_eqFunction_191(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,191};
- data->localData[0]->realVars[483] /* points[4]._Gamma._sum2[2] variable */ = (0.07692307692307693) * ((data->localData[0]->realVars[569] /* points[4]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[251] /* points[4]._Gamma._G[1,2] variable */)) + (0.9230769230769231) * ((data->localData[0]->realVars[571] /* points[4]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[253] /* points[4]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 192
- type: SIMPLE_ASSIGN
- points[4]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[4].BIP[2,1,1], T[4])
- */
-void Graph_eqFunction_192(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,192};
- data->localData[0]->realVars[570] /* points[4]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[352],data->localData[0]->realVars[203] /* T[4] variable */,"T[4]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 193
- type: SIMPLE_ASSIGN
- points[4]._Gamma._G[2,1] = exp((-points[4].BIP[2,1,2]) * points[4].Gamma.tau[2,1])
- */
-void Graph_eqFunction_193(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,193};
- data->localData[0]->realVars[252] /* points[4]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[353])) * (data->localData[0]->realVars[570] /* points[4]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 194
- type: SIMPLE_ASSIGN
- points[4]._Gamma._sum2[1] = 0.07692307692307693 * points[4].Gamma.tau[1,1] * points[4].Gamma.G[1,1] + 0.9230769230769231 * points[4].Gamma.tau[2,1] * points[4].Gamma.G[2,1]
- */
-void Graph_eqFunction_194(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,194};
- data->localData[0]->realVars[482] /* points[4]._Gamma._sum2[1] variable */ = (0.07692307692307693) * ((data->localData[0]->realVars[568] /* points[4]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[250] /* points[4]._Gamma._G[1,1] variable */)) + (0.9230769230769231) * ((data->localData[0]->realVars[570] /* points[4]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[252] /* points[4]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 195
- type: SIMPLE_ASSIGN
- points[4]._Gamma._sum1[2] = 0.07692307692307693 * points[4].Gamma.G[1,2] + 0.9230769230769231 * points[4].Gamma.G[2,2]
- */
-void Graph_eqFunction_195(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,195};
- data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */ = (0.07692307692307693) * (data->localData[0]->realVars[251] /* points[4]._Gamma._G[1,2] variable */) + (0.9230769230769231) * (data->localData[0]->realVars[253] /* points[4]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 196
- type: SIMPLE_ASSIGN
- points[4]._Gamma._sum1[1] = 0.07692307692307693 * points[4].Gamma.G[1,1] + 0.9230769230769231 * points[4].Gamma.G[2,1]
- */
-void Graph_eqFunction_196(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,196};
- data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */ = (0.07692307692307693) * (data->localData[0]->realVars[250] /* points[4]._Gamma._G[1,1] variable */) + (0.9230769230769231) * (data->localData[0]->realVars[252] /* points[4]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 197
- type: SIMPLE_ASSIGN
- points[4]._gamma[1] = exp(DIVISION(points[4].Gamma.sum2[1], points[4].Gamma.sum1[1]) + 0.07692307692307693 * points[4].Gamma.G[1,1] * DIVISION(points[4].Gamma.tau[1,1] - DIVISION(points[4].Gamma.sum2[1], points[4].Gamma.sum1[1]), points[4].Gamma.sum1[1]) + 0.9230769230769231 * points[4].Gamma.G[1,2] * DIVISION(points[4].Gamma.tau[1,2] - DIVISION(points[4].Gamma.sum2[2], points[4].Gamma.sum1[2]), points[4].Gamma.sum1[2]))
- */
-void Graph_eqFunction_197(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,197};
- data->localData[0]->realVars[880] /* points[4]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[482] /* points[4]._Gamma._sum2[1] variable */,data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes) + (0.07692307692307693) * ((data->localData[0]->realVars[250] /* points[4]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[568] /* points[4]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[482] /* points[4]._Gamma._sum2[1] variable */,data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes))) + (0.9230769230769231) * ((data->localData[0]->realVars[251] /* points[4]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[569] /* points[4]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[483] /* points[4]._Gamma._sum2[2] variable */,data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 198
- type: SIMPLE_ASSIGN
- points[4]._gamma[2] = exp(DIVISION(points[4].Gamma.sum2[2], points[4].Gamma.sum1[2]) + 0.07692307692307693 * points[4].Gamma.G[2,1] * DIVISION(points[4].Gamma.tau[2,1] - DIVISION(points[4].Gamma.sum2[1], points[4].Gamma.sum1[1]), points[4].Gamma.sum1[1]) + 0.9230769230769231 * points[4].Gamma.G[2,2] * DIVISION(points[4].Gamma.tau[2,2] - DIVISION(points[4].Gamma.sum2[2], points[4].Gamma.sum1[2]), points[4].Gamma.sum1[2]))
- */
-void Graph_eqFunction_198(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,198};
- data->localData[0]->realVars[881] /* points[4]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[483] /* points[4]._Gamma._sum2[2] variable */,data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes) + (0.07692307692307693) * ((data->localData[0]->realVars[252] /* points[4]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[570] /* points[4]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[482] /* points[4]._Gamma._sum2[1] variable */,data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes))) + (0.9230769230769231) * ((data->localData[0]->realVars[253] /* points[4]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[571] /* points[4]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[483] /* points[4]._Gamma._sum2[2] variable */,data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 199
- type: SIMPLE_ASSIGN
- points[4]._K[2] = 0.0001 * points[4].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[4].comp[2].VP[1], points[4].comp[2].VP[2], points[4].comp[2].VP[3], points[4].comp[2].VP[4], points[4].comp[2].VP[5], points[4].comp[2].VP[6]}, T[4])
- */
-void Graph_eqFunction_199(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,199};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11326], (modelica_real)data->simulationInfo->realParameter[11327], (modelica_real)data->simulationInfo->realParameter[11328], (modelica_real)data->simulationInfo->realParameter[11329], (modelica_real)data->simulationInfo->realParameter[11330], (modelica_real)data->simulationInfo->realParameter[11331]);
- data->localData[0]->realVars[722] /* points[4]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[881] /* points[4]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[203] /* T[4] variable */)));
- TRACE_POP
-}
-/*
- equation index: 200
- type: SIMPLE_ASSIGN
- points[4]._K[1] = 0.0001 * points[4].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[4].comp[1].VP[1], points[4].comp[1].VP[2], points[4].comp[1].VP[3], points[4].comp[1].VP[4], points[4].comp[1].VP[5], points[4].comp[1].VP[6]}, T[4])
- */
-void Graph_eqFunction_200(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,200};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11320], (modelica_real)data->simulationInfo->realParameter[11321], (modelica_real)data->simulationInfo->realParameter[11322], (modelica_real)data->simulationInfo->realParameter[11323], (modelica_real)data->simulationInfo->realParameter[11324], (modelica_real)data->simulationInfo->realParameter[11325]);
- data->localData[0]->realVars[721] /* points[4]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[880] /* points[4]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[203] /* T[4] variable */)));
- TRACE_POP
-}
-
-void residualFunc202(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,202};
- /* iteration variables */
- data->localData[0]->realVars[203] /* T[4] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_185(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_186(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_187(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_188(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_189(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_190(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_191(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_192(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_193(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_194(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_195(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_196(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_197(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_198(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_199(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_200(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.9230769230769231) * (data->localData[0]->realVars[722] /* points[4]._K[2] variable */) + (-0.07692307692307693) * (data->localData[0]->realVars[721] /* points[4]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS202(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS202(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[4] */
- sysData->nominal[i] = data->modelData->realVarsData[203].attribute /* T[4] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[203].attribute /* T[4] */.min;
- sysData->max[i++] = data->modelData->realVarsData[203].attribute /* T[4] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS202(sysData);
-}
-
-void getIterationVarsNLS202(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[203] /* T[4] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 207
- type: SIMPLE_ASSIGN
- points[5]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[5].BIP[2,2,1], T[5])
- */
-void Graph_eqFunction_207(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,207};
- data->localData[0]->realVars[575] /* points[5]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[362],data->localData[0]->realVars[204] /* T[5] variable */,"T[5]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 208
- type: SIMPLE_ASSIGN
- points[5]._Gamma._G[2,2] = exp((-points[5].BIP[2,2,2]) * points[5].Gamma.tau[2,2])
- */
-void Graph_eqFunction_208(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,208};
- data->localData[0]->realVars[257] /* points[5]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[363])) * (data->localData[0]->realVars[575] /* points[5]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 209
- type: SIMPLE_ASSIGN
- points[5]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[5].BIP[1,1,1], T[5])
- */
-void Graph_eqFunction_209(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,209};
- data->localData[0]->realVars[572] /* points[5]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[356],data->localData[0]->realVars[204] /* T[5] variable */,"T[5]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 210
- type: SIMPLE_ASSIGN
- points[5]._Gamma._G[1,1] = exp((-points[5].BIP[1,1,2]) * points[5].Gamma.tau[1,1])
- */
-void Graph_eqFunction_210(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,210};
- data->localData[0]->realVars[254] /* points[5]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[357])) * (data->localData[0]->realVars[572] /* points[5]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 211
- type: SIMPLE_ASSIGN
- points[5]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[5].BIP[1,2,1], T[5])
- */
-void Graph_eqFunction_211(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,211};
- data->localData[0]->realVars[573] /* points[5]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[358],data->localData[0]->realVars[204] /* T[5] variable */,"T[5]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 212
- type: SIMPLE_ASSIGN
- points[5]._Gamma._G[1,2] = exp((-points[5].BIP[1,2,2]) * points[5].Gamma.tau[1,2])
- */
-void Graph_eqFunction_212(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,212};
- data->localData[0]->realVars[255] /* points[5]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[359])) * (data->localData[0]->realVars[573] /* points[5]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 213
- type: SIMPLE_ASSIGN
- points[5]._Gamma._sum2[2] = 0.1025641025641026 * points[5].Gamma.tau[1,2] * points[5].Gamma.G[1,2] + 0.8974358974358975 * points[5].Gamma.tau[2,2] * points[5].Gamma.G[2,2]
- */
-void Graph_eqFunction_213(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,213};
- data->localData[0]->realVars[485] /* points[5]._Gamma._sum2[2] variable */ = (0.1025641025641026) * ((data->localData[0]->realVars[573] /* points[5]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[255] /* points[5]._Gamma._G[1,2] variable */)) + (0.8974358974358975) * ((data->localData[0]->realVars[575] /* points[5]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[257] /* points[5]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 214
- type: SIMPLE_ASSIGN
- points[5]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[5].BIP[2,1,1], T[5])
- */
-void Graph_eqFunction_214(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,214};
- data->localData[0]->realVars[574] /* points[5]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[360],data->localData[0]->realVars[204] /* T[5] variable */,"T[5]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 215
- type: SIMPLE_ASSIGN
- points[5]._Gamma._G[2,1] = exp((-points[5].BIP[2,1,2]) * points[5].Gamma.tau[2,1])
- */
-void Graph_eqFunction_215(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,215};
- data->localData[0]->realVars[256] /* points[5]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[361])) * (data->localData[0]->realVars[574] /* points[5]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 216
- type: SIMPLE_ASSIGN
- points[5]._Gamma._sum2[1] = 0.1025641025641026 * points[5].Gamma.tau[1,1] * points[5].Gamma.G[1,1] + 0.8974358974358975 * points[5].Gamma.tau[2,1] * points[5].Gamma.G[2,1]
- */
-void Graph_eqFunction_216(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,216};
- data->localData[0]->realVars[484] /* points[5]._Gamma._sum2[1] variable */ = (0.1025641025641026) * ((data->localData[0]->realVars[572] /* points[5]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[254] /* points[5]._Gamma._G[1,1] variable */)) + (0.8974358974358975) * ((data->localData[0]->realVars[574] /* points[5]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[256] /* points[5]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 217
- type: SIMPLE_ASSIGN
- points[5]._Gamma._sum1[2] = 0.1025641025641026 * points[5].Gamma.G[1,2] + 0.8974358974358975 * points[5].Gamma.G[2,2]
- */
-void Graph_eqFunction_217(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,217};
- data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */ = (0.1025641025641026) * (data->localData[0]->realVars[255] /* points[5]._Gamma._G[1,2] variable */) + (0.8974358974358975) * (data->localData[0]->realVars[257] /* points[5]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 218
- type: SIMPLE_ASSIGN
- points[5]._Gamma._sum1[1] = 0.1025641025641026 * points[5].Gamma.G[1,1] + 0.8974358974358975 * points[5].Gamma.G[2,1]
- */
-void Graph_eqFunction_218(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,218};
- data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */ = (0.1025641025641026) * (data->localData[0]->realVars[254] /* points[5]._Gamma._G[1,1] variable */) + (0.8974358974358975) * (data->localData[0]->realVars[256] /* points[5]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 219
- type: SIMPLE_ASSIGN
- points[5]._gamma[1] = exp(DIVISION(points[5].Gamma.sum2[1], points[5].Gamma.sum1[1]) + 0.1025641025641026 * points[5].Gamma.G[1,1] * DIVISION(points[5].Gamma.tau[1,1] - DIVISION(points[5].Gamma.sum2[1], points[5].Gamma.sum1[1]), points[5].Gamma.sum1[1]) + 0.8974358974358975 * points[5].Gamma.G[1,2] * DIVISION(points[5].Gamma.tau[1,2] - DIVISION(points[5].Gamma.sum2[2], points[5].Gamma.sum1[2]), points[5].Gamma.sum1[2]))
- */
-void Graph_eqFunction_219(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,219};
- data->localData[0]->realVars[882] /* points[5]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[484] /* points[5]._Gamma._sum2[1] variable */,data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes) + (0.1025641025641026) * ((data->localData[0]->realVars[254] /* points[5]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[572] /* points[5]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[484] /* points[5]._Gamma._sum2[1] variable */,data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes))) + (0.8974358974358975) * ((data->localData[0]->realVars[255] /* points[5]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[573] /* points[5]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[485] /* points[5]._Gamma._sum2[2] variable */,data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 220
- type: SIMPLE_ASSIGN
- points[5]._gamma[2] = exp(DIVISION(points[5].Gamma.sum2[2], points[5].Gamma.sum1[2]) + 0.1025641025641026 * points[5].Gamma.G[2,1] * DIVISION(points[5].Gamma.tau[2,1] - DIVISION(points[5].Gamma.sum2[1], points[5].Gamma.sum1[1]), points[5].Gamma.sum1[1]) + 0.8974358974358975 * points[5].Gamma.G[2,2] * DIVISION(points[5].Gamma.tau[2,2] - DIVISION(points[5].Gamma.sum2[2], points[5].Gamma.sum1[2]), points[5].Gamma.sum1[2]))
- */
-void Graph_eqFunction_220(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,220};
- data->localData[0]->realVars[883] /* points[5]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[485] /* points[5]._Gamma._sum2[2] variable */,data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes) + (0.1025641025641026) * ((data->localData[0]->realVars[256] /* points[5]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[574] /* points[5]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[484] /* points[5]._Gamma._sum2[1] variable */,data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes))) + (0.8974358974358975) * ((data->localData[0]->realVars[257] /* points[5]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[575] /* points[5]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[485] /* points[5]._Gamma._sum2[2] variable */,data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 221
- type: SIMPLE_ASSIGN
- points[5]._K[2] = 0.0001 * points[5].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[5].comp[2].VP[1], points[5].comp[2].VP[2], points[5].comp[2].VP[3], points[5].comp[2].VP[4], points[5].comp[2].VP[5], points[5].comp[2].VP[6]}, T[5])
- */
-void Graph_eqFunction_221(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,221};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11338], (modelica_real)data->simulationInfo->realParameter[11339], (modelica_real)data->simulationInfo->realParameter[11340], (modelica_real)data->simulationInfo->realParameter[11341], (modelica_real)data->simulationInfo->realParameter[11342], (modelica_real)data->simulationInfo->realParameter[11343]);
- data->localData[0]->realVars[724] /* points[5]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[883] /* points[5]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[204] /* T[5] variable */)));
- TRACE_POP
-}
-/*
- equation index: 222
- type: SIMPLE_ASSIGN
- points[5]._K[1] = 0.0001 * points[5].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[5].comp[1].VP[1], points[5].comp[1].VP[2], points[5].comp[1].VP[3], points[5].comp[1].VP[4], points[5].comp[1].VP[5], points[5].comp[1].VP[6]}, T[5])
- */
-void Graph_eqFunction_222(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,222};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11332], (modelica_real)data->simulationInfo->realParameter[11333], (modelica_real)data->simulationInfo->realParameter[11334], (modelica_real)data->simulationInfo->realParameter[11335], (modelica_real)data->simulationInfo->realParameter[11336], (modelica_real)data->simulationInfo->realParameter[11337]);
- data->localData[0]->realVars[723] /* points[5]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[882] /* points[5]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[204] /* T[5] variable */)));
- TRACE_POP
-}
-
-void residualFunc224(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,224};
- /* iteration variables */
- data->localData[0]->realVars[204] /* T[5] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_207(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_208(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_209(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_210(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_211(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_212(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_213(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_214(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_215(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_216(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_217(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_218(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_219(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_220(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_221(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_222(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.8974358974358975) * (data->localData[0]->realVars[724] /* points[5]._K[2] variable */) + (-0.1025641025641026) * (data->localData[0]->realVars[723] /* points[5]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS224(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS224(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[5] */
- sysData->nominal[i] = data->modelData->realVarsData[204].attribute /* T[5] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[204].attribute /* T[5] */.min;
- sysData->max[i++] = data->modelData->realVarsData[204].attribute /* T[5] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS224(sysData);
-}
-
-void getIterationVarsNLS224(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[204] /* T[5] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 229
- type: SIMPLE_ASSIGN
- points[6]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[6].BIP[2,2,1], T[6])
- */
-void Graph_eqFunction_229(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,229};
- data->localData[0]->realVars[579] /* points[6]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[370],data->localData[0]->realVars[205] /* T[6] variable */,"T[6]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 230
- type: SIMPLE_ASSIGN
- points[6]._Gamma._G[2,2] = exp((-points[6].BIP[2,2,2]) * points[6].Gamma.tau[2,2])
- */
-void Graph_eqFunction_230(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,230};
- data->localData[0]->realVars[261] /* points[6]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[371])) * (data->localData[0]->realVars[579] /* points[6]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 231
- type: SIMPLE_ASSIGN
- points[6]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[6].BIP[1,1,1], T[6])
- */
-void Graph_eqFunction_231(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,231};
- data->localData[0]->realVars[576] /* points[6]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[364],data->localData[0]->realVars[205] /* T[6] variable */,"T[6]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 232
- type: SIMPLE_ASSIGN
- points[6]._Gamma._G[1,1] = exp((-points[6].BIP[1,1,2]) * points[6].Gamma.tau[1,1])
- */
-void Graph_eqFunction_232(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,232};
- data->localData[0]->realVars[258] /* points[6]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[365])) * (data->localData[0]->realVars[576] /* points[6]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 233
- type: SIMPLE_ASSIGN
- points[6]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[6].BIP[1,2,1], T[6])
- */
-void Graph_eqFunction_233(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,233};
- data->localData[0]->realVars[577] /* points[6]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[366],data->localData[0]->realVars[205] /* T[6] variable */,"T[6]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 234
- type: SIMPLE_ASSIGN
- points[6]._Gamma._G[1,2] = exp((-points[6].BIP[1,2,2]) * points[6].Gamma.tau[1,2])
- */
-void Graph_eqFunction_234(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,234};
- data->localData[0]->realVars[259] /* points[6]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[367])) * (data->localData[0]->realVars[577] /* points[6]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 235
- type: SIMPLE_ASSIGN
- points[6]._Gamma._sum2[2] = 0.1282051282051282 * points[6].Gamma.tau[1,2] * points[6].Gamma.G[1,2] + 0.8717948717948718 * points[6].Gamma.tau[2,2] * points[6].Gamma.G[2,2]
- */
-void Graph_eqFunction_235(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,235};
- data->localData[0]->realVars[487] /* points[6]._Gamma._sum2[2] variable */ = (0.1282051282051282) * ((data->localData[0]->realVars[577] /* points[6]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[259] /* points[6]._Gamma._G[1,2] variable */)) + (0.8717948717948718) * ((data->localData[0]->realVars[579] /* points[6]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[261] /* points[6]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 236
- type: SIMPLE_ASSIGN
- points[6]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[6].BIP[2,1,1], T[6])
- */
-void Graph_eqFunction_236(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,236};
- data->localData[0]->realVars[578] /* points[6]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[368],data->localData[0]->realVars[205] /* T[6] variable */,"T[6]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 237
- type: SIMPLE_ASSIGN
- points[6]._Gamma._G[2,1] = exp((-points[6].BIP[2,1,2]) * points[6].Gamma.tau[2,1])
- */
-void Graph_eqFunction_237(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,237};
- data->localData[0]->realVars[260] /* points[6]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[369])) * (data->localData[0]->realVars[578] /* points[6]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 238
- type: SIMPLE_ASSIGN
- points[6]._Gamma._sum2[1] = 0.1282051282051282 * points[6].Gamma.tau[1,1] * points[6].Gamma.G[1,1] + 0.8717948717948718 * points[6].Gamma.tau[2,1] * points[6].Gamma.G[2,1]
- */
-void Graph_eqFunction_238(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,238};
- data->localData[0]->realVars[486] /* points[6]._Gamma._sum2[1] variable */ = (0.1282051282051282) * ((data->localData[0]->realVars[576] /* points[6]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[258] /* points[6]._Gamma._G[1,1] variable */)) + (0.8717948717948718) * ((data->localData[0]->realVars[578] /* points[6]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[260] /* points[6]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 239
- type: SIMPLE_ASSIGN
- points[6]._Gamma._sum1[2] = 0.1282051282051282 * points[6].Gamma.G[1,2] + 0.8717948717948718 * points[6].Gamma.G[2,2]
- */
-void Graph_eqFunction_239(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,239};
- data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */ = (0.1282051282051282) * (data->localData[0]->realVars[259] /* points[6]._Gamma._G[1,2] variable */) + (0.8717948717948718) * (data->localData[0]->realVars[261] /* points[6]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 240
- type: SIMPLE_ASSIGN
- points[6]._Gamma._sum1[1] = 0.1282051282051282 * points[6].Gamma.G[1,1] + 0.8717948717948718 * points[6].Gamma.G[2,1]
- */
-void Graph_eqFunction_240(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,240};
- data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */ = (0.1282051282051282) * (data->localData[0]->realVars[258] /* points[6]._Gamma._G[1,1] variable */) + (0.8717948717948718) * (data->localData[0]->realVars[260] /* points[6]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 241
- type: SIMPLE_ASSIGN
- points[6]._gamma[1] = exp(DIVISION(points[6].Gamma.sum2[1], points[6].Gamma.sum1[1]) + 0.1282051282051282 * points[6].Gamma.G[1,1] * DIVISION(points[6].Gamma.tau[1,1] - DIVISION(points[6].Gamma.sum2[1], points[6].Gamma.sum1[1]), points[6].Gamma.sum1[1]) + 0.8717948717948718 * points[6].Gamma.G[1,2] * DIVISION(points[6].Gamma.tau[1,2] - DIVISION(points[6].Gamma.sum2[2], points[6].Gamma.sum1[2]), points[6].Gamma.sum1[2]))
- */
-void Graph_eqFunction_241(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,241};
- data->localData[0]->realVars[884] /* points[6]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[486] /* points[6]._Gamma._sum2[1] variable */,data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes) + (0.1282051282051282) * ((data->localData[0]->realVars[258] /* points[6]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[576] /* points[6]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[486] /* points[6]._Gamma._sum2[1] variable */,data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes))) + (0.8717948717948718) * ((data->localData[0]->realVars[259] /* points[6]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[577] /* points[6]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[487] /* points[6]._Gamma._sum2[2] variable */,data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 242
- type: SIMPLE_ASSIGN
- points[6]._gamma[2] = exp(DIVISION(points[6].Gamma.sum2[2], points[6].Gamma.sum1[2]) + 0.1282051282051282 * points[6].Gamma.G[2,1] * DIVISION(points[6].Gamma.tau[2,1] - DIVISION(points[6].Gamma.sum2[1], points[6].Gamma.sum1[1]), points[6].Gamma.sum1[1]) + 0.8717948717948718 * points[6].Gamma.G[2,2] * DIVISION(points[6].Gamma.tau[2,2] - DIVISION(points[6].Gamma.sum2[2], points[6].Gamma.sum1[2]), points[6].Gamma.sum1[2]))
- */
-void Graph_eqFunction_242(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,242};
- data->localData[0]->realVars[885] /* points[6]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[487] /* points[6]._Gamma._sum2[2] variable */,data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes) + (0.1282051282051282) * ((data->localData[0]->realVars[260] /* points[6]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[578] /* points[6]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[486] /* points[6]._Gamma._sum2[1] variable */,data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes))) + (0.8717948717948718) * ((data->localData[0]->realVars[261] /* points[6]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[579] /* points[6]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[487] /* points[6]._Gamma._sum2[2] variable */,data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 243
- type: SIMPLE_ASSIGN
- points[6]._K[2] = 0.0001 * points[6].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[6].comp[2].VP[1], points[6].comp[2].VP[2], points[6].comp[2].VP[3], points[6].comp[2].VP[4], points[6].comp[2].VP[5], points[6].comp[2].VP[6]}, T[6])
- */
-void Graph_eqFunction_243(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,243};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11350], (modelica_real)data->simulationInfo->realParameter[11351], (modelica_real)data->simulationInfo->realParameter[11352], (modelica_real)data->simulationInfo->realParameter[11353], (modelica_real)data->simulationInfo->realParameter[11354], (modelica_real)data->simulationInfo->realParameter[11355]);
- data->localData[0]->realVars[726] /* points[6]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[885] /* points[6]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[205] /* T[6] variable */)));
- TRACE_POP
-}
-/*
- equation index: 244
- type: SIMPLE_ASSIGN
- points[6]._K[1] = 0.0001 * points[6].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[6].comp[1].VP[1], points[6].comp[1].VP[2], points[6].comp[1].VP[3], points[6].comp[1].VP[4], points[6].comp[1].VP[5], points[6].comp[1].VP[6]}, T[6])
- */
-void Graph_eqFunction_244(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,244};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11344], (modelica_real)data->simulationInfo->realParameter[11345], (modelica_real)data->simulationInfo->realParameter[11346], (modelica_real)data->simulationInfo->realParameter[11347], (modelica_real)data->simulationInfo->realParameter[11348], (modelica_real)data->simulationInfo->realParameter[11349]);
- data->localData[0]->realVars[725] /* points[6]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[884] /* points[6]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[205] /* T[6] variable */)));
- TRACE_POP
-}
-
-void residualFunc246(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,246};
- /* iteration variables */
- data->localData[0]->realVars[205] /* T[6] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_229(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_230(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_231(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_232(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_233(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_234(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_235(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_236(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_237(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_238(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_239(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_240(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_241(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_242(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_243(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_244(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.8717948717948718) * (data->localData[0]->realVars[726] /* points[6]._K[2] variable */) + (-0.1282051282051282) * (data->localData[0]->realVars[725] /* points[6]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS246(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS246(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[6] */
- sysData->nominal[i] = data->modelData->realVarsData[205].attribute /* T[6] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[205].attribute /* T[6] */.min;
- sysData->max[i++] = data->modelData->realVarsData[205].attribute /* T[6] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS246(sysData);
-}
-
-void getIterationVarsNLS246(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[205] /* T[6] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 251
- type: SIMPLE_ASSIGN
- points[7]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[7].BIP[2,2,1], T[7])
- */
-void Graph_eqFunction_251(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,251};
- data->localData[0]->realVars[583] /* points[7]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[378],data->localData[0]->realVars[206] /* T[7] variable */,"T[7]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 252
- type: SIMPLE_ASSIGN
- points[7]._Gamma._G[2,2] = exp((-points[7].BIP[2,2,2]) * points[7].Gamma.tau[2,2])
- */
-void Graph_eqFunction_252(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,252};
- data->localData[0]->realVars[265] /* points[7]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[379])) * (data->localData[0]->realVars[583] /* points[7]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 253
- type: SIMPLE_ASSIGN
- points[7]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[7].BIP[1,1,1], T[7])
- */
-void Graph_eqFunction_253(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,253};
- data->localData[0]->realVars[580] /* points[7]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[372],data->localData[0]->realVars[206] /* T[7] variable */,"T[7]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 254
- type: SIMPLE_ASSIGN
- points[7]._Gamma._G[1,1] = exp((-points[7].BIP[1,1,2]) * points[7].Gamma.tau[1,1])
- */
-void Graph_eqFunction_254(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,254};
- data->localData[0]->realVars[262] /* points[7]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[373])) * (data->localData[0]->realVars[580] /* points[7]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 255
- type: SIMPLE_ASSIGN
- points[7]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[7].BIP[1,2,1], T[7])
- */
-void Graph_eqFunction_255(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,255};
- data->localData[0]->realVars[581] /* points[7]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[374],data->localData[0]->realVars[206] /* T[7] variable */,"T[7]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 256
- type: SIMPLE_ASSIGN
- points[7]._Gamma._G[1,2] = exp((-points[7].BIP[1,2,2]) * points[7].Gamma.tau[1,2])
- */
-void Graph_eqFunction_256(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,256};
- data->localData[0]->realVars[263] /* points[7]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[375])) * (data->localData[0]->realVars[581] /* points[7]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 257
- type: SIMPLE_ASSIGN
- points[7]._Gamma._sum2[2] = 0.1538461538461539 * points[7].Gamma.tau[1,2] * points[7].Gamma.G[1,2] + 0.8461538461538462 * points[7].Gamma.tau[2,2] * points[7].Gamma.G[2,2]
- */
-void Graph_eqFunction_257(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,257};
- data->localData[0]->realVars[489] /* points[7]._Gamma._sum2[2] variable */ = (0.1538461538461539) * ((data->localData[0]->realVars[581] /* points[7]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[263] /* points[7]._Gamma._G[1,2] variable */)) + (0.8461538461538462) * ((data->localData[0]->realVars[583] /* points[7]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[265] /* points[7]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 258
- type: SIMPLE_ASSIGN
- points[7]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[7].BIP[2,1,1], T[7])
- */
-void Graph_eqFunction_258(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,258};
- data->localData[0]->realVars[582] /* points[7]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[376],data->localData[0]->realVars[206] /* T[7] variable */,"T[7]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 259
- type: SIMPLE_ASSIGN
- points[7]._Gamma._G[2,1] = exp((-points[7].BIP[2,1,2]) * points[7].Gamma.tau[2,1])
- */
-void Graph_eqFunction_259(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,259};
- data->localData[0]->realVars[264] /* points[7]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[377])) * (data->localData[0]->realVars[582] /* points[7]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 260
- type: SIMPLE_ASSIGN
- points[7]._Gamma._sum2[1] = 0.1538461538461539 * points[7].Gamma.tau[1,1] * points[7].Gamma.G[1,1] + 0.8461538461538462 * points[7].Gamma.tau[2,1] * points[7].Gamma.G[2,1]
- */
-void Graph_eqFunction_260(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,260};
- data->localData[0]->realVars[488] /* points[7]._Gamma._sum2[1] variable */ = (0.1538461538461539) * ((data->localData[0]->realVars[580] /* points[7]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[262] /* points[7]._Gamma._G[1,1] variable */)) + (0.8461538461538462) * ((data->localData[0]->realVars[582] /* points[7]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[264] /* points[7]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 261
- type: SIMPLE_ASSIGN
- points[7]._Gamma._sum1[2] = 0.1538461538461539 * points[7].Gamma.G[1,2] + 0.8461538461538462 * points[7].Gamma.G[2,2]
- */
-void Graph_eqFunction_261(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,261};
- data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */ = (0.1538461538461539) * (data->localData[0]->realVars[263] /* points[7]._Gamma._G[1,2] variable */) + (0.8461538461538462) * (data->localData[0]->realVars[265] /* points[7]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 262
- type: SIMPLE_ASSIGN
- points[7]._Gamma._sum1[1] = 0.1538461538461539 * points[7].Gamma.G[1,1] + 0.8461538461538462 * points[7].Gamma.G[2,1]
- */
-void Graph_eqFunction_262(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,262};
- data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */ = (0.1538461538461539) * (data->localData[0]->realVars[262] /* points[7]._Gamma._G[1,1] variable */) + (0.8461538461538462) * (data->localData[0]->realVars[264] /* points[7]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 263
- type: SIMPLE_ASSIGN
- points[7]._gamma[1] = exp(DIVISION(points[7].Gamma.sum2[1], points[7].Gamma.sum1[1]) + 0.1538461538461539 * points[7].Gamma.G[1,1] * DIVISION(points[7].Gamma.tau[1,1] - DIVISION(points[7].Gamma.sum2[1], points[7].Gamma.sum1[1]), points[7].Gamma.sum1[1]) + 0.8461538461538462 * points[7].Gamma.G[1,2] * DIVISION(points[7].Gamma.tau[1,2] - DIVISION(points[7].Gamma.sum2[2], points[7].Gamma.sum1[2]), points[7].Gamma.sum1[2]))
- */
-void Graph_eqFunction_263(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,263};
- data->localData[0]->realVars[886] /* points[7]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[488] /* points[7]._Gamma._sum2[1] variable */,data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes) + (0.1538461538461539) * ((data->localData[0]->realVars[262] /* points[7]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[580] /* points[7]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[488] /* points[7]._Gamma._sum2[1] variable */,data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes))) + (0.8461538461538462) * ((data->localData[0]->realVars[263] /* points[7]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[581] /* points[7]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[489] /* points[7]._Gamma._sum2[2] variable */,data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 264
- type: SIMPLE_ASSIGN
- points[7]._gamma[2] = exp(DIVISION(points[7].Gamma.sum2[2], points[7].Gamma.sum1[2]) + 0.1538461538461539 * points[7].Gamma.G[2,1] * DIVISION(points[7].Gamma.tau[2,1] - DIVISION(points[7].Gamma.sum2[1], points[7].Gamma.sum1[1]), points[7].Gamma.sum1[1]) + 0.8461538461538462 * points[7].Gamma.G[2,2] * DIVISION(points[7].Gamma.tau[2,2] - DIVISION(points[7].Gamma.sum2[2], points[7].Gamma.sum1[2]), points[7].Gamma.sum1[2]))
- */
-void Graph_eqFunction_264(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,264};
- data->localData[0]->realVars[887] /* points[7]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[489] /* points[7]._Gamma._sum2[2] variable */,data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes) + (0.1538461538461539) * ((data->localData[0]->realVars[264] /* points[7]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[582] /* points[7]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[488] /* points[7]._Gamma._sum2[1] variable */,data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes))) + (0.8461538461538462) * ((data->localData[0]->realVars[265] /* points[7]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[583] /* points[7]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[489] /* points[7]._Gamma._sum2[2] variable */,data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 265
- type: SIMPLE_ASSIGN
- points[7]._K[2] = 0.0001 * points[7].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[7].comp[2].VP[1], points[7].comp[2].VP[2], points[7].comp[2].VP[3], points[7].comp[2].VP[4], points[7].comp[2].VP[5], points[7].comp[2].VP[6]}, T[7])
- */
-void Graph_eqFunction_265(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,265};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11362], (modelica_real)data->simulationInfo->realParameter[11363], (modelica_real)data->simulationInfo->realParameter[11364], (modelica_real)data->simulationInfo->realParameter[11365], (modelica_real)data->simulationInfo->realParameter[11366], (modelica_real)data->simulationInfo->realParameter[11367]);
- data->localData[0]->realVars[728] /* points[7]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[887] /* points[7]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[206] /* T[7] variable */)));
- TRACE_POP
-}
-/*
- equation index: 266
- type: SIMPLE_ASSIGN
- points[7]._K[1] = 0.0001 * points[7].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[7].comp[1].VP[1], points[7].comp[1].VP[2], points[7].comp[1].VP[3], points[7].comp[1].VP[4], points[7].comp[1].VP[5], points[7].comp[1].VP[6]}, T[7])
- */
-void Graph_eqFunction_266(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,266};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11356], (modelica_real)data->simulationInfo->realParameter[11357], (modelica_real)data->simulationInfo->realParameter[11358], (modelica_real)data->simulationInfo->realParameter[11359], (modelica_real)data->simulationInfo->realParameter[11360], (modelica_real)data->simulationInfo->realParameter[11361]);
- data->localData[0]->realVars[727] /* points[7]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[886] /* points[7]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[206] /* T[7] variable */)));
- TRACE_POP
-}
-
-void residualFunc268(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,268};
- /* iteration variables */
- data->localData[0]->realVars[206] /* T[7] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_251(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_252(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_253(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_254(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_255(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_256(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_257(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_258(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_259(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_260(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_261(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_262(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_263(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_264(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_265(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_266(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.8461538461538462) * (data->localData[0]->realVars[728] /* points[7]._K[2] variable */) + (-0.1538461538461539) * (data->localData[0]->realVars[727] /* points[7]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS268(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS268(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[7] */
- sysData->nominal[i] = data->modelData->realVarsData[206].attribute /* T[7] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[206].attribute /* T[7] */.min;
- sysData->max[i++] = data->modelData->realVarsData[206].attribute /* T[7] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS268(sysData);
-}
-
-void getIterationVarsNLS268(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[206] /* T[7] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 273
- type: SIMPLE_ASSIGN
- points[8]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[8].BIP[2,2,1], T[8])
- */
-void Graph_eqFunction_273(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,273};
- data->localData[0]->realVars[587] /* points[8]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[386],data->localData[0]->realVars[207] /* T[8] variable */,"T[8]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 274
- type: SIMPLE_ASSIGN
- points[8]._Gamma._G[2,2] = exp((-points[8].BIP[2,2,2]) * points[8].Gamma.tau[2,2])
- */
-void Graph_eqFunction_274(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,274};
- data->localData[0]->realVars[269] /* points[8]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[387])) * (data->localData[0]->realVars[587] /* points[8]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 275
- type: SIMPLE_ASSIGN
- points[8]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[8].BIP[1,1,1], T[8])
- */
-void Graph_eqFunction_275(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,275};
- data->localData[0]->realVars[584] /* points[8]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[380],data->localData[0]->realVars[207] /* T[8] variable */,"T[8]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 276
- type: SIMPLE_ASSIGN
- points[8]._Gamma._G[1,1] = exp((-points[8].BIP[1,1,2]) * points[8].Gamma.tau[1,1])
- */
-void Graph_eqFunction_276(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,276};
- data->localData[0]->realVars[266] /* points[8]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[381])) * (data->localData[0]->realVars[584] /* points[8]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 277
- type: SIMPLE_ASSIGN
- points[8]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[8].BIP[1,2,1], T[8])
- */
-void Graph_eqFunction_277(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,277};
- data->localData[0]->realVars[585] /* points[8]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[382],data->localData[0]->realVars[207] /* T[8] variable */,"T[8]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 278
- type: SIMPLE_ASSIGN
- points[8]._Gamma._G[1,2] = exp((-points[8].BIP[1,2,2]) * points[8].Gamma.tau[1,2])
- */
-void Graph_eqFunction_278(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,278};
- data->localData[0]->realVars[267] /* points[8]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[383])) * (data->localData[0]->realVars[585] /* points[8]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 279
- type: SIMPLE_ASSIGN
- points[8]._Gamma._sum2[2] = 0.1794871794871795 * points[8].Gamma.tau[1,2] * points[8].Gamma.G[1,2] + 0.8205128205128205 * points[8].Gamma.tau[2,2] * points[8].Gamma.G[2,2]
- */
-void Graph_eqFunction_279(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,279};
- data->localData[0]->realVars[491] /* points[8]._Gamma._sum2[2] variable */ = (0.1794871794871795) * ((data->localData[0]->realVars[585] /* points[8]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[267] /* points[8]._Gamma._G[1,2] variable */)) + (0.8205128205128205) * ((data->localData[0]->realVars[587] /* points[8]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[269] /* points[8]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 280
- type: SIMPLE_ASSIGN
- points[8]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[8].BIP[2,1,1], T[8])
- */
-void Graph_eqFunction_280(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,280};
- data->localData[0]->realVars[586] /* points[8]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[384],data->localData[0]->realVars[207] /* T[8] variable */,"T[8]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 281
- type: SIMPLE_ASSIGN
- points[8]._Gamma._G[2,1] = exp((-points[8].BIP[2,1,2]) * points[8].Gamma.tau[2,1])
- */
-void Graph_eqFunction_281(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,281};
- data->localData[0]->realVars[268] /* points[8]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[385])) * (data->localData[0]->realVars[586] /* points[8]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 282
- type: SIMPLE_ASSIGN
- points[8]._Gamma._sum2[1] = 0.1794871794871795 * points[8].Gamma.tau[1,1] * points[8].Gamma.G[1,1] + 0.8205128205128205 * points[8].Gamma.tau[2,1] * points[8].Gamma.G[2,1]
- */
-void Graph_eqFunction_282(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,282};
- data->localData[0]->realVars[490] /* points[8]._Gamma._sum2[1] variable */ = (0.1794871794871795) * ((data->localData[0]->realVars[584] /* points[8]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[266] /* points[8]._Gamma._G[1,1] variable */)) + (0.8205128205128205) * ((data->localData[0]->realVars[586] /* points[8]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[268] /* points[8]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 283
- type: SIMPLE_ASSIGN
- points[8]._Gamma._sum1[2] = 0.1794871794871795 * points[8].Gamma.G[1,2] + 0.8205128205128205 * points[8].Gamma.G[2,2]
- */
-void Graph_eqFunction_283(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,283};
- data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */ = (0.1794871794871795) * (data->localData[0]->realVars[267] /* points[8]._Gamma._G[1,2] variable */) + (0.8205128205128205) * (data->localData[0]->realVars[269] /* points[8]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 284
- type: SIMPLE_ASSIGN
- points[8]._Gamma._sum1[1] = 0.1794871794871795 * points[8].Gamma.G[1,1] + 0.8205128205128205 * points[8].Gamma.G[2,1]
- */
-void Graph_eqFunction_284(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,284};
- data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */ = (0.1794871794871795) * (data->localData[0]->realVars[266] /* points[8]._Gamma._G[1,1] variable */) + (0.8205128205128205) * (data->localData[0]->realVars[268] /* points[8]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 285
- type: SIMPLE_ASSIGN
- points[8]._gamma[1] = exp(DIVISION(points[8].Gamma.sum2[1], points[8].Gamma.sum1[1]) + 0.1794871794871795 * points[8].Gamma.G[1,1] * DIVISION(points[8].Gamma.tau[1,1] - DIVISION(points[8].Gamma.sum2[1], points[8].Gamma.sum1[1]), points[8].Gamma.sum1[1]) + 0.8205128205128205 * points[8].Gamma.G[1,2] * DIVISION(points[8].Gamma.tau[1,2] - DIVISION(points[8].Gamma.sum2[2], points[8].Gamma.sum1[2]), points[8].Gamma.sum1[2]))
- */
-void Graph_eqFunction_285(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,285};
- data->localData[0]->realVars[888] /* points[8]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[490] /* points[8]._Gamma._sum2[1] variable */,data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes) + (0.1794871794871795) * ((data->localData[0]->realVars[266] /* points[8]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[584] /* points[8]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[490] /* points[8]._Gamma._sum2[1] variable */,data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes))) + (0.8205128205128205) * ((data->localData[0]->realVars[267] /* points[8]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[585] /* points[8]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[491] /* points[8]._Gamma._sum2[2] variable */,data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 286
- type: SIMPLE_ASSIGN
- points[8]._gamma[2] = exp(DIVISION(points[8].Gamma.sum2[2], points[8].Gamma.sum1[2]) + 0.1794871794871795 * points[8].Gamma.G[2,1] * DIVISION(points[8].Gamma.tau[2,1] - DIVISION(points[8].Gamma.sum2[1], points[8].Gamma.sum1[1]), points[8].Gamma.sum1[1]) + 0.8205128205128205 * points[8].Gamma.G[2,2] * DIVISION(points[8].Gamma.tau[2,2] - DIVISION(points[8].Gamma.sum2[2], points[8].Gamma.sum1[2]), points[8].Gamma.sum1[2]))
- */
-void Graph_eqFunction_286(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,286};
- data->localData[0]->realVars[889] /* points[8]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[491] /* points[8]._Gamma._sum2[2] variable */,data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes) + (0.1794871794871795) * ((data->localData[0]->realVars[268] /* points[8]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[586] /* points[8]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[490] /* points[8]._Gamma._sum2[1] variable */,data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes))) + (0.8205128205128205) * ((data->localData[0]->realVars[269] /* points[8]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[587] /* points[8]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[491] /* points[8]._Gamma._sum2[2] variable */,data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 287
- type: SIMPLE_ASSIGN
- points[8]._K[2] = 0.0001 * points[8].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[8].comp[2].VP[1], points[8].comp[2].VP[2], points[8].comp[2].VP[3], points[8].comp[2].VP[4], points[8].comp[2].VP[5], points[8].comp[2].VP[6]}, T[8])
- */
-void Graph_eqFunction_287(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,287};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11374], (modelica_real)data->simulationInfo->realParameter[11375], (modelica_real)data->simulationInfo->realParameter[11376], (modelica_real)data->simulationInfo->realParameter[11377], (modelica_real)data->simulationInfo->realParameter[11378], (modelica_real)data->simulationInfo->realParameter[11379]);
- data->localData[0]->realVars[730] /* points[8]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[889] /* points[8]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[207] /* T[8] variable */)));
- TRACE_POP
-}
-/*
- equation index: 288
- type: SIMPLE_ASSIGN
- points[8]._K[1] = 0.0001 * points[8].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[8].comp[1].VP[1], points[8].comp[1].VP[2], points[8].comp[1].VP[3], points[8].comp[1].VP[4], points[8].comp[1].VP[5], points[8].comp[1].VP[6]}, T[8])
- */
-void Graph_eqFunction_288(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,288};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11368], (modelica_real)data->simulationInfo->realParameter[11369], (modelica_real)data->simulationInfo->realParameter[11370], (modelica_real)data->simulationInfo->realParameter[11371], (modelica_real)data->simulationInfo->realParameter[11372], (modelica_real)data->simulationInfo->realParameter[11373]);
- data->localData[0]->realVars[729] /* points[8]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[888] /* points[8]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[207] /* T[8] variable */)));
- TRACE_POP
-}
-
-void residualFunc290(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,290};
- /* iteration variables */
- data->localData[0]->realVars[207] /* T[8] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_273(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_274(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_275(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_276(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_277(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_278(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_279(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_280(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_281(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_282(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_283(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_284(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_285(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_286(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_287(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_288(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.8205128205128205) * (data->localData[0]->realVars[730] /* points[8]._K[2] variable */) + (-0.1794871794871795) * (data->localData[0]->realVars[729] /* points[8]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS290(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS290(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[8] */
- sysData->nominal[i] = data->modelData->realVarsData[207].attribute /* T[8] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[207].attribute /* T[8] */.min;
- sysData->max[i++] = data->modelData->realVarsData[207].attribute /* T[8] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS290(sysData);
-}
-
-void getIterationVarsNLS290(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[207] /* T[8] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 295
- type: SIMPLE_ASSIGN
- points[9]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[9].BIP[2,2,1], T[9])
- */
-void Graph_eqFunction_295(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,295};
- data->localData[0]->realVars[591] /* points[9]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[394],data->localData[0]->realVars[208] /* T[9] variable */,"T[9]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 296
- type: SIMPLE_ASSIGN
- points[9]._Gamma._G[2,2] = exp((-points[9].BIP[2,2,2]) * points[9].Gamma.tau[2,2])
- */
-void Graph_eqFunction_296(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,296};
- data->localData[0]->realVars[273] /* points[9]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[395])) * (data->localData[0]->realVars[591] /* points[9]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 297
- type: SIMPLE_ASSIGN
- points[9]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[9].BIP[1,1,1], T[9])
- */
-void Graph_eqFunction_297(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,297};
- data->localData[0]->realVars[588] /* points[9]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[388],data->localData[0]->realVars[208] /* T[9] variable */,"T[9]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 298
- type: SIMPLE_ASSIGN
- points[9]._Gamma._G[1,1] = exp((-points[9].BIP[1,1,2]) * points[9].Gamma.tau[1,1])
- */
-void Graph_eqFunction_298(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,298};
- data->localData[0]->realVars[270] /* points[9]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[389])) * (data->localData[0]->realVars[588] /* points[9]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 299
- type: SIMPLE_ASSIGN
- points[9]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[9].BIP[1,2,1], T[9])
- */
-void Graph_eqFunction_299(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,299};
- data->localData[0]->realVars[589] /* points[9]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[390],data->localData[0]->realVars[208] /* T[9] variable */,"T[9]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 300
- type: SIMPLE_ASSIGN
- points[9]._Gamma._G[1,2] = exp((-points[9].BIP[1,2,2]) * points[9].Gamma.tau[1,2])
- */
-void Graph_eqFunction_300(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,300};
- data->localData[0]->realVars[271] /* points[9]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[391])) * (data->localData[0]->realVars[589] /* points[9]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 301
- type: SIMPLE_ASSIGN
- points[9]._Gamma._sum2[2] = 0.2051282051282051 * points[9].Gamma.tau[1,2] * points[9].Gamma.G[1,2] + 0.7948717948717949 * points[9].Gamma.tau[2,2] * points[9].Gamma.G[2,2]
- */
-void Graph_eqFunction_301(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,301};
- data->localData[0]->realVars[493] /* points[9]._Gamma._sum2[2] variable */ = (0.2051282051282051) * ((data->localData[0]->realVars[589] /* points[9]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[271] /* points[9]._Gamma._G[1,2] variable */)) + (0.7948717948717949) * ((data->localData[0]->realVars[591] /* points[9]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[273] /* points[9]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 302
- type: SIMPLE_ASSIGN
- points[9]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[9].BIP[2,1,1], T[9])
- */
-void Graph_eqFunction_302(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,302};
- data->localData[0]->realVars[590] /* points[9]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[392],data->localData[0]->realVars[208] /* T[9] variable */,"T[9]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 303
- type: SIMPLE_ASSIGN
- points[9]._Gamma._G[2,1] = exp((-points[9].BIP[2,1,2]) * points[9].Gamma.tau[2,1])
- */
-void Graph_eqFunction_303(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,303};
- data->localData[0]->realVars[272] /* points[9]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[393])) * (data->localData[0]->realVars[590] /* points[9]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 304
- type: SIMPLE_ASSIGN
- points[9]._Gamma._sum2[1] = 0.2051282051282051 * points[9].Gamma.tau[1,1] * points[9].Gamma.G[1,1] + 0.7948717948717949 * points[9].Gamma.tau[2,1] * points[9].Gamma.G[2,1]
- */
-void Graph_eqFunction_304(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,304};
- data->localData[0]->realVars[492] /* points[9]._Gamma._sum2[1] variable */ = (0.2051282051282051) * ((data->localData[0]->realVars[588] /* points[9]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[270] /* points[9]._Gamma._G[1,1] variable */)) + (0.7948717948717949) * ((data->localData[0]->realVars[590] /* points[9]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[272] /* points[9]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 305
- type: SIMPLE_ASSIGN
- points[9]._Gamma._sum1[2] = 0.2051282051282051 * points[9].Gamma.G[1,2] + 0.7948717948717949 * points[9].Gamma.G[2,2]
- */
-void Graph_eqFunction_305(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,305};
- data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */ = (0.2051282051282051) * (data->localData[0]->realVars[271] /* points[9]._Gamma._G[1,2] variable */) + (0.7948717948717949) * (data->localData[0]->realVars[273] /* points[9]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 306
- type: SIMPLE_ASSIGN
- points[9]._Gamma._sum1[1] = 0.2051282051282051 * points[9].Gamma.G[1,1] + 0.7948717948717949 * points[9].Gamma.G[2,1]
- */
-void Graph_eqFunction_306(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,306};
- data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */ = (0.2051282051282051) * (data->localData[0]->realVars[270] /* points[9]._Gamma._G[1,1] variable */) + (0.7948717948717949) * (data->localData[0]->realVars[272] /* points[9]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 307
- type: SIMPLE_ASSIGN
- points[9]._gamma[1] = exp(DIVISION(points[9].Gamma.sum2[1], points[9].Gamma.sum1[1]) + 0.2051282051282051 * points[9].Gamma.G[1,1] * DIVISION(points[9].Gamma.tau[1,1] - DIVISION(points[9].Gamma.sum2[1], points[9].Gamma.sum1[1]), points[9].Gamma.sum1[1]) + 0.7948717948717949 * points[9].Gamma.G[1,2] * DIVISION(points[9].Gamma.tau[1,2] - DIVISION(points[9].Gamma.sum2[2], points[9].Gamma.sum1[2]), points[9].Gamma.sum1[2]))
- */
-void Graph_eqFunction_307(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,307};
- data->localData[0]->realVars[890] /* points[9]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[492] /* points[9]._Gamma._sum2[1] variable */,data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes) + (0.2051282051282051) * ((data->localData[0]->realVars[270] /* points[9]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[588] /* points[9]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[492] /* points[9]._Gamma._sum2[1] variable */,data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes))) + (0.7948717948717949) * ((data->localData[0]->realVars[271] /* points[9]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[589] /* points[9]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[493] /* points[9]._Gamma._sum2[2] variable */,data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 308
- type: SIMPLE_ASSIGN
- points[9]._gamma[2] = exp(DIVISION(points[9].Gamma.sum2[2], points[9].Gamma.sum1[2]) + 0.2051282051282051 * points[9].Gamma.G[2,1] * DIVISION(points[9].Gamma.tau[2,1] - DIVISION(points[9].Gamma.sum2[1], points[9].Gamma.sum1[1]), points[9].Gamma.sum1[1]) + 0.7948717948717949 * points[9].Gamma.G[2,2] * DIVISION(points[9].Gamma.tau[2,2] - DIVISION(points[9].Gamma.sum2[2], points[9].Gamma.sum1[2]), points[9].Gamma.sum1[2]))
- */
-void Graph_eqFunction_308(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,308};
- data->localData[0]->realVars[891] /* points[9]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[493] /* points[9]._Gamma._sum2[2] variable */,data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes) + (0.2051282051282051) * ((data->localData[0]->realVars[272] /* points[9]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[590] /* points[9]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[492] /* points[9]._Gamma._sum2[1] variable */,data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes))) + (0.7948717948717949) * ((data->localData[0]->realVars[273] /* points[9]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[591] /* points[9]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[493] /* points[9]._Gamma._sum2[2] variable */,data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 309
- type: SIMPLE_ASSIGN
- points[9]._K[2] = 0.0001 * points[9].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[9].comp[2].VP[1], points[9].comp[2].VP[2], points[9].comp[2].VP[3], points[9].comp[2].VP[4], points[9].comp[2].VP[5], points[9].comp[2].VP[6]}, T[9])
- */
-void Graph_eqFunction_309(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,309};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11386], (modelica_real)data->simulationInfo->realParameter[11387], (modelica_real)data->simulationInfo->realParameter[11388], (modelica_real)data->simulationInfo->realParameter[11389], (modelica_real)data->simulationInfo->realParameter[11390], (modelica_real)data->simulationInfo->realParameter[11391]);
- data->localData[0]->realVars[732] /* points[9]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[891] /* points[9]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[208] /* T[9] variable */)));
- TRACE_POP
-}
-/*
- equation index: 310
- type: SIMPLE_ASSIGN
- points[9]._K[1] = 0.0001 * points[9].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[9].comp[1].VP[1], points[9].comp[1].VP[2], points[9].comp[1].VP[3], points[9].comp[1].VP[4], points[9].comp[1].VP[5], points[9].comp[1].VP[6]}, T[9])
- */
-void Graph_eqFunction_310(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,310};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11380], (modelica_real)data->simulationInfo->realParameter[11381], (modelica_real)data->simulationInfo->realParameter[11382], (modelica_real)data->simulationInfo->realParameter[11383], (modelica_real)data->simulationInfo->realParameter[11384], (modelica_real)data->simulationInfo->realParameter[11385]);
- data->localData[0]->realVars[731] /* points[9]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[890] /* points[9]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[208] /* T[9] variable */)));
- TRACE_POP
-}
-
-void residualFunc312(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,312};
- /* iteration variables */
- data->localData[0]->realVars[208] /* T[9] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_295(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_296(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_297(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_298(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_299(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_300(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_301(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_302(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_303(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_304(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_305(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_306(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_307(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_308(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_309(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_310(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.7948717948717949) * (data->localData[0]->realVars[732] /* points[9]._K[2] variable */) + (-0.2051282051282051) * (data->localData[0]->realVars[731] /* points[9]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS312(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS312(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[9] */
- sysData->nominal[i] = data->modelData->realVarsData[208].attribute /* T[9] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[208].attribute /* T[9] */.min;
- sysData->max[i++] = data->modelData->realVarsData[208].attribute /* T[9] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS312(sysData);
-}
-
-void getIterationVarsNLS312(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[208] /* T[9] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 317
- type: SIMPLE_ASSIGN
- points[10]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[10].BIP[2,2,1], T[10])
- */
-void Graph_eqFunction_317(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,317};
- data->localData[0]->realVars[595] /* points[10]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[402],data->localData[0]->realVars[209] /* T[10] variable */,"T[10]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 318
- type: SIMPLE_ASSIGN
- points[10]._Gamma._G[2,2] = exp((-points[10].BIP[2,2,2]) * points[10].Gamma.tau[2,2])
- */
-void Graph_eqFunction_318(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,318};
- data->localData[0]->realVars[277] /* points[10]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[403])) * (data->localData[0]->realVars[595] /* points[10]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 319
- type: SIMPLE_ASSIGN
- points[10]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[10].BIP[1,1,1], T[10])
- */
-void Graph_eqFunction_319(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,319};
- data->localData[0]->realVars[592] /* points[10]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[396],data->localData[0]->realVars[209] /* T[10] variable */,"T[10]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 320
- type: SIMPLE_ASSIGN
- points[10]._Gamma._G[1,1] = exp((-points[10].BIP[1,1,2]) * points[10].Gamma.tau[1,1])
- */
-void Graph_eqFunction_320(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,320};
- data->localData[0]->realVars[274] /* points[10]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[397])) * (data->localData[0]->realVars[592] /* points[10]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 321
- type: SIMPLE_ASSIGN
- points[10]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[10].BIP[1,2,1], T[10])
- */
-void Graph_eqFunction_321(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,321};
- data->localData[0]->realVars[593] /* points[10]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[398],data->localData[0]->realVars[209] /* T[10] variable */,"T[10]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 322
- type: SIMPLE_ASSIGN
- points[10]._Gamma._G[1,2] = exp((-points[10].BIP[1,2,2]) * points[10].Gamma.tau[1,2])
- */
-void Graph_eqFunction_322(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,322};
- data->localData[0]->realVars[275] /* points[10]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[399])) * (data->localData[0]->realVars[593] /* points[10]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 323
- type: SIMPLE_ASSIGN
- points[10]._Gamma._sum2[2] = 0.2307692307692308 * points[10].Gamma.tau[1,2] * points[10].Gamma.G[1,2] + 0.7692307692307692 * points[10].Gamma.tau[2,2] * points[10].Gamma.G[2,2]
- */
-void Graph_eqFunction_323(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,323};
- data->localData[0]->realVars[495] /* points[10]._Gamma._sum2[2] variable */ = (0.2307692307692308) * ((data->localData[0]->realVars[593] /* points[10]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[275] /* points[10]._Gamma._G[1,2] variable */)) + (0.7692307692307692) * ((data->localData[0]->realVars[595] /* points[10]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[277] /* points[10]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 324
- type: SIMPLE_ASSIGN
- points[10]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[10].BIP[2,1,1], T[10])
- */
-void Graph_eqFunction_324(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,324};
- data->localData[0]->realVars[594] /* points[10]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[400],data->localData[0]->realVars[209] /* T[10] variable */,"T[10]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 325
- type: SIMPLE_ASSIGN
- points[10]._Gamma._G[2,1] = exp((-points[10].BIP[2,1,2]) * points[10].Gamma.tau[2,1])
- */
-void Graph_eqFunction_325(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,325};
- data->localData[0]->realVars[276] /* points[10]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[401])) * (data->localData[0]->realVars[594] /* points[10]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 326
- type: SIMPLE_ASSIGN
- points[10]._Gamma._sum2[1] = 0.2307692307692308 * points[10].Gamma.tau[1,1] * points[10].Gamma.G[1,1] + 0.7692307692307692 * points[10].Gamma.tau[2,1] * points[10].Gamma.G[2,1]
- */
-void Graph_eqFunction_326(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,326};
- data->localData[0]->realVars[494] /* points[10]._Gamma._sum2[1] variable */ = (0.2307692307692308) * ((data->localData[0]->realVars[592] /* points[10]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[274] /* points[10]._Gamma._G[1,1] variable */)) + (0.7692307692307692) * ((data->localData[0]->realVars[594] /* points[10]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[276] /* points[10]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 327
- type: SIMPLE_ASSIGN
- points[10]._Gamma._sum1[2] = 0.2307692307692308 * points[10].Gamma.G[1,2] + 0.7692307692307692 * points[10].Gamma.G[2,2]
- */
-void Graph_eqFunction_327(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,327};
- data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */ = (0.2307692307692308) * (data->localData[0]->realVars[275] /* points[10]._Gamma._G[1,2] variable */) + (0.7692307692307692) * (data->localData[0]->realVars[277] /* points[10]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 328
- type: SIMPLE_ASSIGN
- points[10]._Gamma._sum1[1] = 0.2307692307692308 * points[10].Gamma.G[1,1] + 0.7692307692307692 * points[10].Gamma.G[2,1]
- */
-void Graph_eqFunction_328(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,328};
- data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */ = (0.2307692307692308) * (data->localData[0]->realVars[274] /* points[10]._Gamma._G[1,1] variable */) + (0.7692307692307692) * (data->localData[0]->realVars[276] /* points[10]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 329
- type: SIMPLE_ASSIGN
- points[10]._gamma[1] = exp(DIVISION(points[10].Gamma.sum2[1], points[10].Gamma.sum1[1]) + 0.2307692307692308 * points[10].Gamma.G[1,1] * DIVISION(points[10].Gamma.tau[1,1] - DIVISION(points[10].Gamma.sum2[1], points[10].Gamma.sum1[1]), points[10].Gamma.sum1[1]) + 0.7692307692307692 * points[10].Gamma.G[1,2] * DIVISION(points[10].Gamma.tau[1,2] - DIVISION(points[10].Gamma.sum2[2], points[10].Gamma.sum1[2]), points[10].Gamma.sum1[2]))
- */
-void Graph_eqFunction_329(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,329};
- data->localData[0]->realVars[892] /* points[10]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[494] /* points[10]._Gamma._sum2[1] variable */,data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes) + (0.2307692307692308) * ((data->localData[0]->realVars[274] /* points[10]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[592] /* points[10]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[494] /* points[10]._Gamma._sum2[1] variable */,data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes))) + (0.7692307692307692) * ((data->localData[0]->realVars[275] /* points[10]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[593] /* points[10]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[495] /* points[10]._Gamma._sum2[2] variable */,data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 330
- type: SIMPLE_ASSIGN
- points[10]._gamma[2] = exp(DIVISION(points[10].Gamma.sum2[2], points[10].Gamma.sum1[2]) + 0.2307692307692308 * points[10].Gamma.G[2,1] * DIVISION(points[10].Gamma.tau[2,1] - DIVISION(points[10].Gamma.sum2[1], points[10].Gamma.sum1[1]), points[10].Gamma.sum1[1]) + 0.7692307692307692 * points[10].Gamma.G[2,2] * DIVISION(points[10].Gamma.tau[2,2] - DIVISION(points[10].Gamma.sum2[2], points[10].Gamma.sum1[2]), points[10].Gamma.sum1[2]))
- */
-void Graph_eqFunction_330(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,330};
- data->localData[0]->realVars[893] /* points[10]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[495] /* points[10]._Gamma._sum2[2] variable */,data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes) + (0.2307692307692308) * ((data->localData[0]->realVars[276] /* points[10]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[594] /* points[10]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[494] /* points[10]._Gamma._sum2[1] variable */,data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes))) + (0.7692307692307692) * ((data->localData[0]->realVars[277] /* points[10]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[595] /* points[10]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[495] /* points[10]._Gamma._sum2[2] variable */,data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 331
- type: SIMPLE_ASSIGN
- points[10]._K[2] = 0.0001 * points[10].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[10].comp[2].VP[1], points[10].comp[2].VP[2], points[10].comp[2].VP[3], points[10].comp[2].VP[4], points[10].comp[2].VP[5], points[10].comp[2].VP[6]}, T[10])
- */
-void Graph_eqFunction_331(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,331};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11398], (modelica_real)data->simulationInfo->realParameter[11399], (modelica_real)data->simulationInfo->realParameter[11400], (modelica_real)data->simulationInfo->realParameter[11401], (modelica_real)data->simulationInfo->realParameter[11402], (modelica_real)data->simulationInfo->realParameter[11403]);
- data->localData[0]->realVars[734] /* points[10]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[893] /* points[10]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[209] /* T[10] variable */)));
- TRACE_POP
-}
-/*
- equation index: 332
- type: SIMPLE_ASSIGN
- points[10]._K[1] = 0.0001 * points[10].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[10].comp[1].VP[1], points[10].comp[1].VP[2], points[10].comp[1].VP[3], points[10].comp[1].VP[4], points[10].comp[1].VP[5], points[10].comp[1].VP[6]}, T[10])
- */
-void Graph_eqFunction_332(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,332};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11392], (modelica_real)data->simulationInfo->realParameter[11393], (modelica_real)data->simulationInfo->realParameter[11394], (modelica_real)data->simulationInfo->realParameter[11395], (modelica_real)data->simulationInfo->realParameter[11396], (modelica_real)data->simulationInfo->realParameter[11397]);
- data->localData[0]->realVars[733] /* points[10]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[892] /* points[10]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[209] /* T[10] variable */)));
- TRACE_POP
-}
-
-void residualFunc334(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,334};
- /* iteration variables */
- data->localData[0]->realVars[209] /* T[10] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_317(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_318(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_319(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_320(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_321(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_322(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_323(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_324(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_325(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_326(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_327(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_328(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_329(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_330(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_331(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_332(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.7692307692307692) * (data->localData[0]->realVars[734] /* points[10]._K[2] variable */) + (-0.2307692307692308) * (data->localData[0]->realVars[733] /* points[10]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS334(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS334(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[10] */
- sysData->nominal[i] = data->modelData->realVarsData[209].attribute /* T[10] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[209].attribute /* T[10] */.min;
- sysData->max[i++] = data->modelData->realVarsData[209].attribute /* T[10] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS334(sysData);
-}
-
-void getIterationVarsNLS334(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[209] /* T[10] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 339
- type: SIMPLE_ASSIGN
- points[11]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[11].BIP[2,2,1], T[11])
- */
-void Graph_eqFunction_339(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,339};
- data->localData[0]->realVars[599] /* points[11]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[410],data->localData[0]->realVars[210] /* T[11] variable */,"T[11]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 340
- type: SIMPLE_ASSIGN
- points[11]._Gamma._G[2,2] = exp((-points[11].BIP[2,2,2]) * points[11].Gamma.tau[2,2])
- */
-void Graph_eqFunction_340(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,340};
- data->localData[0]->realVars[281] /* points[11]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[411])) * (data->localData[0]->realVars[599] /* points[11]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 341
- type: SIMPLE_ASSIGN
- points[11]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[11].BIP[1,1,1], T[11])
- */
-void Graph_eqFunction_341(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,341};
- data->localData[0]->realVars[596] /* points[11]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[404],data->localData[0]->realVars[210] /* T[11] variable */,"T[11]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 342
- type: SIMPLE_ASSIGN
- points[11]._Gamma._G[1,1] = exp((-points[11].BIP[1,1,2]) * points[11].Gamma.tau[1,1])
- */
-void Graph_eqFunction_342(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,342};
- data->localData[0]->realVars[278] /* points[11]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[405])) * (data->localData[0]->realVars[596] /* points[11]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 343
- type: SIMPLE_ASSIGN
- points[11]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[11].BIP[1,2,1], T[11])
- */
-void Graph_eqFunction_343(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,343};
- data->localData[0]->realVars[597] /* points[11]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[406],data->localData[0]->realVars[210] /* T[11] variable */,"T[11]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 344
- type: SIMPLE_ASSIGN
- points[11]._Gamma._G[1,2] = exp((-points[11].BIP[1,2,2]) * points[11].Gamma.tau[1,2])
- */
-void Graph_eqFunction_344(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,344};
- data->localData[0]->realVars[279] /* points[11]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[407])) * (data->localData[0]->realVars[597] /* points[11]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 345
- type: SIMPLE_ASSIGN
- points[11]._Gamma._sum2[2] = 0.2564102564102564 * points[11].Gamma.tau[1,2] * points[11].Gamma.G[1,2] + 0.7435897435897436 * points[11].Gamma.tau[2,2] * points[11].Gamma.G[2,2]
- */
-void Graph_eqFunction_345(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,345};
- data->localData[0]->realVars[497] /* points[11]._Gamma._sum2[2] variable */ = (0.2564102564102564) * ((data->localData[0]->realVars[597] /* points[11]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[279] /* points[11]._Gamma._G[1,2] variable */)) + (0.7435897435897436) * ((data->localData[0]->realVars[599] /* points[11]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[281] /* points[11]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 346
- type: SIMPLE_ASSIGN
- points[11]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[11].BIP[2,1,1], T[11])
- */
-void Graph_eqFunction_346(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,346};
- data->localData[0]->realVars[598] /* points[11]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[408],data->localData[0]->realVars[210] /* T[11] variable */,"T[11]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 347
- type: SIMPLE_ASSIGN
- points[11]._Gamma._G[2,1] = exp((-points[11].BIP[2,1,2]) * points[11].Gamma.tau[2,1])
- */
-void Graph_eqFunction_347(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,347};
- data->localData[0]->realVars[280] /* points[11]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[409])) * (data->localData[0]->realVars[598] /* points[11]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 348
- type: SIMPLE_ASSIGN
- points[11]._Gamma._sum2[1] = 0.2564102564102564 * points[11].Gamma.tau[1,1] * points[11].Gamma.G[1,1] + 0.7435897435897436 * points[11].Gamma.tau[2,1] * points[11].Gamma.G[2,1]
- */
-void Graph_eqFunction_348(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,348};
- data->localData[0]->realVars[496] /* points[11]._Gamma._sum2[1] variable */ = (0.2564102564102564) * ((data->localData[0]->realVars[596] /* points[11]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[278] /* points[11]._Gamma._G[1,1] variable */)) + (0.7435897435897436) * ((data->localData[0]->realVars[598] /* points[11]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[280] /* points[11]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 349
- type: SIMPLE_ASSIGN
- points[11]._Gamma._sum1[2] = 0.2564102564102564 * points[11].Gamma.G[1,2] + 0.7435897435897436 * points[11].Gamma.G[2,2]
- */
-void Graph_eqFunction_349(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,349};
- data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */ = (0.2564102564102564) * (data->localData[0]->realVars[279] /* points[11]._Gamma._G[1,2] variable */) + (0.7435897435897436) * (data->localData[0]->realVars[281] /* points[11]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 350
- type: SIMPLE_ASSIGN
- points[11]._Gamma._sum1[1] = 0.2564102564102564 * points[11].Gamma.G[1,1] + 0.7435897435897436 * points[11].Gamma.G[2,1]
- */
-void Graph_eqFunction_350(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,350};
- data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */ = (0.2564102564102564) * (data->localData[0]->realVars[278] /* points[11]._Gamma._G[1,1] variable */) + (0.7435897435897436) * (data->localData[0]->realVars[280] /* points[11]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 351
- type: SIMPLE_ASSIGN
- points[11]._gamma[1] = exp(DIVISION(points[11].Gamma.sum2[1], points[11].Gamma.sum1[1]) + 0.2564102564102564 * points[11].Gamma.G[1,1] * DIVISION(points[11].Gamma.tau[1,1] - DIVISION(points[11].Gamma.sum2[1], points[11].Gamma.sum1[1]), points[11].Gamma.sum1[1]) + 0.7435897435897436 * points[11].Gamma.G[1,2] * DIVISION(points[11].Gamma.tau[1,2] - DIVISION(points[11].Gamma.sum2[2], points[11].Gamma.sum1[2]), points[11].Gamma.sum1[2]))
- */
-void Graph_eqFunction_351(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,351};
- data->localData[0]->realVars[894] /* points[11]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[496] /* points[11]._Gamma._sum2[1] variable */,data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes) + (0.2564102564102564) * ((data->localData[0]->realVars[278] /* points[11]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[596] /* points[11]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[496] /* points[11]._Gamma._sum2[1] variable */,data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes))) + (0.7435897435897436) * ((data->localData[0]->realVars[279] /* points[11]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[597] /* points[11]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[497] /* points[11]._Gamma._sum2[2] variable */,data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 352
- type: SIMPLE_ASSIGN
- points[11]._gamma[2] = exp(DIVISION(points[11].Gamma.sum2[2], points[11].Gamma.sum1[2]) + 0.2564102564102564 * points[11].Gamma.G[2,1] * DIVISION(points[11].Gamma.tau[2,1] - DIVISION(points[11].Gamma.sum2[1], points[11].Gamma.sum1[1]), points[11].Gamma.sum1[1]) + 0.7435897435897436 * points[11].Gamma.G[2,2] * DIVISION(points[11].Gamma.tau[2,2] - DIVISION(points[11].Gamma.sum2[2], points[11].Gamma.sum1[2]), points[11].Gamma.sum1[2]))
- */
-void Graph_eqFunction_352(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,352};
- data->localData[0]->realVars[895] /* points[11]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[497] /* points[11]._Gamma._sum2[2] variable */,data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes) + (0.2564102564102564) * ((data->localData[0]->realVars[280] /* points[11]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[598] /* points[11]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[496] /* points[11]._Gamma._sum2[1] variable */,data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes))) + (0.7435897435897436) * ((data->localData[0]->realVars[281] /* points[11]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[599] /* points[11]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[497] /* points[11]._Gamma._sum2[2] variable */,data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 353
- type: SIMPLE_ASSIGN
- points[11]._K[2] = 0.0001 * points[11].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[11].comp[2].VP[1], points[11].comp[2].VP[2], points[11].comp[2].VP[3], points[11].comp[2].VP[4], points[11].comp[2].VP[5], points[11].comp[2].VP[6]}, T[11])
- */
-void Graph_eqFunction_353(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,353};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11410], (modelica_real)data->simulationInfo->realParameter[11411], (modelica_real)data->simulationInfo->realParameter[11412], (modelica_real)data->simulationInfo->realParameter[11413], (modelica_real)data->simulationInfo->realParameter[11414], (modelica_real)data->simulationInfo->realParameter[11415]);
- data->localData[0]->realVars[736] /* points[11]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[895] /* points[11]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[210] /* T[11] variable */)));
- TRACE_POP
-}
-/*
- equation index: 354
- type: SIMPLE_ASSIGN
- points[11]._K[1] = 0.0001 * points[11].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[11].comp[1].VP[1], points[11].comp[1].VP[2], points[11].comp[1].VP[3], points[11].comp[1].VP[4], points[11].comp[1].VP[5], points[11].comp[1].VP[6]}, T[11])
- */
-void Graph_eqFunction_354(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,354};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11404], (modelica_real)data->simulationInfo->realParameter[11405], (modelica_real)data->simulationInfo->realParameter[11406], (modelica_real)data->simulationInfo->realParameter[11407], (modelica_real)data->simulationInfo->realParameter[11408], (modelica_real)data->simulationInfo->realParameter[11409]);
- data->localData[0]->realVars[735] /* points[11]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[894] /* points[11]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[210] /* T[11] variable */)));
- TRACE_POP
-}
-
-void residualFunc356(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,356};
- /* iteration variables */
- data->localData[0]->realVars[210] /* T[11] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_339(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_340(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_341(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_342(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_343(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_344(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_345(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_346(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_347(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_348(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_349(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_350(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_351(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_352(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_353(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_354(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.7435897435897436) * (data->localData[0]->realVars[736] /* points[11]._K[2] variable */) + (-0.2564102564102564) * (data->localData[0]->realVars[735] /* points[11]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS356(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS356(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[11] */
- sysData->nominal[i] = data->modelData->realVarsData[210].attribute /* T[11] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[210].attribute /* T[11] */.min;
- sysData->max[i++] = data->modelData->realVarsData[210].attribute /* T[11] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS356(sysData);
-}
-
-void getIterationVarsNLS356(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[210] /* T[11] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 361
- type: SIMPLE_ASSIGN
- points[12]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[12].BIP[2,2,1], T[12])
- */
-void Graph_eqFunction_361(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,361};
- data->localData[0]->realVars[603] /* points[12]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[418],data->localData[0]->realVars[211] /* T[12] variable */,"T[12]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 362
- type: SIMPLE_ASSIGN
- points[12]._Gamma._G[2,2] = exp((-points[12].BIP[2,2,2]) * points[12].Gamma.tau[2,2])
- */
-void Graph_eqFunction_362(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,362};
- data->localData[0]->realVars[285] /* points[12]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[419])) * (data->localData[0]->realVars[603] /* points[12]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 363
- type: SIMPLE_ASSIGN
- points[12]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[12].BIP[1,1,1], T[12])
- */
-void Graph_eqFunction_363(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,363};
- data->localData[0]->realVars[600] /* points[12]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[412],data->localData[0]->realVars[211] /* T[12] variable */,"T[12]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 364
- type: SIMPLE_ASSIGN
- points[12]._Gamma._G[1,1] = exp((-points[12].BIP[1,1,2]) * points[12].Gamma.tau[1,1])
- */
-void Graph_eqFunction_364(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,364};
- data->localData[0]->realVars[282] /* points[12]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[413])) * (data->localData[0]->realVars[600] /* points[12]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 365
- type: SIMPLE_ASSIGN
- points[12]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[12].BIP[1,2,1], T[12])
- */
-void Graph_eqFunction_365(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,365};
- data->localData[0]->realVars[601] /* points[12]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[414],data->localData[0]->realVars[211] /* T[12] variable */,"T[12]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 366
- type: SIMPLE_ASSIGN
- points[12]._Gamma._G[1,2] = exp((-points[12].BIP[1,2,2]) * points[12].Gamma.tau[1,2])
- */
-void Graph_eqFunction_366(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,366};
- data->localData[0]->realVars[283] /* points[12]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[415])) * (data->localData[0]->realVars[601] /* points[12]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 367
- type: SIMPLE_ASSIGN
- points[12]._Gamma._sum2[2] = 0.2820512820512821 * points[12].Gamma.tau[1,2] * points[12].Gamma.G[1,2] + 0.717948717948718 * points[12].Gamma.tau[2,2] * points[12].Gamma.G[2,2]
- */
-void Graph_eqFunction_367(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,367};
- data->localData[0]->realVars[499] /* points[12]._Gamma._sum2[2] variable */ = (0.2820512820512821) * ((data->localData[0]->realVars[601] /* points[12]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[283] /* points[12]._Gamma._G[1,2] variable */)) + (0.717948717948718) * ((data->localData[0]->realVars[603] /* points[12]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[285] /* points[12]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 368
- type: SIMPLE_ASSIGN
- points[12]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[12].BIP[2,1,1], T[12])
- */
-void Graph_eqFunction_368(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,368};
- data->localData[0]->realVars[602] /* points[12]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[416],data->localData[0]->realVars[211] /* T[12] variable */,"T[12]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 369
- type: SIMPLE_ASSIGN
- points[12]._Gamma._G[2,1] = exp((-points[12].BIP[2,1,2]) * points[12].Gamma.tau[2,1])
- */
-void Graph_eqFunction_369(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,369};
- data->localData[0]->realVars[284] /* points[12]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[417])) * (data->localData[0]->realVars[602] /* points[12]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 370
- type: SIMPLE_ASSIGN
- points[12]._Gamma._sum2[1] = 0.2820512820512821 * points[12].Gamma.tau[1,1] * points[12].Gamma.G[1,1] + 0.717948717948718 * points[12].Gamma.tau[2,1] * points[12].Gamma.G[2,1]
- */
-void Graph_eqFunction_370(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,370};
- data->localData[0]->realVars[498] /* points[12]._Gamma._sum2[1] variable */ = (0.2820512820512821) * ((data->localData[0]->realVars[600] /* points[12]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[282] /* points[12]._Gamma._G[1,1] variable */)) + (0.717948717948718) * ((data->localData[0]->realVars[602] /* points[12]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[284] /* points[12]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 371
- type: SIMPLE_ASSIGN
- points[12]._Gamma._sum1[2] = 0.2820512820512821 * points[12].Gamma.G[1,2] + 0.717948717948718 * points[12].Gamma.G[2,2]
- */
-void Graph_eqFunction_371(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,371};
- data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */ = (0.2820512820512821) * (data->localData[0]->realVars[283] /* points[12]._Gamma._G[1,2] variable */) + (0.717948717948718) * (data->localData[0]->realVars[285] /* points[12]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 372
- type: SIMPLE_ASSIGN
- points[12]._Gamma._sum1[1] = 0.2820512820512821 * points[12].Gamma.G[1,1] + 0.717948717948718 * points[12].Gamma.G[2,1]
- */
-void Graph_eqFunction_372(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,372};
- data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */ = (0.2820512820512821) * (data->localData[0]->realVars[282] /* points[12]._Gamma._G[1,1] variable */) + (0.717948717948718) * (data->localData[0]->realVars[284] /* points[12]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 373
- type: SIMPLE_ASSIGN
- points[12]._gamma[1] = exp(DIVISION(points[12].Gamma.sum2[1], points[12].Gamma.sum1[1]) + 0.2820512820512821 * points[12].Gamma.G[1,1] * DIVISION(points[12].Gamma.tau[1,1] - DIVISION(points[12].Gamma.sum2[1], points[12].Gamma.sum1[1]), points[12].Gamma.sum1[1]) + 0.717948717948718 * points[12].Gamma.G[1,2] * DIVISION(points[12].Gamma.tau[1,2] - DIVISION(points[12].Gamma.sum2[2], points[12].Gamma.sum1[2]), points[12].Gamma.sum1[2]))
- */
-void Graph_eqFunction_373(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,373};
- data->localData[0]->realVars[896] /* points[12]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[498] /* points[12]._Gamma._sum2[1] variable */,data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes) + (0.2820512820512821) * ((data->localData[0]->realVars[282] /* points[12]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[600] /* points[12]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[498] /* points[12]._Gamma._sum2[1] variable */,data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes))) + (0.717948717948718) * ((data->localData[0]->realVars[283] /* points[12]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[601] /* points[12]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[499] /* points[12]._Gamma._sum2[2] variable */,data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 374
- type: SIMPLE_ASSIGN
- points[12]._gamma[2] = exp(DIVISION(points[12].Gamma.sum2[2], points[12].Gamma.sum1[2]) + 0.2820512820512821 * points[12].Gamma.G[2,1] * DIVISION(points[12].Gamma.tau[2,1] - DIVISION(points[12].Gamma.sum2[1], points[12].Gamma.sum1[1]), points[12].Gamma.sum1[1]) + 0.717948717948718 * points[12].Gamma.G[2,2] * DIVISION(points[12].Gamma.tau[2,2] - DIVISION(points[12].Gamma.sum2[2], points[12].Gamma.sum1[2]), points[12].Gamma.sum1[2]))
- */
-void Graph_eqFunction_374(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,374};
- data->localData[0]->realVars[897] /* points[12]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[499] /* points[12]._Gamma._sum2[2] variable */,data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes) + (0.2820512820512821) * ((data->localData[0]->realVars[284] /* points[12]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[602] /* points[12]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[498] /* points[12]._Gamma._sum2[1] variable */,data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes))) + (0.717948717948718) * ((data->localData[0]->realVars[285] /* points[12]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[603] /* points[12]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[499] /* points[12]._Gamma._sum2[2] variable */,data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 375
- type: SIMPLE_ASSIGN
- points[12]._K[2] = 0.0001 * points[12].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[12].comp[2].VP[1], points[12].comp[2].VP[2], points[12].comp[2].VP[3], points[12].comp[2].VP[4], points[12].comp[2].VP[5], points[12].comp[2].VP[6]}, T[12])
- */
-void Graph_eqFunction_375(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,375};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11422], (modelica_real)data->simulationInfo->realParameter[11423], (modelica_real)data->simulationInfo->realParameter[11424], (modelica_real)data->simulationInfo->realParameter[11425], (modelica_real)data->simulationInfo->realParameter[11426], (modelica_real)data->simulationInfo->realParameter[11427]);
- data->localData[0]->realVars[738] /* points[12]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[897] /* points[12]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[211] /* T[12] variable */)));
- TRACE_POP
-}
-/*
- equation index: 376
- type: SIMPLE_ASSIGN
- points[12]._K[1] = 0.0001 * points[12].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[12].comp[1].VP[1], points[12].comp[1].VP[2], points[12].comp[1].VP[3], points[12].comp[1].VP[4], points[12].comp[1].VP[5], points[12].comp[1].VP[6]}, T[12])
- */
-void Graph_eqFunction_376(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,376};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11416], (modelica_real)data->simulationInfo->realParameter[11417], (modelica_real)data->simulationInfo->realParameter[11418], (modelica_real)data->simulationInfo->realParameter[11419], (modelica_real)data->simulationInfo->realParameter[11420], (modelica_real)data->simulationInfo->realParameter[11421]);
- data->localData[0]->realVars[737] /* points[12]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[896] /* points[12]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[211] /* T[12] variable */)));
- TRACE_POP
-}
-
-void residualFunc378(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,378};
- /* iteration variables */
- data->localData[0]->realVars[211] /* T[12] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_361(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_362(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_363(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_364(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_365(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_366(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_367(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_368(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_369(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_370(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_371(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_372(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_373(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_374(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_375(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_376(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.717948717948718) * (data->localData[0]->realVars[738] /* points[12]._K[2] variable */) + (-0.2820512820512821) * (data->localData[0]->realVars[737] /* points[12]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS378(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS378(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[12] */
- sysData->nominal[i] = data->modelData->realVarsData[211].attribute /* T[12] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[211].attribute /* T[12] */.min;
- sysData->max[i++] = data->modelData->realVarsData[211].attribute /* T[12] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS378(sysData);
-}
-
-void getIterationVarsNLS378(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[211] /* T[12] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 383
- type: SIMPLE_ASSIGN
- points[13]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[13].BIP[2,2,1], T[13])
- */
-void Graph_eqFunction_383(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,383};
- data->localData[0]->realVars[607] /* points[13]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[426],data->localData[0]->realVars[212] /* T[13] variable */,"T[13]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 384
- type: SIMPLE_ASSIGN
- points[13]._Gamma._G[2,2] = exp((-points[13].BIP[2,2,2]) * points[13].Gamma.tau[2,2])
- */
-void Graph_eqFunction_384(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,384};
- data->localData[0]->realVars[289] /* points[13]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[427])) * (data->localData[0]->realVars[607] /* points[13]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 385
- type: SIMPLE_ASSIGN
- points[13]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[13].BIP[1,1,1], T[13])
- */
-void Graph_eqFunction_385(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,385};
- data->localData[0]->realVars[604] /* points[13]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[420],data->localData[0]->realVars[212] /* T[13] variable */,"T[13]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 386
- type: SIMPLE_ASSIGN
- points[13]._Gamma._G[1,1] = exp((-points[13].BIP[1,1,2]) * points[13].Gamma.tau[1,1])
- */
-void Graph_eqFunction_386(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,386};
- data->localData[0]->realVars[286] /* points[13]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[421])) * (data->localData[0]->realVars[604] /* points[13]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 387
- type: SIMPLE_ASSIGN
- points[13]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[13].BIP[1,2,1], T[13])
- */
-void Graph_eqFunction_387(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,387};
- data->localData[0]->realVars[605] /* points[13]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[422],data->localData[0]->realVars[212] /* T[13] variable */,"T[13]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 388
- type: SIMPLE_ASSIGN
- points[13]._Gamma._G[1,2] = exp((-points[13].BIP[1,2,2]) * points[13].Gamma.tau[1,2])
- */
-void Graph_eqFunction_388(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,388};
- data->localData[0]->realVars[287] /* points[13]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[423])) * (data->localData[0]->realVars[605] /* points[13]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 389
- type: SIMPLE_ASSIGN
- points[13]._Gamma._sum2[2] = 0.3076923076923077 * points[13].Gamma.tau[1,2] * points[13].Gamma.G[1,2] + 0.6923076923076923 * points[13].Gamma.tau[2,2] * points[13].Gamma.G[2,2]
- */
-void Graph_eqFunction_389(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,389};
- data->localData[0]->realVars[501] /* points[13]._Gamma._sum2[2] variable */ = (0.3076923076923077) * ((data->localData[0]->realVars[605] /* points[13]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[287] /* points[13]._Gamma._G[1,2] variable */)) + (0.6923076923076923) * ((data->localData[0]->realVars[607] /* points[13]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[289] /* points[13]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 390
- type: SIMPLE_ASSIGN
- points[13]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[13].BIP[2,1,1], T[13])
- */
-void Graph_eqFunction_390(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,390};
- data->localData[0]->realVars[606] /* points[13]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[424],data->localData[0]->realVars[212] /* T[13] variable */,"T[13]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 391
- type: SIMPLE_ASSIGN
- points[13]._Gamma._G[2,1] = exp((-points[13].BIP[2,1,2]) * points[13].Gamma.tau[2,1])
- */
-void Graph_eqFunction_391(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,391};
- data->localData[0]->realVars[288] /* points[13]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[425])) * (data->localData[0]->realVars[606] /* points[13]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 392
- type: SIMPLE_ASSIGN
- points[13]._Gamma._sum2[1] = 0.3076923076923077 * points[13].Gamma.tau[1,1] * points[13].Gamma.G[1,1] + 0.6923076923076923 * points[13].Gamma.tau[2,1] * points[13].Gamma.G[2,1]
- */
-void Graph_eqFunction_392(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,392};
- data->localData[0]->realVars[500] /* points[13]._Gamma._sum2[1] variable */ = (0.3076923076923077) * ((data->localData[0]->realVars[604] /* points[13]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[286] /* points[13]._Gamma._G[1,1] variable */)) + (0.6923076923076923) * ((data->localData[0]->realVars[606] /* points[13]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[288] /* points[13]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 393
- type: SIMPLE_ASSIGN
- points[13]._Gamma._sum1[2] = 0.3076923076923077 * points[13].Gamma.G[1,2] + 0.6923076923076923 * points[13].Gamma.G[2,2]
- */
-void Graph_eqFunction_393(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,393};
- data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */ = (0.3076923076923077) * (data->localData[0]->realVars[287] /* points[13]._Gamma._G[1,2] variable */) + (0.6923076923076923) * (data->localData[0]->realVars[289] /* points[13]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 394
- type: SIMPLE_ASSIGN
- points[13]._Gamma._sum1[1] = 0.3076923076923077 * points[13].Gamma.G[1,1] + 0.6923076923076923 * points[13].Gamma.G[2,1]
- */
-void Graph_eqFunction_394(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,394};
- data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */ = (0.3076923076923077) * (data->localData[0]->realVars[286] /* points[13]._Gamma._G[1,1] variable */) + (0.6923076923076923) * (data->localData[0]->realVars[288] /* points[13]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 395
- type: SIMPLE_ASSIGN
- points[13]._gamma[1] = exp(DIVISION(points[13].Gamma.sum2[1], points[13].Gamma.sum1[1]) + 0.3076923076923077 * points[13].Gamma.G[1,1] * DIVISION(points[13].Gamma.tau[1,1] - DIVISION(points[13].Gamma.sum2[1], points[13].Gamma.sum1[1]), points[13].Gamma.sum1[1]) + 0.6923076923076923 * points[13].Gamma.G[1,2] * DIVISION(points[13].Gamma.tau[1,2] - DIVISION(points[13].Gamma.sum2[2], points[13].Gamma.sum1[2]), points[13].Gamma.sum1[2]))
- */
-void Graph_eqFunction_395(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,395};
- data->localData[0]->realVars[898] /* points[13]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[500] /* points[13]._Gamma._sum2[1] variable */,data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes) + (0.3076923076923077) * ((data->localData[0]->realVars[286] /* points[13]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[604] /* points[13]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[500] /* points[13]._Gamma._sum2[1] variable */,data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes))) + (0.6923076923076923) * ((data->localData[0]->realVars[287] /* points[13]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[605] /* points[13]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[501] /* points[13]._Gamma._sum2[2] variable */,data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 396
- type: SIMPLE_ASSIGN
- points[13]._gamma[2] = exp(DIVISION(points[13].Gamma.sum2[2], points[13].Gamma.sum1[2]) + 0.3076923076923077 * points[13].Gamma.G[2,1] * DIVISION(points[13].Gamma.tau[2,1] - DIVISION(points[13].Gamma.sum2[1], points[13].Gamma.sum1[1]), points[13].Gamma.sum1[1]) + 0.6923076923076923 * points[13].Gamma.G[2,2] * DIVISION(points[13].Gamma.tau[2,2] - DIVISION(points[13].Gamma.sum2[2], points[13].Gamma.sum1[2]), points[13].Gamma.sum1[2]))
- */
-void Graph_eqFunction_396(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,396};
- data->localData[0]->realVars[899] /* points[13]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[501] /* points[13]._Gamma._sum2[2] variable */,data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes) + (0.3076923076923077) * ((data->localData[0]->realVars[288] /* points[13]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[606] /* points[13]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[500] /* points[13]._Gamma._sum2[1] variable */,data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes))) + (0.6923076923076923) * ((data->localData[0]->realVars[289] /* points[13]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[607] /* points[13]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[501] /* points[13]._Gamma._sum2[2] variable */,data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 397
- type: SIMPLE_ASSIGN
- points[13]._K[2] = 0.0001 * points[13].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[13].comp[2].VP[1], points[13].comp[2].VP[2], points[13].comp[2].VP[3], points[13].comp[2].VP[4], points[13].comp[2].VP[5], points[13].comp[2].VP[6]}, T[13])
- */
-void Graph_eqFunction_397(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,397};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11434], (modelica_real)data->simulationInfo->realParameter[11435], (modelica_real)data->simulationInfo->realParameter[11436], (modelica_real)data->simulationInfo->realParameter[11437], (modelica_real)data->simulationInfo->realParameter[11438], (modelica_real)data->simulationInfo->realParameter[11439]);
- data->localData[0]->realVars[740] /* points[13]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[899] /* points[13]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[212] /* T[13] variable */)));
- TRACE_POP
-}
-/*
- equation index: 398
- type: SIMPLE_ASSIGN
- points[13]._K[1] = 0.0001 * points[13].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[13].comp[1].VP[1], points[13].comp[1].VP[2], points[13].comp[1].VP[3], points[13].comp[1].VP[4], points[13].comp[1].VP[5], points[13].comp[1].VP[6]}, T[13])
- */
-void Graph_eqFunction_398(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,398};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11428], (modelica_real)data->simulationInfo->realParameter[11429], (modelica_real)data->simulationInfo->realParameter[11430], (modelica_real)data->simulationInfo->realParameter[11431], (modelica_real)data->simulationInfo->realParameter[11432], (modelica_real)data->simulationInfo->realParameter[11433]);
- data->localData[0]->realVars[739] /* points[13]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[898] /* points[13]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[212] /* T[13] variable */)));
- TRACE_POP
-}
-
-void residualFunc400(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,400};
- /* iteration variables */
- data->localData[0]->realVars[212] /* T[13] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_383(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_384(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_385(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_386(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_387(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_388(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_389(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_390(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_391(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_392(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_393(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_394(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_395(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_396(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_397(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_398(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.6923076923076923) * (data->localData[0]->realVars[740] /* points[13]._K[2] variable */) + (-0.3076923076923077) * (data->localData[0]->realVars[739] /* points[13]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS400(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS400(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[13] */
- sysData->nominal[i] = data->modelData->realVarsData[212].attribute /* T[13] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[212].attribute /* T[13] */.min;
- sysData->max[i++] = data->modelData->realVarsData[212].attribute /* T[13] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS400(sysData);
-}
-
-void getIterationVarsNLS400(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[212] /* T[13] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 405
- type: SIMPLE_ASSIGN
- points[14]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[14].BIP[2,2,1], T[14])
- */
-void Graph_eqFunction_405(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,405};
- data->localData[0]->realVars[611] /* points[14]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[434],data->localData[0]->realVars[213] /* T[14] variable */,"T[14]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 406
- type: SIMPLE_ASSIGN
- points[14]._Gamma._G[2,2] = exp((-points[14].BIP[2,2,2]) * points[14].Gamma.tau[2,2])
- */
-void Graph_eqFunction_406(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,406};
- data->localData[0]->realVars[293] /* points[14]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[435])) * (data->localData[0]->realVars[611] /* points[14]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 407
- type: SIMPLE_ASSIGN
- points[14]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[14].BIP[1,1,1], T[14])
- */
-void Graph_eqFunction_407(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,407};
- data->localData[0]->realVars[608] /* points[14]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[428],data->localData[0]->realVars[213] /* T[14] variable */,"T[14]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 408
- type: SIMPLE_ASSIGN
- points[14]._Gamma._G[1,1] = exp((-points[14].BIP[1,1,2]) * points[14].Gamma.tau[1,1])
- */
-void Graph_eqFunction_408(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,408};
- data->localData[0]->realVars[290] /* points[14]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[429])) * (data->localData[0]->realVars[608] /* points[14]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 409
- type: SIMPLE_ASSIGN
- points[14]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[14].BIP[1,2,1], T[14])
- */
-void Graph_eqFunction_409(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,409};
- data->localData[0]->realVars[609] /* points[14]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[430],data->localData[0]->realVars[213] /* T[14] variable */,"T[14]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 410
- type: SIMPLE_ASSIGN
- points[14]._Gamma._G[1,2] = exp((-points[14].BIP[1,2,2]) * points[14].Gamma.tau[1,2])
- */
-void Graph_eqFunction_410(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,410};
- data->localData[0]->realVars[291] /* points[14]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[431])) * (data->localData[0]->realVars[609] /* points[14]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 411
- type: SIMPLE_ASSIGN
- points[14]._Gamma._sum2[2] = 0.3333333333333333 * points[14].Gamma.tau[1,2] * points[14].Gamma.G[1,2] + 0.6666666666666667 * points[14].Gamma.tau[2,2] * points[14].Gamma.G[2,2]
- */
-void Graph_eqFunction_411(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,411};
- data->localData[0]->realVars[503] /* points[14]._Gamma._sum2[2] variable */ = (0.3333333333333333) * ((data->localData[0]->realVars[609] /* points[14]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[291] /* points[14]._Gamma._G[1,2] variable */)) + (0.6666666666666667) * ((data->localData[0]->realVars[611] /* points[14]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[293] /* points[14]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 412
- type: SIMPLE_ASSIGN
- points[14]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[14].BIP[2,1,1], T[14])
- */
-void Graph_eqFunction_412(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,412};
- data->localData[0]->realVars[610] /* points[14]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[432],data->localData[0]->realVars[213] /* T[14] variable */,"T[14]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 413
- type: SIMPLE_ASSIGN
- points[14]._Gamma._G[2,1] = exp((-points[14].BIP[2,1,2]) * points[14].Gamma.tau[2,1])
- */
-void Graph_eqFunction_413(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,413};
- data->localData[0]->realVars[292] /* points[14]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[433])) * (data->localData[0]->realVars[610] /* points[14]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 414
- type: SIMPLE_ASSIGN
- points[14]._Gamma._sum2[1] = 0.3333333333333333 * points[14].Gamma.tau[1,1] * points[14].Gamma.G[1,1] + 0.6666666666666667 * points[14].Gamma.tau[2,1] * points[14].Gamma.G[2,1]
- */
-void Graph_eqFunction_414(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,414};
- data->localData[0]->realVars[502] /* points[14]._Gamma._sum2[1] variable */ = (0.3333333333333333) * ((data->localData[0]->realVars[608] /* points[14]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[290] /* points[14]._Gamma._G[1,1] variable */)) + (0.6666666666666667) * ((data->localData[0]->realVars[610] /* points[14]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[292] /* points[14]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 415
- type: SIMPLE_ASSIGN
- points[14]._Gamma._sum1[2] = 0.3333333333333333 * points[14].Gamma.G[1,2] + 0.6666666666666667 * points[14].Gamma.G[2,2]
- */
-void Graph_eqFunction_415(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,415};
- data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */ = (0.3333333333333333) * (data->localData[0]->realVars[291] /* points[14]._Gamma._G[1,2] variable */) + (0.6666666666666667) * (data->localData[0]->realVars[293] /* points[14]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 416
- type: SIMPLE_ASSIGN
- points[14]._Gamma._sum1[1] = 0.3333333333333333 * points[14].Gamma.G[1,1] + 0.6666666666666667 * points[14].Gamma.G[2,1]
- */
-void Graph_eqFunction_416(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,416};
- data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */ = (0.3333333333333333) * (data->localData[0]->realVars[290] /* points[14]._Gamma._G[1,1] variable */) + (0.6666666666666667) * (data->localData[0]->realVars[292] /* points[14]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 417
- type: SIMPLE_ASSIGN
- points[14]._gamma[1] = exp(DIVISION(points[14].Gamma.sum2[1], points[14].Gamma.sum1[1]) + 0.3333333333333333 * points[14].Gamma.G[1,1] * DIVISION(points[14].Gamma.tau[1,1] - DIVISION(points[14].Gamma.sum2[1], points[14].Gamma.sum1[1]), points[14].Gamma.sum1[1]) + 0.6666666666666667 * points[14].Gamma.G[1,2] * DIVISION(points[14].Gamma.tau[1,2] - DIVISION(points[14].Gamma.sum2[2], points[14].Gamma.sum1[2]), points[14].Gamma.sum1[2]))
- */
-void Graph_eqFunction_417(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,417};
- data->localData[0]->realVars[900] /* points[14]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[502] /* points[14]._Gamma._sum2[1] variable */,data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes) + (0.3333333333333333) * ((data->localData[0]->realVars[290] /* points[14]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[608] /* points[14]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[502] /* points[14]._Gamma._sum2[1] variable */,data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes))) + (0.6666666666666667) * ((data->localData[0]->realVars[291] /* points[14]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[609] /* points[14]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[503] /* points[14]._Gamma._sum2[2] variable */,data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 418
- type: SIMPLE_ASSIGN
- points[14]._gamma[2] = exp(DIVISION(points[14].Gamma.sum2[2], points[14].Gamma.sum1[2]) + 0.3333333333333333 * points[14].Gamma.G[2,1] * DIVISION(points[14].Gamma.tau[2,1] - DIVISION(points[14].Gamma.sum2[1], points[14].Gamma.sum1[1]), points[14].Gamma.sum1[1]) + 0.6666666666666667 * points[14].Gamma.G[2,2] * DIVISION(points[14].Gamma.tau[2,2] - DIVISION(points[14].Gamma.sum2[2], points[14].Gamma.sum1[2]), points[14].Gamma.sum1[2]))
- */
-void Graph_eqFunction_418(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,418};
- data->localData[0]->realVars[901] /* points[14]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[503] /* points[14]._Gamma._sum2[2] variable */,data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes) + (0.3333333333333333) * ((data->localData[0]->realVars[292] /* points[14]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[610] /* points[14]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[502] /* points[14]._Gamma._sum2[1] variable */,data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes))) + (0.6666666666666667) * ((data->localData[0]->realVars[293] /* points[14]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[611] /* points[14]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[503] /* points[14]._Gamma._sum2[2] variable */,data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 419
- type: SIMPLE_ASSIGN
- points[14]._K[2] = 0.0001 * points[14].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[14].comp[2].VP[1], points[14].comp[2].VP[2], points[14].comp[2].VP[3], points[14].comp[2].VP[4], points[14].comp[2].VP[5], points[14].comp[2].VP[6]}, T[14])
- */
-void Graph_eqFunction_419(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,419};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11446], (modelica_real)data->simulationInfo->realParameter[11447], (modelica_real)data->simulationInfo->realParameter[11448], (modelica_real)data->simulationInfo->realParameter[11449], (modelica_real)data->simulationInfo->realParameter[11450], (modelica_real)data->simulationInfo->realParameter[11451]);
- data->localData[0]->realVars[742] /* points[14]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[901] /* points[14]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[213] /* T[14] variable */)));
- TRACE_POP
-}
-/*
- equation index: 420
- type: SIMPLE_ASSIGN
- points[14]._K[1] = 0.0001 * points[14].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[14].comp[1].VP[1], points[14].comp[1].VP[2], points[14].comp[1].VP[3], points[14].comp[1].VP[4], points[14].comp[1].VP[5], points[14].comp[1].VP[6]}, T[14])
- */
-void Graph_eqFunction_420(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,420};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11440], (modelica_real)data->simulationInfo->realParameter[11441], (modelica_real)data->simulationInfo->realParameter[11442], (modelica_real)data->simulationInfo->realParameter[11443], (modelica_real)data->simulationInfo->realParameter[11444], (modelica_real)data->simulationInfo->realParameter[11445]);
- data->localData[0]->realVars[741] /* points[14]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[900] /* points[14]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[213] /* T[14] variable */)));
- TRACE_POP
-}
-
-void residualFunc422(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,422};
- /* iteration variables */
- data->localData[0]->realVars[213] /* T[14] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_405(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_406(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_407(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_408(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_409(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_410(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_411(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_412(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_413(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_414(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_415(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_416(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_417(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_418(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_419(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_420(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.6666666666666667) * (data->localData[0]->realVars[742] /* points[14]._K[2] variable */) + (-0.3333333333333333) * (data->localData[0]->realVars[741] /* points[14]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS422(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS422(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[14] */
- sysData->nominal[i] = data->modelData->realVarsData[213].attribute /* T[14] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[213].attribute /* T[14] */.min;
- sysData->max[i++] = data->modelData->realVarsData[213].attribute /* T[14] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS422(sysData);
-}
-
-void getIterationVarsNLS422(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[213] /* T[14] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 427
- type: SIMPLE_ASSIGN
- points[15]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[15].BIP[2,2,1], T[15])
- */
-void Graph_eqFunction_427(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,427};
- data->localData[0]->realVars[615] /* points[15]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[442],data->localData[0]->realVars[214] /* T[15] variable */,"T[15]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 428
- type: SIMPLE_ASSIGN
- points[15]._Gamma._G[2,2] = exp((-points[15].BIP[2,2,2]) * points[15].Gamma.tau[2,2])
- */
-void Graph_eqFunction_428(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,428};
- data->localData[0]->realVars[297] /* points[15]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[443])) * (data->localData[0]->realVars[615] /* points[15]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 429
- type: SIMPLE_ASSIGN
- points[15]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[15].BIP[1,1,1], T[15])
- */
-void Graph_eqFunction_429(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,429};
- data->localData[0]->realVars[612] /* points[15]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[436],data->localData[0]->realVars[214] /* T[15] variable */,"T[15]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 430
- type: SIMPLE_ASSIGN
- points[15]._Gamma._G[1,1] = exp((-points[15].BIP[1,1,2]) * points[15].Gamma.tau[1,1])
- */
-void Graph_eqFunction_430(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,430};
- data->localData[0]->realVars[294] /* points[15]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[437])) * (data->localData[0]->realVars[612] /* points[15]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 431
- type: SIMPLE_ASSIGN
- points[15]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[15].BIP[1,2,1], T[15])
- */
-void Graph_eqFunction_431(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,431};
- data->localData[0]->realVars[613] /* points[15]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[438],data->localData[0]->realVars[214] /* T[15] variable */,"T[15]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 432
- type: SIMPLE_ASSIGN
- points[15]._Gamma._G[1,2] = exp((-points[15].BIP[1,2,2]) * points[15].Gamma.tau[1,2])
- */
-void Graph_eqFunction_432(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,432};
- data->localData[0]->realVars[295] /* points[15]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[439])) * (data->localData[0]->realVars[613] /* points[15]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 433
- type: SIMPLE_ASSIGN
- points[15]._Gamma._sum2[2] = 0.358974358974359 * points[15].Gamma.tau[1,2] * points[15].Gamma.G[1,2] + 0.641025641025641 * points[15].Gamma.tau[2,2] * points[15].Gamma.G[2,2]
- */
-void Graph_eqFunction_433(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,433};
- data->localData[0]->realVars[505] /* points[15]._Gamma._sum2[2] variable */ = (0.358974358974359) * ((data->localData[0]->realVars[613] /* points[15]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[295] /* points[15]._Gamma._G[1,2] variable */)) + (0.641025641025641) * ((data->localData[0]->realVars[615] /* points[15]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[297] /* points[15]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 434
- type: SIMPLE_ASSIGN
- points[15]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[15].BIP[2,1,1], T[15])
- */
-void Graph_eqFunction_434(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,434};
- data->localData[0]->realVars[614] /* points[15]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[440],data->localData[0]->realVars[214] /* T[15] variable */,"T[15]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 435
- type: SIMPLE_ASSIGN
- points[15]._Gamma._G[2,1] = exp((-points[15].BIP[2,1,2]) * points[15].Gamma.tau[2,1])
- */
-void Graph_eqFunction_435(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,435};
- data->localData[0]->realVars[296] /* points[15]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[441])) * (data->localData[0]->realVars[614] /* points[15]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 436
- type: SIMPLE_ASSIGN
- points[15]._Gamma._sum2[1] = 0.358974358974359 * points[15].Gamma.tau[1,1] * points[15].Gamma.G[1,1] + 0.641025641025641 * points[15].Gamma.tau[2,1] * points[15].Gamma.G[2,1]
- */
-void Graph_eqFunction_436(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,436};
- data->localData[0]->realVars[504] /* points[15]._Gamma._sum2[1] variable */ = (0.358974358974359) * ((data->localData[0]->realVars[612] /* points[15]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[294] /* points[15]._Gamma._G[1,1] variable */)) + (0.641025641025641) * ((data->localData[0]->realVars[614] /* points[15]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[296] /* points[15]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 437
- type: SIMPLE_ASSIGN
- points[15]._Gamma._sum1[2] = 0.358974358974359 * points[15].Gamma.G[1,2] + 0.641025641025641 * points[15].Gamma.G[2,2]
- */
-void Graph_eqFunction_437(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,437};
- data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */ = (0.358974358974359) * (data->localData[0]->realVars[295] /* points[15]._Gamma._G[1,2] variable */) + (0.641025641025641) * (data->localData[0]->realVars[297] /* points[15]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 438
- type: SIMPLE_ASSIGN
- points[15]._Gamma._sum1[1] = 0.358974358974359 * points[15].Gamma.G[1,1] + 0.641025641025641 * points[15].Gamma.G[2,1]
- */
-void Graph_eqFunction_438(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,438};
- data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */ = (0.358974358974359) * (data->localData[0]->realVars[294] /* points[15]._Gamma._G[1,1] variable */) + (0.641025641025641) * (data->localData[0]->realVars[296] /* points[15]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 439
- type: SIMPLE_ASSIGN
- points[15]._gamma[1] = exp(DIVISION(points[15].Gamma.sum2[1], points[15].Gamma.sum1[1]) + 0.358974358974359 * points[15].Gamma.G[1,1] * DIVISION(points[15].Gamma.tau[1,1] - DIVISION(points[15].Gamma.sum2[1], points[15].Gamma.sum1[1]), points[15].Gamma.sum1[1]) + 0.641025641025641 * points[15].Gamma.G[1,2] * DIVISION(points[15].Gamma.tau[1,2] - DIVISION(points[15].Gamma.sum2[2], points[15].Gamma.sum1[2]), points[15].Gamma.sum1[2]))
- */
-void Graph_eqFunction_439(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,439};
- data->localData[0]->realVars[902] /* points[15]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[504] /* points[15]._Gamma._sum2[1] variable */,data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes) + (0.358974358974359) * ((data->localData[0]->realVars[294] /* points[15]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[612] /* points[15]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[504] /* points[15]._Gamma._sum2[1] variable */,data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes))) + (0.641025641025641) * ((data->localData[0]->realVars[295] /* points[15]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[613] /* points[15]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[505] /* points[15]._Gamma._sum2[2] variable */,data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 440
- type: SIMPLE_ASSIGN
- points[15]._gamma[2] = exp(DIVISION(points[15].Gamma.sum2[2], points[15].Gamma.sum1[2]) + 0.358974358974359 * points[15].Gamma.G[2,1] * DIVISION(points[15].Gamma.tau[2,1] - DIVISION(points[15].Gamma.sum2[1], points[15].Gamma.sum1[1]), points[15].Gamma.sum1[1]) + 0.641025641025641 * points[15].Gamma.G[2,2] * DIVISION(points[15].Gamma.tau[2,2] - DIVISION(points[15].Gamma.sum2[2], points[15].Gamma.sum1[2]), points[15].Gamma.sum1[2]))
- */
-void Graph_eqFunction_440(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,440};
- data->localData[0]->realVars[903] /* points[15]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[505] /* points[15]._Gamma._sum2[2] variable */,data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes) + (0.358974358974359) * ((data->localData[0]->realVars[296] /* points[15]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[614] /* points[15]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[504] /* points[15]._Gamma._sum2[1] variable */,data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes))) + (0.641025641025641) * ((data->localData[0]->realVars[297] /* points[15]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[615] /* points[15]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[505] /* points[15]._Gamma._sum2[2] variable */,data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 441
- type: SIMPLE_ASSIGN
- points[15]._K[2] = 0.0001 * points[15].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[15].comp[2].VP[1], points[15].comp[2].VP[2], points[15].comp[2].VP[3], points[15].comp[2].VP[4], points[15].comp[2].VP[5], points[15].comp[2].VP[6]}, T[15])
- */
-void Graph_eqFunction_441(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,441};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11458], (modelica_real)data->simulationInfo->realParameter[11459], (modelica_real)data->simulationInfo->realParameter[11460], (modelica_real)data->simulationInfo->realParameter[11461], (modelica_real)data->simulationInfo->realParameter[11462], (modelica_real)data->simulationInfo->realParameter[11463]);
- data->localData[0]->realVars[744] /* points[15]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[903] /* points[15]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[214] /* T[15] variable */)));
- TRACE_POP
-}
-/*
- equation index: 442
- type: SIMPLE_ASSIGN
- points[15]._K[1] = 0.0001 * points[15].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[15].comp[1].VP[1], points[15].comp[1].VP[2], points[15].comp[1].VP[3], points[15].comp[1].VP[4], points[15].comp[1].VP[5], points[15].comp[1].VP[6]}, T[15])
- */
-void Graph_eqFunction_442(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,442};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11452], (modelica_real)data->simulationInfo->realParameter[11453], (modelica_real)data->simulationInfo->realParameter[11454], (modelica_real)data->simulationInfo->realParameter[11455], (modelica_real)data->simulationInfo->realParameter[11456], (modelica_real)data->simulationInfo->realParameter[11457]);
- data->localData[0]->realVars[743] /* points[15]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[902] /* points[15]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[214] /* T[15] variable */)));
- TRACE_POP
-}
-
-void residualFunc444(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,444};
- /* iteration variables */
- data->localData[0]->realVars[214] /* T[15] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_427(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_428(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_429(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_430(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_431(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_432(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_433(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_434(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_435(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_436(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_437(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_438(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_439(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_440(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_441(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_442(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.641025641025641) * (data->localData[0]->realVars[744] /* points[15]._K[2] variable */) + (-0.358974358974359) * (data->localData[0]->realVars[743] /* points[15]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS444(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS444(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[15] */
- sysData->nominal[i] = data->modelData->realVarsData[214].attribute /* T[15] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[214].attribute /* T[15] */.min;
- sysData->max[i++] = data->modelData->realVarsData[214].attribute /* T[15] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS444(sysData);
-}
-
-void getIterationVarsNLS444(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[214] /* T[15] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 449
- type: SIMPLE_ASSIGN
- points[16]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[16].BIP[2,2,1], T[16])
- */
-void Graph_eqFunction_449(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,449};
- data->localData[0]->realVars[619] /* points[16]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[450],data->localData[0]->realVars[215] /* T[16] variable */,"T[16]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 450
- type: SIMPLE_ASSIGN
- points[16]._Gamma._G[2,2] = exp((-points[16].BIP[2,2,2]) * points[16].Gamma.tau[2,2])
- */
-void Graph_eqFunction_450(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,450};
- data->localData[0]->realVars[301] /* points[16]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[451])) * (data->localData[0]->realVars[619] /* points[16]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 451
- type: SIMPLE_ASSIGN
- points[16]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[16].BIP[1,1,1], T[16])
- */
-void Graph_eqFunction_451(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,451};
- data->localData[0]->realVars[616] /* points[16]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[444],data->localData[0]->realVars[215] /* T[16] variable */,"T[16]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 452
- type: SIMPLE_ASSIGN
- points[16]._Gamma._G[1,1] = exp((-points[16].BIP[1,1,2]) * points[16].Gamma.tau[1,1])
- */
-void Graph_eqFunction_452(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,452};
- data->localData[0]->realVars[298] /* points[16]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[445])) * (data->localData[0]->realVars[616] /* points[16]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 453
- type: SIMPLE_ASSIGN
- points[16]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[16].BIP[1,2,1], T[16])
- */
-void Graph_eqFunction_453(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,453};
- data->localData[0]->realVars[617] /* points[16]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[446],data->localData[0]->realVars[215] /* T[16] variable */,"T[16]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 454
- type: SIMPLE_ASSIGN
- points[16]._Gamma._G[1,2] = exp((-points[16].BIP[1,2,2]) * points[16].Gamma.tau[1,2])
- */
-void Graph_eqFunction_454(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,454};
- data->localData[0]->realVars[299] /* points[16]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[447])) * (data->localData[0]->realVars[617] /* points[16]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 455
- type: SIMPLE_ASSIGN
- points[16]._Gamma._sum2[2] = 0.3846153846153846 * points[16].Gamma.tau[1,2] * points[16].Gamma.G[1,2] + 0.6153846153846154 * points[16].Gamma.tau[2,2] * points[16].Gamma.G[2,2]
- */
-void Graph_eqFunction_455(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,455};
- data->localData[0]->realVars[507] /* points[16]._Gamma._sum2[2] variable */ = (0.3846153846153846) * ((data->localData[0]->realVars[617] /* points[16]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[299] /* points[16]._Gamma._G[1,2] variable */)) + (0.6153846153846154) * ((data->localData[0]->realVars[619] /* points[16]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[301] /* points[16]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 456
- type: SIMPLE_ASSIGN
- points[16]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[16].BIP[2,1,1], T[16])
- */
-void Graph_eqFunction_456(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,456};
- data->localData[0]->realVars[618] /* points[16]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[448],data->localData[0]->realVars[215] /* T[16] variable */,"T[16]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 457
- type: SIMPLE_ASSIGN
- points[16]._Gamma._G[2,1] = exp((-points[16].BIP[2,1,2]) * points[16].Gamma.tau[2,1])
- */
-void Graph_eqFunction_457(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,457};
- data->localData[0]->realVars[300] /* points[16]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[449])) * (data->localData[0]->realVars[618] /* points[16]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 458
- type: SIMPLE_ASSIGN
- points[16]._Gamma._sum2[1] = 0.3846153846153846 * points[16].Gamma.tau[1,1] * points[16].Gamma.G[1,1] + 0.6153846153846154 * points[16].Gamma.tau[2,1] * points[16].Gamma.G[2,1]
- */
-void Graph_eqFunction_458(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,458};
- data->localData[0]->realVars[506] /* points[16]._Gamma._sum2[1] variable */ = (0.3846153846153846) * ((data->localData[0]->realVars[616] /* points[16]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[298] /* points[16]._Gamma._G[1,1] variable */)) + (0.6153846153846154) * ((data->localData[0]->realVars[618] /* points[16]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[300] /* points[16]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 459
- type: SIMPLE_ASSIGN
- points[16]._Gamma._sum1[2] = 0.3846153846153846 * points[16].Gamma.G[1,2] + 0.6153846153846154 * points[16].Gamma.G[2,2]
- */
-void Graph_eqFunction_459(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,459};
- data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */ = (0.3846153846153846) * (data->localData[0]->realVars[299] /* points[16]._Gamma._G[1,2] variable */) + (0.6153846153846154) * (data->localData[0]->realVars[301] /* points[16]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 460
- type: SIMPLE_ASSIGN
- points[16]._Gamma._sum1[1] = 0.3846153846153846 * points[16].Gamma.G[1,1] + 0.6153846153846154 * points[16].Gamma.G[2,1]
- */
-void Graph_eqFunction_460(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,460};
- data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */ = (0.3846153846153846) * (data->localData[0]->realVars[298] /* points[16]._Gamma._G[1,1] variable */) + (0.6153846153846154) * (data->localData[0]->realVars[300] /* points[16]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 461
- type: SIMPLE_ASSIGN
- points[16]._gamma[1] = exp(DIVISION(points[16].Gamma.sum2[1], points[16].Gamma.sum1[1]) + 0.3846153846153846 * points[16].Gamma.G[1,1] * DIVISION(points[16].Gamma.tau[1,1] - DIVISION(points[16].Gamma.sum2[1], points[16].Gamma.sum1[1]), points[16].Gamma.sum1[1]) + 0.6153846153846154 * points[16].Gamma.G[1,2] * DIVISION(points[16].Gamma.tau[1,2] - DIVISION(points[16].Gamma.sum2[2], points[16].Gamma.sum1[2]), points[16].Gamma.sum1[2]))
- */
-void Graph_eqFunction_461(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,461};
- data->localData[0]->realVars[904] /* points[16]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[506] /* points[16]._Gamma._sum2[1] variable */,data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes) + (0.3846153846153846) * ((data->localData[0]->realVars[298] /* points[16]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[616] /* points[16]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[506] /* points[16]._Gamma._sum2[1] variable */,data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes))) + (0.6153846153846154) * ((data->localData[0]->realVars[299] /* points[16]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[617] /* points[16]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[507] /* points[16]._Gamma._sum2[2] variable */,data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 462
- type: SIMPLE_ASSIGN
- points[16]._gamma[2] = exp(DIVISION(points[16].Gamma.sum2[2], points[16].Gamma.sum1[2]) + 0.3846153846153846 * points[16].Gamma.G[2,1] * DIVISION(points[16].Gamma.tau[2,1] - DIVISION(points[16].Gamma.sum2[1], points[16].Gamma.sum1[1]), points[16].Gamma.sum1[1]) + 0.6153846153846154 * points[16].Gamma.G[2,2] * DIVISION(points[16].Gamma.tau[2,2] - DIVISION(points[16].Gamma.sum2[2], points[16].Gamma.sum1[2]), points[16].Gamma.sum1[2]))
- */
-void Graph_eqFunction_462(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,462};
- data->localData[0]->realVars[905] /* points[16]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[507] /* points[16]._Gamma._sum2[2] variable */,data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes) + (0.3846153846153846) * ((data->localData[0]->realVars[300] /* points[16]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[618] /* points[16]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[506] /* points[16]._Gamma._sum2[1] variable */,data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes))) + (0.6153846153846154) * ((data->localData[0]->realVars[301] /* points[16]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[619] /* points[16]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[507] /* points[16]._Gamma._sum2[2] variable */,data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 463
- type: SIMPLE_ASSIGN
- points[16]._K[2] = 0.0001 * points[16].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[16].comp[2].VP[1], points[16].comp[2].VP[2], points[16].comp[2].VP[3], points[16].comp[2].VP[4], points[16].comp[2].VP[5], points[16].comp[2].VP[6]}, T[16])
- */
-void Graph_eqFunction_463(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,463};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11470], (modelica_real)data->simulationInfo->realParameter[11471], (modelica_real)data->simulationInfo->realParameter[11472], (modelica_real)data->simulationInfo->realParameter[11473], (modelica_real)data->simulationInfo->realParameter[11474], (modelica_real)data->simulationInfo->realParameter[11475]);
- data->localData[0]->realVars[746] /* points[16]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[905] /* points[16]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[215] /* T[16] variable */)));
- TRACE_POP
-}
-/*
- equation index: 464
- type: SIMPLE_ASSIGN
- points[16]._K[1] = 0.0001 * points[16].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[16].comp[1].VP[1], points[16].comp[1].VP[2], points[16].comp[1].VP[3], points[16].comp[1].VP[4], points[16].comp[1].VP[5], points[16].comp[1].VP[6]}, T[16])
- */
-void Graph_eqFunction_464(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,464};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11464], (modelica_real)data->simulationInfo->realParameter[11465], (modelica_real)data->simulationInfo->realParameter[11466], (modelica_real)data->simulationInfo->realParameter[11467], (modelica_real)data->simulationInfo->realParameter[11468], (modelica_real)data->simulationInfo->realParameter[11469]);
- data->localData[0]->realVars[745] /* points[16]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[904] /* points[16]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[215] /* T[16] variable */)));
- TRACE_POP
-}
-
-void residualFunc466(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,466};
- /* iteration variables */
- data->localData[0]->realVars[215] /* T[16] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_449(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_450(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_451(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_452(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_453(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_454(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_455(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_456(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_457(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_458(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_459(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_460(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_461(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_462(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_463(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_464(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.6153846153846154) * (data->localData[0]->realVars[746] /* points[16]._K[2] variable */) + (-0.3846153846153846) * (data->localData[0]->realVars[745] /* points[16]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS466(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS466(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[16] */
- sysData->nominal[i] = data->modelData->realVarsData[215].attribute /* T[16] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[215].attribute /* T[16] */.min;
- sysData->max[i++] = data->modelData->realVarsData[215].attribute /* T[16] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS466(sysData);
-}
-
-void getIterationVarsNLS466(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[215] /* T[16] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 471
- type: SIMPLE_ASSIGN
- points[17]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[17].BIP[2,2,1], T[17])
- */
-void Graph_eqFunction_471(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,471};
- data->localData[0]->realVars[623] /* points[17]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[458],data->localData[0]->realVars[216] /* T[17] variable */,"T[17]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 472
- type: SIMPLE_ASSIGN
- points[17]._Gamma._G[2,2] = exp((-points[17].BIP[2,2,2]) * points[17].Gamma.tau[2,2])
- */
-void Graph_eqFunction_472(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,472};
- data->localData[0]->realVars[305] /* points[17]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[459])) * (data->localData[0]->realVars[623] /* points[17]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 473
- type: SIMPLE_ASSIGN
- points[17]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[17].BIP[1,1,1], T[17])
- */
-void Graph_eqFunction_473(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,473};
- data->localData[0]->realVars[620] /* points[17]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[452],data->localData[0]->realVars[216] /* T[17] variable */,"T[17]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 474
- type: SIMPLE_ASSIGN
- points[17]._Gamma._G[1,1] = exp((-points[17].BIP[1,1,2]) * points[17].Gamma.tau[1,1])
- */
-void Graph_eqFunction_474(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,474};
- data->localData[0]->realVars[302] /* points[17]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[453])) * (data->localData[0]->realVars[620] /* points[17]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 475
- type: SIMPLE_ASSIGN
- points[17]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[17].BIP[1,2,1], T[17])
- */
-void Graph_eqFunction_475(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,475};
- data->localData[0]->realVars[621] /* points[17]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[454],data->localData[0]->realVars[216] /* T[17] variable */,"T[17]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 476
- type: SIMPLE_ASSIGN
- points[17]._Gamma._G[1,2] = exp((-points[17].BIP[1,2,2]) * points[17].Gamma.tau[1,2])
- */
-void Graph_eqFunction_476(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,476};
- data->localData[0]->realVars[303] /* points[17]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[455])) * (data->localData[0]->realVars[621] /* points[17]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 477
- type: SIMPLE_ASSIGN
- points[17]._Gamma._sum2[2] = 0.4102564102564102 * points[17].Gamma.tau[1,2] * points[17].Gamma.G[1,2] + 0.5897435897435898 * points[17].Gamma.tau[2,2] * points[17].Gamma.G[2,2]
- */
-void Graph_eqFunction_477(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,477};
- data->localData[0]->realVars[509] /* points[17]._Gamma._sum2[2] variable */ = (0.4102564102564102) * ((data->localData[0]->realVars[621] /* points[17]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[303] /* points[17]._Gamma._G[1,2] variable */)) + (0.5897435897435898) * ((data->localData[0]->realVars[623] /* points[17]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[305] /* points[17]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 478
- type: SIMPLE_ASSIGN
- points[17]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[17].BIP[2,1,1], T[17])
- */
-void Graph_eqFunction_478(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,478};
- data->localData[0]->realVars[622] /* points[17]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[456],data->localData[0]->realVars[216] /* T[17] variable */,"T[17]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 479
- type: SIMPLE_ASSIGN
- points[17]._Gamma._G[2,1] = exp((-points[17].BIP[2,1,2]) * points[17].Gamma.tau[2,1])
- */
-void Graph_eqFunction_479(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,479};
- data->localData[0]->realVars[304] /* points[17]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[457])) * (data->localData[0]->realVars[622] /* points[17]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 480
- type: SIMPLE_ASSIGN
- points[17]._Gamma._sum2[1] = 0.4102564102564102 * points[17].Gamma.tau[1,1] * points[17].Gamma.G[1,1] + 0.5897435897435898 * points[17].Gamma.tau[2,1] * points[17].Gamma.G[2,1]
- */
-void Graph_eqFunction_480(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,480};
- data->localData[0]->realVars[508] /* points[17]._Gamma._sum2[1] variable */ = (0.4102564102564102) * ((data->localData[0]->realVars[620] /* points[17]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[302] /* points[17]._Gamma._G[1,1] variable */)) + (0.5897435897435898) * ((data->localData[0]->realVars[622] /* points[17]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[304] /* points[17]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 481
- type: SIMPLE_ASSIGN
- points[17]._Gamma._sum1[2] = 0.4102564102564102 * points[17].Gamma.G[1,2] + 0.5897435897435898 * points[17].Gamma.G[2,2]
- */
-void Graph_eqFunction_481(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,481};
- data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */ = (0.4102564102564102) * (data->localData[0]->realVars[303] /* points[17]._Gamma._G[1,2] variable */) + (0.5897435897435898) * (data->localData[0]->realVars[305] /* points[17]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 482
- type: SIMPLE_ASSIGN
- points[17]._Gamma._sum1[1] = 0.4102564102564102 * points[17].Gamma.G[1,1] + 0.5897435897435898 * points[17].Gamma.G[2,1]
- */
-void Graph_eqFunction_482(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,482};
- data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */ = (0.4102564102564102) * (data->localData[0]->realVars[302] /* points[17]._Gamma._G[1,1] variable */) + (0.5897435897435898) * (data->localData[0]->realVars[304] /* points[17]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 483
- type: SIMPLE_ASSIGN
- points[17]._gamma[1] = exp(DIVISION(points[17].Gamma.sum2[1], points[17].Gamma.sum1[1]) + 0.4102564102564102 * points[17].Gamma.G[1,1] * DIVISION(points[17].Gamma.tau[1,1] - DIVISION(points[17].Gamma.sum2[1], points[17].Gamma.sum1[1]), points[17].Gamma.sum1[1]) + 0.5897435897435898 * points[17].Gamma.G[1,2] * DIVISION(points[17].Gamma.tau[1,2] - DIVISION(points[17].Gamma.sum2[2], points[17].Gamma.sum1[2]), points[17].Gamma.sum1[2]))
- */
-void Graph_eqFunction_483(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,483};
- data->localData[0]->realVars[906] /* points[17]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[508] /* points[17]._Gamma._sum2[1] variable */,data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes) + (0.4102564102564102) * ((data->localData[0]->realVars[302] /* points[17]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[620] /* points[17]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[508] /* points[17]._Gamma._sum2[1] variable */,data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes))) + (0.5897435897435898) * ((data->localData[0]->realVars[303] /* points[17]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[621] /* points[17]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[509] /* points[17]._Gamma._sum2[2] variable */,data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 484
- type: SIMPLE_ASSIGN
- points[17]._gamma[2] = exp(DIVISION(points[17].Gamma.sum2[2], points[17].Gamma.sum1[2]) + 0.4102564102564102 * points[17].Gamma.G[2,1] * DIVISION(points[17].Gamma.tau[2,1] - DIVISION(points[17].Gamma.sum2[1], points[17].Gamma.sum1[1]), points[17].Gamma.sum1[1]) + 0.5897435897435898 * points[17].Gamma.G[2,2] * DIVISION(points[17].Gamma.tau[2,2] - DIVISION(points[17].Gamma.sum2[2], points[17].Gamma.sum1[2]), points[17].Gamma.sum1[2]))
- */
-void Graph_eqFunction_484(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,484};
- data->localData[0]->realVars[907] /* points[17]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[509] /* points[17]._Gamma._sum2[2] variable */,data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes) + (0.4102564102564102) * ((data->localData[0]->realVars[304] /* points[17]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[622] /* points[17]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[508] /* points[17]._Gamma._sum2[1] variable */,data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes))) + (0.5897435897435898) * ((data->localData[0]->realVars[305] /* points[17]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[623] /* points[17]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[509] /* points[17]._Gamma._sum2[2] variable */,data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 485
- type: SIMPLE_ASSIGN
- points[17]._K[2] = 0.0001 * points[17].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[17].comp[2].VP[1], points[17].comp[2].VP[2], points[17].comp[2].VP[3], points[17].comp[2].VP[4], points[17].comp[2].VP[5], points[17].comp[2].VP[6]}, T[17])
- */
-void Graph_eqFunction_485(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,485};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11482], (modelica_real)data->simulationInfo->realParameter[11483], (modelica_real)data->simulationInfo->realParameter[11484], (modelica_real)data->simulationInfo->realParameter[11485], (modelica_real)data->simulationInfo->realParameter[11486], (modelica_real)data->simulationInfo->realParameter[11487]);
- data->localData[0]->realVars[748] /* points[17]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[907] /* points[17]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[216] /* T[17] variable */)));
- TRACE_POP
-}
-/*
- equation index: 486
- type: SIMPLE_ASSIGN
- points[17]._K[1] = 0.0001 * points[17].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[17].comp[1].VP[1], points[17].comp[1].VP[2], points[17].comp[1].VP[3], points[17].comp[1].VP[4], points[17].comp[1].VP[5], points[17].comp[1].VP[6]}, T[17])
- */
-void Graph_eqFunction_486(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,486};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11476], (modelica_real)data->simulationInfo->realParameter[11477], (modelica_real)data->simulationInfo->realParameter[11478], (modelica_real)data->simulationInfo->realParameter[11479], (modelica_real)data->simulationInfo->realParameter[11480], (modelica_real)data->simulationInfo->realParameter[11481]);
- data->localData[0]->realVars[747] /* points[17]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[906] /* points[17]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[216] /* T[17] variable */)));
- TRACE_POP
-}
-
-void residualFunc488(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,488};
- /* iteration variables */
- data->localData[0]->realVars[216] /* T[17] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_471(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_472(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_473(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_474(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_475(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_476(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_477(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_478(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_479(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_480(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_481(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_482(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_483(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_484(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_485(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_486(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.5897435897435898) * (data->localData[0]->realVars[748] /* points[17]._K[2] variable */) + (-0.4102564102564102) * (data->localData[0]->realVars[747] /* points[17]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS488(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS488(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[17] */
- sysData->nominal[i] = data->modelData->realVarsData[216].attribute /* T[17] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[216].attribute /* T[17] */.min;
- sysData->max[i++] = data->modelData->realVarsData[216].attribute /* T[17] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS488(sysData);
-}
-
-void getIterationVarsNLS488(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[216] /* T[17] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 493
- type: SIMPLE_ASSIGN
- points[18]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[18].BIP[2,2,1], T[18])
- */
-void Graph_eqFunction_493(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,493};
- data->localData[0]->realVars[627] /* points[18]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[466],data->localData[0]->realVars[217] /* T[18] variable */,"T[18]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 494
- type: SIMPLE_ASSIGN
- points[18]._Gamma._G[2,2] = exp((-points[18].BIP[2,2,2]) * points[18].Gamma.tau[2,2])
- */
-void Graph_eqFunction_494(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,494};
- data->localData[0]->realVars[309] /* points[18]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[467])) * (data->localData[0]->realVars[627] /* points[18]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 495
- type: SIMPLE_ASSIGN
- points[18]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[18].BIP[1,1,1], T[18])
- */
-void Graph_eqFunction_495(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,495};
- data->localData[0]->realVars[624] /* points[18]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[460],data->localData[0]->realVars[217] /* T[18] variable */,"T[18]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 496
- type: SIMPLE_ASSIGN
- points[18]._Gamma._G[1,1] = exp((-points[18].BIP[1,1,2]) * points[18].Gamma.tau[1,1])
- */
-void Graph_eqFunction_496(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,496};
- data->localData[0]->realVars[306] /* points[18]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[461])) * (data->localData[0]->realVars[624] /* points[18]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 497
- type: SIMPLE_ASSIGN
- points[18]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[18].BIP[1,2,1], T[18])
- */
-void Graph_eqFunction_497(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,497};
- data->localData[0]->realVars[625] /* points[18]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[462],data->localData[0]->realVars[217] /* T[18] variable */,"T[18]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 498
- type: SIMPLE_ASSIGN
- points[18]._Gamma._G[1,2] = exp((-points[18].BIP[1,2,2]) * points[18].Gamma.tau[1,2])
- */
-void Graph_eqFunction_498(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,498};
- data->localData[0]->realVars[307] /* points[18]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[463])) * (data->localData[0]->realVars[625] /* points[18]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 499
- type: SIMPLE_ASSIGN
- points[18]._Gamma._sum2[2] = 0.4358974358974359 * points[18].Gamma.tau[1,2] * points[18].Gamma.G[1,2] + 0.5641025641025641 * points[18].Gamma.tau[2,2] * points[18].Gamma.G[2,2]
- */
-void Graph_eqFunction_499(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,499};
- data->localData[0]->realVars[511] /* points[18]._Gamma._sum2[2] variable */ = (0.4358974358974359) * ((data->localData[0]->realVars[625] /* points[18]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[307] /* points[18]._Gamma._G[1,2] variable */)) + (0.5641025641025641) * ((data->localData[0]->realVars[627] /* points[18]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[309] /* points[18]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 500
- type: SIMPLE_ASSIGN
- points[18]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[18].BIP[2,1,1], T[18])
- */
-void Graph_eqFunction_500(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,500};
- data->localData[0]->realVars[626] /* points[18]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[464],data->localData[0]->realVars[217] /* T[18] variable */,"T[18]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 501
- type: SIMPLE_ASSIGN
- points[18]._Gamma._G[2,1] = exp((-points[18].BIP[2,1,2]) * points[18].Gamma.tau[2,1])
- */
-void Graph_eqFunction_501(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,501};
- data->localData[0]->realVars[308] /* points[18]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[465])) * (data->localData[0]->realVars[626] /* points[18]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 502
- type: SIMPLE_ASSIGN
- points[18]._Gamma._sum2[1] = 0.4358974358974359 * points[18].Gamma.tau[1,1] * points[18].Gamma.G[1,1] + 0.5641025641025641 * points[18].Gamma.tau[2,1] * points[18].Gamma.G[2,1]
- */
-void Graph_eqFunction_502(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,502};
- data->localData[0]->realVars[510] /* points[18]._Gamma._sum2[1] variable */ = (0.4358974358974359) * ((data->localData[0]->realVars[624] /* points[18]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[306] /* points[18]._Gamma._G[1,1] variable */)) + (0.5641025641025641) * ((data->localData[0]->realVars[626] /* points[18]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[308] /* points[18]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 503
- type: SIMPLE_ASSIGN
- points[18]._Gamma._sum1[2] = 0.4358974358974359 * points[18].Gamma.G[1,2] + 0.5641025641025641 * points[18].Gamma.G[2,2]
- */
-void Graph_eqFunction_503(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,503};
- data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */ = (0.4358974358974359) * (data->localData[0]->realVars[307] /* points[18]._Gamma._G[1,2] variable */) + (0.5641025641025641) * (data->localData[0]->realVars[309] /* points[18]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 504
- type: SIMPLE_ASSIGN
- points[18]._Gamma._sum1[1] = 0.4358974358974359 * points[18].Gamma.G[1,1] + 0.5641025641025641 * points[18].Gamma.G[2,1]
- */
-void Graph_eqFunction_504(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,504};
- data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */ = (0.4358974358974359) * (data->localData[0]->realVars[306] /* points[18]._Gamma._G[1,1] variable */) + (0.5641025641025641) * (data->localData[0]->realVars[308] /* points[18]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 505
- type: SIMPLE_ASSIGN
- points[18]._gamma[1] = exp(DIVISION(points[18].Gamma.sum2[1], points[18].Gamma.sum1[1]) + 0.4358974358974359 * points[18].Gamma.G[1,1] * DIVISION(points[18].Gamma.tau[1,1] - DIVISION(points[18].Gamma.sum2[1], points[18].Gamma.sum1[1]), points[18].Gamma.sum1[1]) + 0.5641025641025641 * points[18].Gamma.G[1,2] * DIVISION(points[18].Gamma.tau[1,2] - DIVISION(points[18].Gamma.sum2[2], points[18].Gamma.sum1[2]), points[18].Gamma.sum1[2]))
- */
-void Graph_eqFunction_505(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,505};
- data->localData[0]->realVars[908] /* points[18]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[510] /* points[18]._Gamma._sum2[1] variable */,data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes) + (0.4358974358974359) * ((data->localData[0]->realVars[306] /* points[18]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[624] /* points[18]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[510] /* points[18]._Gamma._sum2[1] variable */,data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes))) + (0.5641025641025641) * ((data->localData[0]->realVars[307] /* points[18]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[625] /* points[18]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[511] /* points[18]._Gamma._sum2[2] variable */,data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 506
- type: SIMPLE_ASSIGN
- points[18]._gamma[2] = exp(DIVISION(points[18].Gamma.sum2[2], points[18].Gamma.sum1[2]) + 0.4358974358974359 * points[18].Gamma.G[2,1] * DIVISION(points[18].Gamma.tau[2,1] - DIVISION(points[18].Gamma.sum2[1], points[18].Gamma.sum1[1]), points[18].Gamma.sum1[1]) + 0.5641025641025641 * points[18].Gamma.G[2,2] * DIVISION(points[18].Gamma.tau[2,2] - DIVISION(points[18].Gamma.sum2[2], points[18].Gamma.sum1[2]), points[18].Gamma.sum1[2]))
- */
-void Graph_eqFunction_506(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,506};
- data->localData[0]->realVars[909] /* points[18]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[511] /* points[18]._Gamma._sum2[2] variable */,data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes) + (0.4358974358974359) * ((data->localData[0]->realVars[308] /* points[18]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[626] /* points[18]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[510] /* points[18]._Gamma._sum2[1] variable */,data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes))) + (0.5641025641025641) * ((data->localData[0]->realVars[309] /* points[18]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[627] /* points[18]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[511] /* points[18]._Gamma._sum2[2] variable */,data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 507
- type: SIMPLE_ASSIGN
- points[18]._K[2] = 0.0001 * points[18].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[18].comp[2].VP[1], points[18].comp[2].VP[2], points[18].comp[2].VP[3], points[18].comp[2].VP[4], points[18].comp[2].VP[5], points[18].comp[2].VP[6]}, T[18])
- */
-void Graph_eqFunction_507(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,507};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11494], (modelica_real)data->simulationInfo->realParameter[11495], (modelica_real)data->simulationInfo->realParameter[11496], (modelica_real)data->simulationInfo->realParameter[11497], (modelica_real)data->simulationInfo->realParameter[11498], (modelica_real)data->simulationInfo->realParameter[11499]);
- data->localData[0]->realVars[750] /* points[18]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[909] /* points[18]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[217] /* T[18] variable */)));
- TRACE_POP
-}
-/*
- equation index: 508
- type: SIMPLE_ASSIGN
- points[18]._K[1] = 0.0001 * points[18].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[18].comp[1].VP[1], points[18].comp[1].VP[2], points[18].comp[1].VP[3], points[18].comp[1].VP[4], points[18].comp[1].VP[5], points[18].comp[1].VP[6]}, T[18])
- */
-void Graph_eqFunction_508(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,508};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11488], (modelica_real)data->simulationInfo->realParameter[11489], (modelica_real)data->simulationInfo->realParameter[11490], (modelica_real)data->simulationInfo->realParameter[11491], (modelica_real)data->simulationInfo->realParameter[11492], (modelica_real)data->simulationInfo->realParameter[11493]);
- data->localData[0]->realVars[749] /* points[18]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[908] /* points[18]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[217] /* T[18] variable */)));
- TRACE_POP
-}
-
-void residualFunc510(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,510};
- /* iteration variables */
- data->localData[0]->realVars[217] /* T[18] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_493(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_494(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_495(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_496(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_497(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_498(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_499(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_500(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_501(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_502(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_503(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_504(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_505(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_506(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_507(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_508(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.5641025641025641) * (data->localData[0]->realVars[750] /* points[18]._K[2] variable */) + (-0.4358974358974359) * (data->localData[0]->realVars[749] /* points[18]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS510(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS510(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[18] */
- sysData->nominal[i] = data->modelData->realVarsData[217].attribute /* T[18] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[217].attribute /* T[18] */.min;
- sysData->max[i++] = data->modelData->realVarsData[217].attribute /* T[18] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS510(sysData);
-}
-
-void getIterationVarsNLS510(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[217] /* T[18] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 515
- type: SIMPLE_ASSIGN
- points[19]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[19].BIP[2,2,1], T[19])
- */
-void Graph_eqFunction_515(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,515};
- data->localData[0]->realVars[631] /* points[19]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[474],data->localData[0]->realVars[218] /* T[19] variable */,"T[19]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 516
- type: SIMPLE_ASSIGN
- points[19]._Gamma._G[2,2] = exp((-points[19].BIP[2,2,2]) * points[19].Gamma.tau[2,2])
- */
-void Graph_eqFunction_516(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,516};
- data->localData[0]->realVars[313] /* points[19]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[475])) * (data->localData[0]->realVars[631] /* points[19]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 517
- type: SIMPLE_ASSIGN
- points[19]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[19].BIP[1,1,1], T[19])
- */
-void Graph_eqFunction_517(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,517};
- data->localData[0]->realVars[628] /* points[19]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[468],data->localData[0]->realVars[218] /* T[19] variable */,"T[19]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 518
- type: SIMPLE_ASSIGN
- points[19]._Gamma._G[1,1] = exp((-points[19].BIP[1,1,2]) * points[19].Gamma.tau[1,1])
- */
-void Graph_eqFunction_518(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,518};
- data->localData[0]->realVars[310] /* points[19]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[469])) * (data->localData[0]->realVars[628] /* points[19]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 519
- type: SIMPLE_ASSIGN
- points[19]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[19].BIP[1,2,1], T[19])
- */
-void Graph_eqFunction_519(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,519};
- data->localData[0]->realVars[629] /* points[19]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[470],data->localData[0]->realVars[218] /* T[19] variable */,"T[19]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 520
- type: SIMPLE_ASSIGN
- points[19]._Gamma._G[1,2] = exp((-points[19].BIP[1,2,2]) * points[19].Gamma.tau[1,2])
- */
-void Graph_eqFunction_520(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,520};
- data->localData[0]->realVars[311] /* points[19]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[471])) * (data->localData[0]->realVars[629] /* points[19]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 521
- type: SIMPLE_ASSIGN
- points[19]._Gamma._sum2[2] = 0.4615384615384616 * points[19].Gamma.tau[1,2] * points[19].Gamma.G[1,2] + 0.5384615384615384 * points[19].Gamma.tau[2,2] * points[19].Gamma.G[2,2]
- */
-void Graph_eqFunction_521(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,521};
- data->localData[0]->realVars[513] /* points[19]._Gamma._sum2[2] variable */ = (0.4615384615384616) * ((data->localData[0]->realVars[629] /* points[19]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[311] /* points[19]._Gamma._G[1,2] variable */)) + (0.5384615384615384) * ((data->localData[0]->realVars[631] /* points[19]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[313] /* points[19]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 522
- type: SIMPLE_ASSIGN
- points[19]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[19].BIP[2,1,1], T[19])
- */
-void Graph_eqFunction_522(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,522};
- data->localData[0]->realVars[630] /* points[19]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[472],data->localData[0]->realVars[218] /* T[19] variable */,"T[19]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 523
- type: SIMPLE_ASSIGN
- points[19]._Gamma._G[2,1] = exp((-points[19].BIP[2,1,2]) * points[19].Gamma.tau[2,1])
- */
-void Graph_eqFunction_523(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,523};
- data->localData[0]->realVars[312] /* points[19]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[473])) * (data->localData[0]->realVars[630] /* points[19]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 524
- type: SIMPLE_ASSIGN
- points[19]._Gamma._sum2[1] = 0.4615384615384616 * points[19].Gamma.tau[1,1] * points[19].Gamma.G[1,1] + 0.5384615384615384 * points[19].Gamma.tau[2,1] * points[19].Gamma.G[2,1]
- */
-void Graph_eqFunction_524(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,524};
- data->localData[0]->realVars[512] /* points[19]._Gamma._sum2[1] variable */ = (0.4615384615384616) * ((data->localData[0]->realVars[628] /* points[19]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[310] /* points[19]._Gamma._G[1,1] variable */)) + (0.5384615384615384) * ((data->localData[0]->realVars[630] /* points[19]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[312] /* points[19]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 525
- type: SIMPLE_ASSIGN
- points[19]._Gamma._sum1[2] = 0.4615384615384616 * points[19].Gamma.G[1,2] + 0.5384615384615384 * points[19].Gamma.G[2,2]
- */
-void Graph_eqFunction_525(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,525};
- data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */ = (0.4615384615384616) * (data->localData[0]->realVars[311] /* points[19]._Gamma._G[1,2] variable */) + (0.5384615384615384) * (data->localData[0]->realVars[313] /* points[19]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 526
- type: SIMPLE_ASSIGN
- points[19]._Gamma._sum1[1] = 0.4615384615384616 * points[19].Gamma.G[1,1] + 0.5384615384615384 * points[19].Gamma.G[2,1]
- */
-void Graph_eqFunction_526(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,526};
- data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */ = (0.4615384615384616) * (data->localData[0]->realVars[310] /* points[19]._Gamma._G[1,1] variable */) + (0.5384615384615384) * (data->localData[0]->realVars[312] /* points[19]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 527
- type: SIMPLE_ASSIGN
- points[19]._gamma[1] = exp(DIVISION(points[19].Gamma.sum2[1], points[19].Gamma.sum1[1]) + 0.4615384615384616 * points[19].Gamma.G[1,1] * DIVISION(points[19].Gamma.tau[1,1] - DIVISION(points[19].Gamma.sum2[1], points[19].Gamma.sum1[1]), points[19].Gamma.sum1[1]) + 0.5384615384615384 * points[19].Gamma.G[1,2] * DIVISION(points[19].Gamma.tau[1,2] - DIVISION(points[19].Gamma.sum2[2], points[19].Gamma.sum1[2]), points[19].Gamma.sum1[2]))
- */
-void Graph_eqFunction_527(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,527};
- data->localData[0]->realVars[910] /* points[19]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[512] /* points[19]._Gamma._sum2[1] variable */,data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes) + (0.4615384615384616) * ((data->localData[0]->realVars[310] /* points[19]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[628] /* points[19]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[512] /* points[19]._Gamma._sum2[1] variable */,data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes))) + (0.5384615384615384) * ((data->localData[0]->realVars[311] /* points[19]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[629] /* points[19]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[513] /* points[19]._Gamma._sum2[2] variable */,data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 528
- type: SIMPLE_ASSIGN
- points[19]._gamma[2] = exp(DIVISION(points[19].Gamma.sum2[2], points[19].Gamma.sum1[2]) + 0.4615384615384616 * points[19].Gamma.G[2,1] * DIVISION(points[19].Gamma.tau[2,1] - DIVISION(points[19].Gamma.sum2[1], points[19].Gamma.sum1[1]), points[19].Gamma.sum1[1]) + 0.5384615384615384 * points[19].Gamma.G[2,2] * DIVISION(points[19].Gamma.tau[2,2] - DIVISION(points[19].Gamma.sum2[2], points[19].Gamma.sum1[2]), points[19].Gamma.sum1[2]))
- */
-void Graph_eqFunction_528(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,528};
- data->localData[0]->realVars[911] /* points[19]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[513] /* points[19]._Gamma._sum2[2] variable */,data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes) + (0.4615384615384616) * ((data->localData[0]->realVars[312] /* points[19]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[630] /* points[19]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[512] /* points[19]._Gamma._sum2[1] variable */,data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes))) + (0.5384615384615384) * ((data->localData[0]->realVars[313] /* points[19]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[631] /* points[19]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[513] /* points[19]._Gamma._sum2[2] variable */,data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 529
- type: SIMPLE_ASSIGN
- points[19]._K[2] = 0.0001 * points[19].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[19].comp[2].VP[1], points[19].comp[2].VP[2], points[19].comp[2].VP[3], points[19].comp[2].VP[4], points[19].comp[2].VP[5], points[19].comp[2].VP[6]}, T[19])
- */
-void Graph_eqFunction_529(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,529};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11506], (modelica_real)data->simulationInfo->realParameter[11507], (modelica_real)data->simulationInfo->realParameter[11508], (modelica_real)data->simulationInfo->realParameter[11509], (modelica_real)data->simulationInfo->realParameter[11510], (modelica_real)data->simulationInfo->realParameter[11511]);
- data->localData[0]->realVars[752] /* points[19]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[911] /* points[19]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[218] /* T[19] variable */)));
- TRACE_POP
-}
-/*
- equation index: 530
- type: SIMPLE_ASSIGN
- points[19]._K[1] = 0.0001 * points[19].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[19].comp[1].VP[1], points[19].comp[1].VP[2], points[19].comp[1].VP[3], points[19].comp[1].VP[4], points[19].comp[1].VP[5], points[19].comp[1].VP[6]}, T[19])
- */
-void Graph_eqFunction_530(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,530};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11500], (modelica_real)data->simulationInfo->realParameter[11501], (modelica_real)data->simulationInfo->realParameter[11502], (modelica_real)data->simulationInfo->realParameter[11503], (modelica_real)data->simulationInfo->realParameter[11504], (modelica_real)data->simulationInfo->realParameter[11505]);
- data->localData[0]->realVars[751] /* points[19]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[910] /* points[19]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[218] /* T[19] variable */)));
- TRACE_POP
-}
-
-void residualFunc532(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,532};
- /* iteration variables */
- data->localData[0]->realVars[218] /* T[19] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_515(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_516(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_517(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_518(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_519(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_520(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_521(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_522(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_523(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_524(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_525(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_526(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_527(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_528(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_529(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_530(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.5384615384615384) * (data->localData[0]->realVars[752] /* points[19]._K[2] variable */) + (-0.4615384615384616) * (data->localData[0]->realVars[751] /* points[19]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS532(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS532(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[19] */
- sysData->nominal[i] = data->modelData->realVarsData[218].attribute /* T[19] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[218].attribute /* T[19] */.min;
- sysData->max[i++] = data->modelData->realVarsData[218].attribute /* T[19] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS532(sysData);
-}
-
-void getIterationVarsNLS532(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[218] /* T[19] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 537
- type: SIMPLE_ASSIGN
- points[20]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[20].BIP[2,2,1], T[20])
- */
-void Graph_eqFunction_537(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,537};
- data->localData[0]->realVars[635] /* points[20]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[482],data->localData[0]->realVars[219] /* T[20] variable */,"T[20]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 538
- type: SIMPLE_ASSIGN
- points[20]._Gamma._G[2,2] = exp((-points[20].BIP[2,2,2]) * points[20].Gamma.tau[2,2])
- */
-void Graph_eqFunction_538(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,538};
- data->localData[0]->realVars[317] /* points[20]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[483])) * (data->localData[0]->realVars[635] /* points[20]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 539
- type: SIMPLE_ASSIGN
- points[20]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[20].BIP[1,1,1], T[20])
- */
-void Graph_eqFunction_539(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,539};
- data->localData[0]->realVars[632] /* points[20]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[476],data->localData[0]->realVars[219] /* T[20] variable */,"T[20]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 540
- type: SIMPLE_ASSIGN
- points[20]._Gamma._G[1,1] = exp((-points[20].BIP[1,1,2]) * points[20].Gamma.tau[1,1])
- */
-void Graph_eqFunction_540(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,540};
- data->localData[0]->realVars[314] /* points[20]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[477])) * (data->localData[0]->realVars[632] /* points[20]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 541
- type: SIMPLE_ASSIGN
- points[20]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[20].BIP[1,2,1], T[20])
- */
-void Graph_eqFunction_541(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,541};
- data->localData[0]->realVars[633] /* points[20]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[478],data->localData[0]->realVars[219] /* T[20] variable */,"T[20]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 542
- type: SIMPLE_ASSIGN
- points[20]._Gamma._G[1,2] = exp((-points[20].BIP[1,2,2]) * points[20].Gamma.tau[1,2])
- */
-void Graph_eqFunction_542(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,542};
- data->localData[0]->realVars[315] /* points[20]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[479])) * (data->localData[0]->realVars[633] /* points[20]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 543
- type: SIMPLE_ASSIGN
- points[20]._Gamma._sum2[2] = 0.4871794871794872 * points[20].Gamma.tau[1,2] * points[20].Gamma.G[1,2] + 0.5128205128205128 * points[20].Gamma.tau[2,2] * points[20].Gamma.G[2,2]
- */
-void Graph_eqFunction_543(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,543};
- data->localData[0]->realVars[515] /* points[20]._Gamma._sum2[2] variable */ = (0.4871794871794872) * ((data->localData[0]->realVars[633] /* points[20]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[315] /* points[20]._Gamma._G[1,2] variable */)) + (0.5128205128205128) * ((data->localData[0]->realVars[635] /* points[20]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[317] /* points[20]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 544
- type: SIMPLE_ASSIGN
- points[20]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[20].BIP[2,1,1], T[20])
- */
-void Graph_eqFunction_544(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,544};
- data->localData[0]->realVars[634] /* points[20]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[480],data->localData[0]->realVars[219] /* T[20] variable */,"T[20]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 545
- type: SIMPLE_ASSIGN
- points[20]._Gamma._G[2,1] = exp((-points[20].BIP[2,1,2]) * points[20].Gamma.tau[2,1])
- */
-void Graph_eqFunction_545(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,545};
- data->localData[0]->realVars[316] /* points[20]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[481])) * (data->localData[0]->realVars[634] /* points[20]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 546
- type: SIMPLE_ASSIGN
- points[20]._Gamma._sum2[1] = 0.4871794871794872 * points[20].Gamma.tau[1,1] * points[20].Gamma.G[1,1] + 0.5128205128205128 * points[20].Gamma.tau[2,1] * points[20].Gamma.G[2,1]
- */
-void Graph_eqFunction_546(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,546};
- data->localData[0]->realVars[514] /* points[20]._Gamma._sum2[1] variable */ = (0.4871794871794872) * ((data->localData[0]->realVars[632] /* points[20]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[314] /* points[20]._Gamma._G[1,1] variable */)) + (0.5128205128205128) * ((data->localData[0]->realVars[634] /* points[20]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[316] /* points[20]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 547
- type: SIMPLE_ASSIGN
- points[20]._Gamma._sum1[2] = 0.4871794871794872 * points[20].Gamma.G[1,2] + 0.5128205128205128 * points[20].Gamma.G[2,2]
- */
-void Graph_eqFunction_547(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,547};
- data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */ = (0.4871794871794872) * (data->localData[0]->realVars[315] /* points[20]._Gamma._G[1,2] variable */) + (0.5128205128205128) * (data->localData[0]->realVars[317] /* points[20]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 548
- type: SIMPLE_ASSIGN
- points[20]._Gamma._sum1[1] = 0.4871794871794872 * points[20].Gamma.G[1,1] + 0.5128205128205128 * points[20].Gamma.G[2,1]
- */
-void Graph_eqFunction_548(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,548};
- data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */ = (0.4871794871794872) * (data->localData[0]->realVars[314] /* points[20]._Gamma._G[1,1] variable */) + (0.5128205128205128) * (data->localData[0]->realVars[316] /* points[20]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 549
- type: SIMPLE_ASSIGN
- points[20]._gamma[1] = exp(DIVISION(points[20].Gamma.sum2[1], points[20].Gamma.sum1[1]) + 0.4871794871794872 * points[20].Gamma.G[1,1] * DIVISION(points[20].Gamma.tau[1,1] - DIVISION(points[20].Gamma.sum2[1], points[20].Gamma.sum1[1]), points[20].Gamma.sum1[1]) + 0.5128205128205128 * points[20].Gamma.G[1,2] * DIVISION(points[20].Gamma.tau[1,2] - DIVISION(points[20].Gamma.sum2[2], points[20].Gamma.sum1[2]), points[20].Gamma.sum1[2]))
- */
-void Graph_eqFunction_549(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,549};
- data->localData[0]->realVars[912] /* points[20]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[514] /* points[20]._Gamma._sum2[1] variable */,data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes) + (0.4871794871794872) * ((data->localData[0]->realVars[314] /* points[20]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[632] /* points[20]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[514] /* points[20]._Gamma._sum2[1] variable */,data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes))) + (0.5128205128205128) * ((data->localData[0]->realVars[315] /* points[20]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[633] /* points[20]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[515] /* points[20]._Gamma._sum2[2] variable */,data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 550
- type: SIMPLE_ASSIGN
- points[20]._gamma[2] = exp(DIVISION(points[20].Gamma.sum2[2], points[20].Gamma.sum1[2]) + 0.4871794871794872 * points[20].Gamma.G[2,1] * DIVISION(points[20].Gamma.tau[2,1] - DIVISION(points[20].Gamma.sum2[1], points[20].Gamma.sum1[1]), points[20].Gamma.sum1[1]) + 0.5128205128205128 * points[20].Gamma.G[2,2] * DIVISION(points[20].Gamma.tau[2,2] - DIVISION(points[20].Gamma.sum2[2], points[20].Gamma.sum1[2]), points[20].Gamma.sum1[2]))
- */
-void Graph_eqFunction_550(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,550};
- data->localData[0]->realVars[913] /* points[20]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[515] /* points[20]._Gamma._sum2[2] variable */,data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes) + (0.4871794871794872) * ((data->localData[0]->realVars[316] /* points[20]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[634] /* points[20]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[514] /* points[20]._Gamma._sum2[1] variable */,data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes))) + (0.5128205128205128) * ((data->localData[0]->realVars[317] /* points[20]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[635] /* points[20]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[515] /* points[20]._Gamma._sum2[2] variable */,data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 551
- type: SIMPLE_ASSIGN
- points[20]._K[2] = 0.0001 * points[20].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[20].comp[2].VP[1], points[20].comp[2].VP[2], points[20].comp[2].VP[3], points[20].comp[2].VP[4], points[20].comp[2].VP[5], points[20].comp[2].VP[6]}, T[20])
- */
-void Graph_eqFunction_551(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,551};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11518], (modelica_real)data->simulationInfo->realParameter[11519], (modelica_real)data->simulationInfo->realParameter[11520], (modelica_real)data->simulationInfo->realParameter[11521], (modelica_real)data->simulationInfo->realParameter[11522], (modelica_real)data->simulationInfo->realParameter[11523]);
- data->localData[0]->realVars[754] /* points[20]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[913] /* points[20]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[219] /* T[20] variable */)));
- TRACE_POP
-}
-/*
- equation index: 552
- type: SIMPLE_ASSIGN
- points[20]._K[1] = 0.0001 * points[20].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[20].comp[1].VP[1], points[20].comp[1].VP[2], points[20].comp[1].VP[3], points[20].comp[1].VP[4], points[20].comp[1].VP[5], points[20].comp[1].VP[6]}, T[20])
- */
-void Graph_eqFunction_552(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,552};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11512], (modelica_real)data->simulationInfo->realParameter[11513], (modelica_real)data->simulationInfo->realParameter[11514], (modelica_real)data->simulationInfo->realParameter[11515], (modelica_real)data->simulationInfo->realParameter[11516], (modelica_real)data->simulationInfo->realParameter[11517]);
- data->localData[0]->realVars[753] /* points[20]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[912] /* points[20]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[219] /* T[20] variable */)));
- TRACE_POP
-}
-
-void residualFunc554(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,554};
- /* iteration variables */
- data->localData[0]->realVars[219] /* T[20] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_537(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_538(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_539(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_540(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_541(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_542(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_543(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_544(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_545(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_546(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_547(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_548(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_549(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_550(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_551(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_552(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.5128205128205128) * (data->localData[0]->realVars[754] /* points[20]._K[2] variable */) + (-0.4871794871794872) * (data->localData[0]->realVars[753] /* points[20]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS554(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS554(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[20] */
- sysData->nominal[i] = data->modelData->realVarsData[219].attribute /* T[20] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[219].attribute /* T[20] */.min;
- sysData->max[i++] = data->modelData->realVarsData[219].attribute /* T[20] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS554(sysData);
-}
-
-void getIterationVarsNLS554(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[219] /* T[20] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 559
- type: SIMPLE_ASSIGN
- points[21]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[21].BIP[2,2,1], T[21])
- */
-void Graph_eqFunction_559(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,559};
- data->localData[0]->realVars[639] /* points[21]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[490],data->localData[0]->realVars[220] /* T[21] variable */,"T[21]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 560
- type: SIMPLE_ASSIGN
- points[21]._Gamma._G[2,2] = exp((-points[21].BIP[2,2,2]) * points[21].Gamma.tau[2,2])
- */
-void Graph_eqFunction_560(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,560};
- data->localData[0]->realVars[321] /* points[21]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[491])) * (data->localData[0]->realVars[639] /* points[21]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 561
- type: SIMPLE_ASSIGN
- points[21]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[21].BIP[1,1,1], T[21])
- */
-void Graph_eqFunction_561(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,561};
- data->localData[0]->realVars[636] /* points[21]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[484],data->localData[0]->realVars[220] /* T[21] variable */,"T[21]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 562
- type: SIMPLE_ASSIGN
- points[21]._Gamma._G[1,1] = exp((-points[21].BIP[1,1,2]) * points[21].Gamma.tau[1,1])
- */
-void Graph_eqFunction_562(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,562};
- data->localData[0]->realVars[318] /* points[21]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[485])) * (data->localData[0]->realVars[636] /* points[21]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 563
- type: SIMPLE_ASSIGN
- points[21]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[21].BIP[1,2,1], T[21])
- */
-void Graph_eqFunction_563(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,563};
- data->localData[0]->realVars[637] /* points[21]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[486],data->localData[0]->realVars[220] /* T[21] variable */,"T[21]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 564
- type: SIMPLE_ASSIGN
- points[21]._Gamma._G[1,2] = exp((-points[21].BIP[1,2,2]) * points[21].Gamma.tau[1,2])
- */
-void Graph_eqFunction_564(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,564};
- data->localData[0]->realVars[319] /* points[21]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[487])) * (data->localData[0]->realVars[637] /* points[21]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 565
- type: SIMPLE_ASSIGN
- points[21]._Gamma._sum2[2] = 0.5128205128205128 * points[21].Gamma.tau[1,2] * points[21].Gamma.G[1,2] + 0.4871794871794872 * points[21].Gamma.tau[2,2] * points[21].Gamma.G[2,2]
- */
-void Graph_eqFunction_565(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,565};
- data->localData[0]->realVars[517] /* points[21]._Gamma._sum2[2] variable */ = (0.5128205128205128) * ((data->localData[0]->realVars[637] /* points[21]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[319] /* points[21]._Gamma._G[1,2] variable */)) + (0.4871794871794872) * ((data->localData[0]->realVars[639] /* points[21]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[321] /* points[21]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 566
- type: SIMPLE_ASSIGN
- points[21]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[21].BIP[2,1,1], T[21])
- */
-void Graph_eqFunction_566(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,566};
- data->localData[0]->realVars[638] /* points[21]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[488],data->localData[0]->realVars[220] /* T[21] variable */,"T[21]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 567
- type: SIMPLE_ASSIGN
- points[21]._Gamma._G[2,1] = exp((-points[21].BIP[2,1,2]) * points[21].Gamma.tau[2,1])
- */
-void Graph_eqFunction_567(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,567};
- data->localData[0]->realVars[320] /* points[21]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[489])) * (data->localData[0]->realVars[638] /* points[21]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 568
- type: SIMPLE_ASSIGN
- points[21]._Gamma._sum2[1] = 0.5128205128205128 * points[21].Gamma.tau[1,1] * points[21].Gamma.G[1,1] + 0.4871794871794872 * points[21].Gamma.tau[2,1] * points[21].Gamma.G[2,1]
- */
-void Graph_eqFunction_568(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,568};
- data->localData[0]->realVars[516] /* points[21]._Gamma._sum2[1] variable */ = (0.5128205128205128) * ((data->localData[0]->realVars[636] /* points[21]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[318] /* points[21]._Gamma._G[1,1] variable */)) + (0.4871794871794872) * ((data->localData[0]->realVars[638] /* points[21]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[320] /* points[21]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 569
- type: SIMPLE_ASSIGN
- points[21]._Gamma._sum1[2] = 0.5128205128205128 * points[21].Gamma.G[1,2] + 0.4871794871794872 * points[21].Gamma.G[2,2]
- */
-void Graph_eqFunction_569(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,569};
- data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */ = (0.5128205128205128) * (data->localData[0]->realVars[319] /* points[21]._Gamma._G[1,2] variable */) + (0.4871794871794872) * (data->localData[0]->realVars[321] /* points[21]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 570
- type: SIMPLE_ASSIGN
- points[21]._Gamma._sum1[1] = 0.5128205128205128 * points[21].Gamma.G[1,1] + 0.4871794871794872 * points[21].Gamma.G[2,1]
- */
-void Graph_eqFunction_570(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,570};
- data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */ = (0.5128205128205128) * (data->localData[0]->realVars[318] /* points[21]._Gamma._G[1,1] variable */) + (0.4871794871794872) * (data->localData[0]->realVars[320] /* points[21]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 571
- type: SIMPLE_ASSIGN
- points[21]._gamma[1] = exp(DIVISION(points[21].Gamma.sum2[1], points[21].Gamma.sum1[1]) + 0.5128205128205128 * points[21].Gamma.G[1,1] * DIVISION(points[21].Gamma.tau[1,1] - DIVISION(points[21].Gamma.sum2[1], points[21].Gamma.sum1[1]), points[21].Gamma.sum1[1]) + 0.4871794871794872 * points[21].Gamma.G[1,2] * DIVISION(points[21].Gamma.tau[1,2] - DIVISION(points[21].Gamma.sum2[2], points[21].Gamma.sum1[2]), points[21].Gamma.sum1[2]))
- */
-void Graph_eqFunction_571(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,571};
- data->localData[0]->realVars[914] /* points[21]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[516] /* points[21]._Gamma._sum2[1] variable */,data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes) + (0.5128205128205128) * ((data->localData[0]->realVars[318] /* points[21]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[636] /* points[21]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[516] /* points[21]._Gamma._sum2[1] variable */,data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes))) + (0.4871794871794872) * ((data->localData[0]->realVars[319] /* points[21]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[637] /* points[21]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[517] /* points[21]._Gamma._sum2[2] variable */,data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 572
- type: SIMPLE_ASSIGN
- points[21]._gamma[2] = exp(DIVISION(points[21].Gamma.sum2[2], points[21].Gamma.sum1[2]) + 0.5128205128205128 * points[21].Gamma.G[2,1] * DIVISION(points[21].Gamma.tau[2,1] - DIVISION(points[21].Gamma.sum2[1], points[21].Gamma.sum1[1]), points[21].Gamma.sum1[1]) + 0.4871794871794872 * points[21].Gamma.G[2,2] * DIVISION(points[21].Gamma.tau[2,2] - DIVISION(points[21].Gamma.sum2[2], points[21].Gamma.sum1[2]), points[21].Gamma.sum1[2]))
- */
-void Graph_eqFunction_572(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,572};
- data->localData[0]->realVars[915] /* points[21]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[517] /* points[21]._Gamma._sum2[2] variable */,data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes) + (0.5128205128205128) * ((data->localData[0]->realVars[320] /* points[21]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[638] /* points[21]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[516] /* points[21]._Gamma._sum2[1] variable */,data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes))) + (0.4871794871794872) * ((data->localData[0]->realVars[321] /* points[21]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[639] /* points[21]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[517] /* points[21]._Gamma._sum2[2] variable */,data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 573
- type: SIMPLE_ASSIGN
- points[21]._K[2] = 0.0001 * points[21].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[21].comp[2].VP[1], points[21].comp[2].VP[2], points[21].comp[2].VP[3], points[21].comp[2].VP[4], points[21].comp[2].VP[5], points[21].comp[2].VP[6]}, T[21])
- */
-void Graph_eqFunction_573(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,573};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11530], (modelica_real)data->simulationInfo->realParameter[11531], (modelica_real)data->simulationInfo->realParameter[11532], (modelica_real)data->simulationInfo->realParameter[11533], (modelica_real)data->simulationInfo->realParameter[11534], (modelica_real)data->simulationInfo->realParameter[11535]);
- data->localData[0]->realVars[756] /* points[21]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[915] /* points[21]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[220] /* T[21] variable */)));
- TRACE_POP
-}
-/*
- equation index: 574
- type: SIMPLE_ASSIGN
- points[21]._K[1] = 0.0001 * points[21].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[21].comp[1].VP[1], points[21].comp[1].VP[2], points[21].comp[1].VP[3], points[21].comp[1].VP[4], points[21].comp[1].VP[5], points[21].comp[1].VP[6]}, T[21])
- */
-void Graph_eqFunction_574(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,574};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11524], (modelica_real)data->simulationInfo->realParameter[11525], (modelica_real)data->simulationInfo->realParameter[11526], (modelica_real)data->simulationInfo->realParameter[11527], (modelica_real)data->simulationInfo->realParameter[11528], (modelica_real)data->simulationInfo->realParameter[11529]);
- data->localData[0]->realVars[755] /* points[21]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[914] /* points[21]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[220] /* T[21] variable */)));
- TRACE_POP
-}
-
-void residualFunc576(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,576};
- /* iteration variables */
- data->localData[0]->realVars[220] /* T[21] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_559(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_560(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_561(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_562(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_563(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_564(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_565(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_566(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_567(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_568(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_569(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_570(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_571(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_572(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_573(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_574(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.4871794871794872) * (data->localData[0]->realVars[756] /* points[21]._K[2] variable */) + (-0.5128205128205128) * (data->localData[0]->realVars[755] /* points[21]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS576(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS576(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[21] */
- sysData->nominal[i] = data->modelData->realVarsData[220].attribute /* T[21] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[220].attribute /* T[21] */.min;
- sysData->max[i++] = data->modelData->realVarsData[220].attribute /* T[21] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS576(sysData);
-}
-
-void getIterationVarsNLS576(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[220] /* T[21] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 581
- type: SIMPLE_ASSIGN
- points[22]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[22].BIP[2,2,1], T[22])
- */
-void Graph_eqFunction_581(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,581};
- data->localData[0]->realVars[643] /* points[22]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[498],data->localData[0]->realVars[221] /* T[22] variable */,"T[22]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 582
- type: SIMPLE_ASSIGN
- points[22]._Gamma._G[2,2] = exp((-points[22].BIP[2,2,2]) * points[22].Gamma.tau[2,2])
- */
-void Graph_eqFunction_582(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,582};
- data->localData[0]->realVars[325] /* points[22]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[499])) * (data->localData[0]->realVars[643] /* points[22]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 583
- type: SIMPLE_ASSIGN
- points[22]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[22].BIP[1,1,1], T[22])
- */
-void Graph_eqFunction_583(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,583};
- data->localData[0]->realVars[640] /* points[22]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[492],data->localData[0]->realVars[221] /* T[22] variable */,"T[22]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 584
- type: SIMPLE_ASSIGN
- points[22]._Gamma._G[1,1] = exp((-points[22].BIP[1,1,2]) * points[22].Gamma.tau[1,1])
- */
-void Graph_eqFunction_584(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,584};
- data->localData[0]->realVars[322] /* points[22]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[493])) * (data->localData[0]->realVars[640] /* points[22]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 585
- type: SIMPLE_ASSIGN
- points[22]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[22].BIP[1,2,1], T[22])
- */
-void Graph_eqFunction_585(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,585};
- data->localData[0]->realVars[641] /* points[22]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[494],data->localData[0]->realVars[221] /* T[22] variable */,"T[22]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 586
- type: SIMPLE_ASSIGN
- points[22]._Gamma._G[1,2] = exp((-points[22].BIP[1,2,2]) * points[22].Gamma.tau[1,2])
- */
-void Graph_eqFunction_586(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,586};
- data->localData[0]->realVars[323] /* points[22]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[495])) * (data->localData[0]->realVars[641] /* points[22]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 587
- type: SIMPLE_ASSIGN
- points[22]._Gamma._sum2[2] = 0.5384615384615384 * points[22].Gamma.tau[1,2] * points[22].Gamma.G[1,2] + 0.4615384615384616 * points[22].Gamma.tau[2,2] * points[22].Gamma.G[2,2]
- */
-void Graph_eqFunction_587(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,587};
- data->localData[0]->realVars[519] /* points[22]._Gamma._sum2[2] variable */ = (0.5384615384615384) * ((data->localData[0]->realVars[641] /* points[22]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[323] /* points[22]._Gamma._G[1,2] variable */)) + (0.4615384615384616) * ((data->localData[0]->realVars[643] /* points[22]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[325] /* points[22]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 588
- type: SIMPLE_ASSIGN
- points[22]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[22].BIP[2,1,1], T[22])
- */
-void Graph_eqFunction_588(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,588};
- data->localData[0]->realVars[642] /* points[22]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[496],data->localData[0]->realVars[221] /* T[22] variable */,"T[22]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 589
- type: SIMPLE_ASSIGN
- points[22]._Gamma._G[2,1] = exp((-points[22].BIP[2,1,2]) * points[22].Gamma.tau[2,1])
- */
-void Graph_eqFunction_589(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,589};
- data->localData[0]->realVars[324] /* points[22]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[497])) * (data->localData[0]->realVars[642] /* points[22]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 590
- type: SIMPLE_ASSIGN
- points[22]._Gamma._sum2[1] = 0.5384615384615384 * points[22].Gamma.tau[1,1] * points[22].Gamma.G[1,1] + 0.4615384615384616 * points[22].Gamma.tau[2,1] * points[22].Gamma.G[2,1]
- */
-void Graph_eqFunction_590(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,590};
- data->localData[0]->realVars[518] /* points[22]._Gamma._sum2[1] variable */ = (0.5384615384615384) * ((data->localData[0]->realVars[640] /* points[22]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[322] /* points[22]._Gamma._G[1,1] variable */)) + (0.4615384615384616) * ((data->localData[0]->realVars[642] /* points[22]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[324] /* points[22]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 591
- type: SIMPLE_ASSIGN
- points[22]._Gamma._sum1[2] = 0.5384615384615384 * points[22].Gamma.G[1,2] + 0.4615384615384616 * points[22].Gamma.G[2,2]
- */
-void Graph_eqFunction_591(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,591};
- data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */ = (0.5384615384615384) * (data->localData[0]->realVars[323] /* points[22]._Gamma._G[1,2] variable */) + (0.4615384615384616) * (data->localData[0]->realVars[325] /* points[22]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 592
- type: SIMPLE_ASSIGN
- points[22]._Gamma._sum1[1] = 0.5384615384615384 * points[22].Gamma.G[1,1] + 0.4615384615384616 * points[22].Gamma.G[2,1]
- */
-void Graph_eqFunction_592(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,592};
- data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */ = (0.5384615384615384) * (data->localData[0]->realVars[322] /* points[22]._Gamma._G[1,1] variable */) + (0.4615384615384616) * (data->localData[0]->realVars[324] /* points[22]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 593
- type: SIMPLE_ASSIGN
- points[22]._gamma[1] = exp(DIVISION(points[22].Gamma.sum2[1], points[22].Gamma.sum1[1]) + 0.5384615384615384 * points[22].Gamma.G[1,1] * DIVISION(points[22].Gamma.tau[1,1] - DIVISION(points[22].Gamma.sum2[1], points[22].Gamma.sum1[1]), points[22].Gamma.sum1[1]) + 0.4615384615384616 * points[22].Gamma.G[1,2] * DIVISION(points[22].Gamma.tau[1,2] - DIVISION(points[22].Gamma.sum2[2], points[22].Gamma.sum1[2]), points[22].Gamma.sum1[2]))
- */
-void Graph_eqFunction_593(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,593};
- data->localData[0]->realVars[916] /* points[22]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[518] /* points[22]._Gamma._sum2[1] variable */,data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes) + (0.5384615384615384) * ((data->localData[0]->realVars[322] /* points[22]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[640] /* points[22]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[518] /* points[22]._Gamma._sum2[1] variable */,data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes))) + (0.4615384615384616) * ((data->localData[0]->realVars[323] /* points[22]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[641] /* points[22]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[519] /* points[22]._Gamma._sum2[2] variable */,data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 594
- type: SIMPLE_ASSIGN
- points[22]._gamma[2] = exp(DIVISION(points[22].Gamma.sum2[2], points[22].Gamma.sum1[2]) + 0.5384615384615384 * points[22].Gamma.G[2,1] * DIVISION(points[22].Gamma.tau[2,1] - DIVISION(points[22].Gamma.sum2[1], points[22].Gamma.sum1[1]), points[22].Gamma.sum1[1]) + 0.4615384615384616 * points[22].Gamma.G[2,2] * DIVISION(points[22].Gamma.tau[2,2] - DIVISION(points[22].Gamma.sum2[2], points[22].Gamma.sum1[2]), points[22].Gamma.sum1[2]))
- */
-void Graph_eqFunction_594(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,594};
- data->localData[0]->realVars[917] /* points[22]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[519] /* points[22]._Gamma._sum2[2] variable */,data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes) + (0.5384615384615384) * ((data->localData[0]->realVars[324] /* points[22]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[642] /* points[22]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[518] /* points[22]._Gamma._sum2[1] variable */,data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes))) + (0.4615384615384616) * ((data->localData[0]->realVars[325] /* points[22]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[643] /* points[22]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[519] /* points[22]._Gamma._sum2[2] variable */,data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 595
- type: SIMPLE_ASSIGN
- points[22]._K[2] = 0.0001 * points[22].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[22].comp[2].VP[1], points[22].comp[2].VP[2], points[22].comp[2].VP[3], points[22].comp[2].VP[4], points[22].comp[2].VP[5], points[22].comp[2].VP[6]}, T[22])
- */
-void Graph_eqFunction_595(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,595};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11542], (modelica_real)data->simulationInfo->realParameter[11543], (modelica_real)data->simulationInfo->realParameter[11544], (modelica_real)data->simulationInfo->realParameter[11545], (modelica_real)data->simulationInfo->realParameter[11546], (modelica_real)data->simulationInfo->realParameter[11547]);
- data->localData[0]->realVars[758] /* points[22]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[917] /* points[22]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[221] /* T[22] variable */)));
- TRACE_POP
-}
-/*
- equation index: 596
- type: SIMPLE_ASSIGN
- points[22]._K[1] = 0.0001 * points[22].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[22].comp[1].VP[1], points[22].comp[1].VP[2], points[22].comp[1].VP[3], points[22].comp[1].VP[4], points[22].comp[1].VP[5], points[22].comp[1].VP[6]}, T[22])
- */
-void Graph_eqFunction_596(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,596};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11536], (modelica_real)data->simulationInfo->realParameter[11537], (modelica_real)data->simulationInfo->realParameter[11538], (modelica_real)data->simulationInfo->realParameter[11539], (modelica_real)data->simulationInfo->realParameter[11540], (modelica_real)data->simulationInfo->realParameter[11541]);
- data->localData[0]->realVars[757] /* points[22]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[916] /* points[22]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[221] /* T[22] variable */)));
- TRACE_POP
-}
-
-void residualFunc598(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,598};
- /* iteration variables */
- data->localData[0]->realVars[221] /* T[22] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_581(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_582(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_583(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_584(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_585(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_586(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_587(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_588(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_589(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_590(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_591(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_592(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_593(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_594(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_595(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_596(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.4615384615384616) * (data->localData[0]->realVars[758] /* points[22]._K[2] variable */) + (-0.5384615384615384) * (data->localData[0]->realVars[757] /* points[22]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS598(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS598(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[22] */
- sysData->nominal[i] = data->modelData->realVarsData[221].attribute /* T[22] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[221].attribute /* T[22] */.min;
- sysData->max[i++] = data->modelData->realVarsData[221].attribute /* T[22] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS598(sysData);
-}
-
-void getIterationVarsNLS598(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[221] /* T[22] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 603
- type: SIMPLE_ASSIGN
- points[23]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[23].BIP[2,2,1], T[23])
- */
-void Graph_eqFunction_603(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,603};
- data->localData[0]->realVars[647] /* points[23]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[506],data->localData[0]->realVars[222] /* T[23] variable */,"T[23]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 604
- type: SIMPLE_ASSIGN
- points[23]._Gamma._G[2,2] = exp((-points[23].BIP[2,2,2]) * points[23].Gamma.tau[2,2])
- */
-void Graph_eqFunction_604(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,604};
- data->localData[0]->realVars[329] /* points[23]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[507])) * (data->localData[0]->realVars[647] /* points[23]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 605
- type: SIMPLE_ASSIGN
- points[23]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[23].BIP[1,1,1], T[23])
- */
-void Graph_eqFunction_605(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,605};
- data->localData[0]->realVars[644] /* points[23]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[500],data->localData[0]->realVars[222] /* T[23] variable */,"T[23]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 606
- type: SIMPLE_ASSIGN
- points[23]._Gamma._G[1,1] = exp((-points[23].BIP[1,1,2]) * points[23].Gamma.tau[1,1])
- */
-void Graph_eqFunction_606(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,606};
- data->localData[0]->realVars[326] /* points[23]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[501])) * (data->localData[0]->realVars[644] /* points[23]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 607
- type: SIMPLE_ASSIGN
- points[23]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[23].BIP[1,2,1], T[23])
- */
-void Graph_eqFunction_607(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,607};
- data->localData[0]->realVars[645] /* points[23]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[502],data->localData[0]->realVars[222] /* T[23] variable */,"T[23]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 608
- type: SIMPLE_ASSIGN
- points[23]._Gamma._G[1,2] = exp((-points[23].BIP[1,2,2]) * points[23].Gamma.tau[1,2])
- */
-void Graph_eqFunction_608(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,608};
- data->localData[0]->realVars[327] /* points[23]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[503])) * (data->localData[0]->realVars[645] /* points[23]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 609
- type: SIMPLE_ASSIGN
- points[23]._Gamma._sum2[2] = 0.5641025641025641 * points[23].Gamma.tau[1,2] * points[23].Gamma.G[1,2] + 0.4358974358974359 * points[23].Gamma.tau[2,2] * points[23].Gamma.G[2,2]
- */
-void Graph_eqFunction_609(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,609};
- data->localData[0]->realVars[521] /* points[23]._Gamma._sum2[2] variable */ = (0.5641025641025641) * ((data->localData[0]->realVars[645] /* points[23]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[327] /* points[23]._Gamma._G[1,2] variable */)) + (0.4358974358974359) * ((data->localData[0]->realVars[647] /* points[23]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[329] /* points[23]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 610
- type: SIMPLE_ASSIGN
- points[23]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[23].BIP[2,1,1], T[23])
- */
-void Graph_eqFunction_610(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,610};
- data->localData[0]->realVars[646] /* points[23]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[504],data->localData[0]->realVars[222] /* T[23] variable */,"T[23]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 611
- type: SIMPLE_ASSIGN
- points[23]._Gamma._G[2,1] = exp((-points[23].BIP[2,1,2]) * points[23].Gamma.tau[2,1])
- */
-void Graph_eqFunction_611(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,611};
- data->localData[0]->realVars[328] /* points[23]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[505])) * (data->localData[0]->realVars[646] /* points[23]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 612
- type: SIMPLE_ASSIGN
- points[23]._Gamma._sum2[1] = 0.5641025641025641 * points[23].Gamma.tau[1,1] * points[23].Gamma.G[1,1] + 0.4358974358974359 * points[23].Gamma.tau[2,1] * points[23].Gamma.G[2,1]
- */
-void Graph_eqFunction_612(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,612};
- data->localData[0]->realVars[520] /* points[23]._Gamma._sum2[1] variable */ = (0.5641025641025641) * ((data->localData[0]->realVars[644] /* points[23]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[326] /* points[23]._Gamma._G[1,1] variable */)) + (0.4358974358974359) * ((data->localData[0]->realVars[646] /* points[23]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[328] /* points[23]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 613
- type: SIMPLE_ASSIGN
- points[23]._Gamma._sum1[2] = 0.5641025641025641 * points[23].Gamma.G[1,2] + 0.4358974358974359 * points[23].Gamma.G[2,2]
- */
-void Graph_eqFunction_613(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,613};
- data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */ = (0.5641025641025641) * (data->localData[0]->realVars[327] /* points[23]._Gamma._G[1,2] variable */) + (0.4358974358974359) * (data->localData[0]->realVars[329] /* points[23]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 614
- type: SIMPLE_ASSIGN
- points[23]._Gamma._sum1[1] = 0.5641025641025641 * points[23].Gamma.G[1,1] + 0.4358974358974359 * points[23].Gamma.G[2,1]
- */
-void Graph_eqFunction_614(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,614};
- data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */ = (0.5641025641025641) * (data->localData[0]->realVars[326] /* points[23]._Gamma._G[1,1] variable */) + (0.4358974358974359) * (data->localData[0]->realVars[328] /* points[23]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 615
- type: SIMPLE_ASSIGN
- points[23]._gamma[1] = exp(DIVISION(points[23].Gamma.sum2[1], points[23].Gamma.sum1[1]) + 0.5641025641025641 * points[23].Gamma.G[1,1] * DIVISION(points[23].Gamma.tau[1,1] - DIVISION(points[23].Gamma.sum2[1], points[23].Gamma.sum1[1]), points[23].Gamma.sum1[1]) + 0.4358974358974359 * points[23].Gamma.G[1,2] * DIVISION(points[23].Gamma.tau[1,2] - DIVISION(points[23].Gamma.sum2[2], points[23].Gamma.sum1[2]), points[23].Gamma.sum1[2]))
- */
-void Graph_eqFunction_615(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,615};
- data->localData[0]->realVars[918] /* points[23]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[520] /* points[23]._Gamma._sum2[1] variable */,data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes) + (0.5641025641025641) * ((data->localData[0]->realVars[326] /* points[23]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[644] /* points[23]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[520] /* points[23]._Gamma._sum2[1] variable */,data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes))) + (0.4358974358974359) * ((data->localData[0]->realVars[327] /* points[23]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[645] /* points[23]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[521] /* points[23]._Gamma._sum2[2] variable */,data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 616
- type: SIMPLE_ASSIGN
- points[23]._gamma[2] = exp(DIVISION(points[23].Gamma.sum2[2], points[23].Gamma.sum1[2]) + 0.5641025641025641 * points[23].Gamma.G[2,1] * DIVISION(points[23].Gamma.tau[2,1] - DIVISION(points[23].Gamma.sum2[1], points[23].Gamma.sum1[1]), points[23].Gamma.sum1[1]) + 0.4358974358974359 * points[23].Gamma.G[2,2] * DIVISION(points[23].Gamma.tau[2,2] - DIVISION(points[23].Gamma.sum2[2], points[23].Gamma.sum1[2]), points[23].Gamma.sum1[2]))
- */
-void Graph_eqFunction_616(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,616};
- data->localData[0]->realVars[919] /* points[23]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[521] /* points[23]._Gamma._sum2[2] variable */,data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes) + (0.5641025641025641) * ((data->localData[0]->realVars[328] /* points[23]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[646] /* points[23]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[520] /* points[23]._Gamma._sum2[1] variable */,data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes))) + (0.4358974358974359) * ((data->localData[0]->realVars[329] /* points[23]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[647] /* points[23]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[521] /* points[23]._Gamma._sum2[2] variable */,data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 617
- type: SIMPLE_ASSIGN
- points[23]._K[2] = 0.0001 * points[23].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[23].comp[2].VP[1], points[23].comp[2].VP[2], points[23].comp[2].VP[3], points[23].comp[2].VP[4], points[23].comp[2].VP[5], points[23].comp[2].VP[6]}, T[23])
- */
-void Graph_eqFunction_617(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,617};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11554], (modelica_real)data->simulationInfo->realParameter[11555], (modelica_real)data->simulationInfo->realParameter[11556], (modelica_real)data->simulationInfo->realParameter[11557], (modelica_real)data->simulationInfo->realParameter[11558], (modelica_real)data->simulationInfo->realParameter[11559]);
- data->localData[0]->realVars[760] /* points[23]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[919] /* points[23]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[222] /* T[23] variable */)));
- TRACE_POP
-}
-/*
- equation index: 618
- type: SIMPLE_ASSIGN
- points[23]._K[1] = 0.0001 * points[23].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[23].comp[1].VP[1], points[23].comp[1].VP[2], points[23].comp[1].VP[3], points[23].comp[1].VP[4], points[23].comp[1].VP[5], points[23].comp[1].VP[6]}, T[23])
- */
-void Graph_eqFunction_618(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,618};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11548], (modelica_real)data->simulationInfo->realParameter[11549], (modelica_real)data->simulationInfo->realParameter[11550], (modelica_real)data->simulationInfo->realParameter[11551], (modelica_real)data->simulationInfo->realParameter[11552], (modelica_real)data->simulationInfo->realParameter[11553]);
- data->localData[0]->realVars[759] /* points[23]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[918] /* points[23]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[222] /* T[23] variable */)));
- TRACE_POP
-}
-
-void residualFunc620(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,620};
- /* iteration variables */
- data->localData[0]->realVars[222] /* T[23] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_603(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_604(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_605(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_606(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_607(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_608(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_609(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_610(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_611(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_612(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_613(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_614(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_615(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_616(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_617(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_618(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.4358974358974359) * (data->localData[0]->realVars[760] /* points[23]._K[2] variable */) + (-0.5641025641025641) * (data->localData[0]->realVars[759] /* points[23]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS620(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS620(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[23] */
- sysData->nominal[i] = data->modelData->realVarsData[222].attribute /* T[23] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[222].attribute /* T[23] */.min;
- sysData->max[i++] = data->modelData->realVarsData[222].attribute /* T[23] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS620(sysData);
-}
-
-void getIterationVarsNLS620(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[222] /* T[23] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 625
- type: SIMPLE_ASSIGN
- points[24]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[24].BIP[2,2,1], T[24])
- */
-void Graph_eqFunction_625(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,625};
- data->localData[0]->realVars[651] /* points[24]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[514],data->localData[0]->realVars[223] /* T[24] variable */,"T[24]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 626
- type: SIMPLE_ASSIGN
- points[24]._Gamma._G[2,2] = exp((-points[24].BIP[2,2,2]) * points[24].Gamma.tau[2,2])
- */
-void Graph_eqFunction_626(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,626};
- data->localData[0]->realVars[333] /* points[24]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[515])) * (data->localData[0]->realVars[651] /* points[24]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 627
- type: SIMPLE_ASSIGN
- points[24]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[24].BIP[1,1,1], T[24])
- */
-void Graph_eqFunction_627(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,627};
- data->localData[0]->realVars[648] /* points[24]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[508],data->localData[0]->realVars[223] /* T[24] variable */,"T[24]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 628
- type: SIMPLE_ASSIGN
- points[24]._Gamma._G[1,1] = exp((-points[24].BIP[1,1,2]) * points[24].Gamma.tau[1,1])
- */
-void Graph_eqFunction_628(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,628};
- data->localData[0]->realVars[330] /* points[24]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[509])) * (data->localData[0]->realVars[648] /* points[24]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 629
- type: SIMPLE_ASSIGN
- points[24]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[24].BIP[1,2,1], T[24])
- */
-void Graph_eqFunction_629(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,629};
- data->localData[0]->realVars[649] /* points[24]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[510],data->localData[0]->realVars[223] /* T[24] variable */,"T[24]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 630
- type: SIMPLE_ASSIGN
- points[24]._Gamma._G[1,2] = exp((-points[24].BIP[1,2,2]) * points[24].Gamma.tau[1,2])
- */
-void Graph_eqFunction_630(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,630};
- data->localData[0]->realVars[331] /* points[24]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[511])) * (data->localData[0]->realVars[649] /* points[24]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 631
- type: SIMPLE_ASSIGN
- points[24]._Gamma._sum2[2] = 0.5897435897435898 * points[24].Gamma.tau[1,2] * points[24].Gamma.G[1,2] + 0.4102564102564102 * points[24].Gamma.tau[2,2] * points[24].Gamma.G[2,2]
- */
-void Graph_eqFunction_631(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,631};
- data->localData[0]->realVars[523] /* points[24]._Gamma._sum2[2] variable */ = (0.5897435897435898) * ((data->localData[0]->realVars[649] /* points[24]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[331] /* points[24]._Gamma._G[1,2] variable */)) + (0.4102564102564102) * ((data->localData[0]->realVars[651] /* points[24]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[333] /* points[24]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 632
- type: SIMPLE_ASSIGN
- points[24]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[24].BIP[2,1,1], T[24])
- */
-void Graph_eqFunction_632(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,632};
- data->localData[0]->realVars[650] /* points[24]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[512],data->localData[0]->realVars[223] /* T[24] variable */,"T[24]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 633
- type: SIMPLE_ASSIGN
- points[24]._Gamma._G[2,1] = exp((-points[24].BIP[2,1,2]) * points[24].Gamma.tau[2,1])
- */
-void Graph_eqFunction_633(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,633};
- data->localData[0]->realVars[332] /* points[24]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[513])) * (data->localData[0]->realVars[650] /* points[24]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 634
- type: SIMPLE_ASSIGN
- points[24]._Gamma._sum2[1] = 0.5897435897435898 * points[24].Gamma.tau[1,1] * points[24].Gamma.G[1,1] + 0.4102564102564102 * points[24].Gamma.tau[2,1] * points[24].Gamma.G[2,1]
- */
-void Graph_eqFunction_634(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,634};
- data->localData[0]->realVars[522] /* points[24]._Gamma._sum2[1] variable */ = (0.5897435897435898) * ((data->localData[0]->realVars[648] /* points[24]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[330] /* points[24]._Gamma._G[1,1] variable */)) + (0.4102564102564102) * ((data->localData[0]->realVars[650] /* points[24]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[332] /* points[24]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 635
- type: SIMPLE_ASSIGN
- points[24]._Gamma._sum1[2] = 0.5897435897435898 * points[24].Gamma.G[1,2] + 0.4102564102564102 * points[24].Gamma.G[2,2]
- */
-void Graph_eqFunction_635(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,635};
- data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */ = (0.5897435897435898) * (data->localData[0]->realVars[331] /* points[24]._Gamma._G[1,2] variable */) + (0.4102564102564102) * (data->localData[0]->realVars[333] /* points[24]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 636
- type: SIMPLE_ASSIGN
- points[24]._Gamma._sum1[1] = 0.5897435897435898 * points[24].Gamma.G[1,1] + 0.4102564102564102 * points[24].Gamma.G[2,1]
- */
-void Graph_eqFunction_636(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,636};
- data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */ = (0.5897435897435898) * (data->localData[0]->realVars[330] /* points[24]._Gamma._G[1,1] variable */) + (0.4102564102564102) * (data->localData[0]->realVars[332] /* points[24]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 637
- type: SIMPLE_ASSIGN
- points[24]._gamma[1] = exp(DIVISION(points[24].Gamma.sum2[1], points[24].Gamma.sum1[1]) + 0.5897435897435898 * points[24].Gamma.G[1,1] * DIVISION(points[24].Gamma.tau[1,1] - DIVISION(points[24].Gamma.sum2[1], points[24].Gamma.sum1[1]), points[24].Gamma.sum1[1]) + 0.4102564102564102 * points[24].Gamma.G[1,2] * DIVISION(points[24].Gamma.tau[1,2] - DIVISION(points[24].Gamma.sum2[2], points[24].Gamma.sum1[2]), points[24].Gamma.sum1[2]))
- */
-void Graph_eqFunction_637(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,637};
- data->localData[0]->realVars[920] /* points[24]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[522] /* points[24]._Gamma._sum2[1] variable */,data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes) + (0.5897435897435898) * ((data->localData[0]->realVars[330] /* points[24]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[648] /* points[24]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[522] /* points[24]._Gamma._sum2[1] variable */,data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes))) + (0.4102564102564102) * ((data->localData[0]->realVars[331] /* points[24]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[649] /* points[24]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[523] /* points[24]._Gamma._sum2[2] variable */,data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 638
- type: SIMPLE_ASSIGN
- points[24]._gamma[2] = exp(DIVISION(points[24].Gamma.sum2[2], points[24].Gamma.sum1[2]) + 0.5897435897435898 * points[24].Gamma.G[2,1] * DIVISION(points[24].Gamma.tau[2,1] - DIVISION(points[24].Gamma.sum2[1], points[24].Gamma.sum1[1]), points[24].Gamma.sum1[1]) + 0.4102564102564102 * points[24].Gamma.G[2,2] * DIVISION(points[24].Gamma.tau[2,2] - DIVISION(points[24].Gamma.sum2[2], points[24].Gamma.sum1[2]), points[24].Gamma.sum1[2]))
- */
-void Graph_eqFunction_638(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,638};
- data->localData[0]->realVars[921] /* points[24]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[523] /* points[24]._Gamma._sum2[2] variable */,data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes) + (0.5897435897435898) * ((data->localData[0]->realVars[332] /* points[24]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[650] /* points[24]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[522] /* points[24]._Gamma._sum2[1] variable */,data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes))) + (0.4102564102564102) * ((data->localData[0]->realVars[333] /* points[24]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[651] /* points[24]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[523] /* points[24]._Gamma._sum2[2] variable */,data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 639
- type: SIMPLE_ASSIGN
- points[24]._K[2] = 0.0001 * points[24].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[24].comp[2].VP[1], points[24].comp[2].VP[2], points[24].comp[2].VP[3], points[24].comp[2].VP[4], points[24].comp[2].VP[5], points[24].comp[2].VP[6]}, T[24])
- */
-void Graph_eqFunction_639(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,639};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11566], (modelica_real)data->simulationInfo->realParameter[11567], (modelica_real)data->simulationInfo->realParameter[11568], (modelica_real)data->simulationInfo->realParameter[11569], (modelica_real)data->simulationInfo->realParameter[11570], (modelica_real)data->simulationInfo->realParameter[11571]);
- data->localData[0]->realVars[762] /* points[24]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[921] /* points[24]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[223] /* T[24] variable */)));
- TRACE_POP
-}
-/*
- equation index: 640
- type: SIMPLE_ASSIGN
- points[24]._K[1] = 0.0001 * points[24].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[24].comp[1].VP[1], points[24].comp[1].VP[2], points[24].comp[1].VP[3], points[24].comp[1].VP[4], points[24].comp[1].VP[5], points[24].comp[1].VP[6]}, T[24])
- */
-void Graph_eqFunction_640(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,640};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11560], (modelica_real)data->simulationInfo->realParameter[11561], (modelica_real)data->simulationInfo->realParameter[11562], (modelica_real)data->simulationInfo->realParameter[11563], (modelica_real)data->simulationInfo->realParameter[11564], (modelica_real)data->simulationInfo->realParameter[11565]);
- data->localData[0]->realVars[761] /* points[24]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[920] /* points[24]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[223] /* T[24] variable */)));
- TRACE_POP
-}
-
-void residualFunc642(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,642};
- /* iteration variables */
- data->localData[0]->realVars[223] /* T[24] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_625(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_626(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_627(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_628(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_629(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_630(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_631(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_632(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_633(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_634(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_635(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_636(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_637(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_638(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_639(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_640(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.4102564102564102) * (data->localData[0]->realVars[762] /* points[24]._K[2] variable */) + (-0.5897435897435898) * (data->localData[0]->realVars[761] /* points[24]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS642(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS642(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[24] */
- sysData->nominal[i] = data->modelData->realVarsData[223].attribute /* T[24] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[223].attribute /* T[24] */.min;
- sysData->max[i++] = data->modelData->realVarsData[223].attribute /* T[24] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS642(sysData);
-}
-
-void getIterationVarsNLS642(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[223] /* T[24] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 647
- type: SIMPLE_ASSIGN
- points[25]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[25].BIP[2,2,1], T[25])
- */
-void Graph_eqFunction_647(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,647};
- data->localData[0]->realVars[655] /* points[25]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[522],data->localData[0]->realVars[224] /* T[25] variable */,"T[25]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 648
- type: SIMPLE_ASSIGN
- points[25]._Gamma._G[2,2] = exp((-points[25].BIP[2,2,2]) * points[25].Gamma.tau[2,2])
- */
-void Graph_eqFunction_648(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,648};
- data->localData[0]->realVars[337] /* points[25]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[523])) * (data->localData[0]->realVars[655] /* points[25]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 649
- type: SIMPLE_ASSIGN
- points[25]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[25].BIP[1,1,1], T[25])
- */
-void Graph_eqFunction_649(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,649};
- data->localData[0]->realVars[652] /* points[25]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[516],data->localData[0]->realVars[224] /* T[25] variable */,"T[25]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 650
- type: SIMPLE_ASSIGN
- points[25]._Gamma._G[1,1] = exp((-points[25].BIP[1,1,2]) * points[25].Gamma.tau[1,1])
- */
-void Graph_eqFunction_650(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,650};
- data->localData[0]->realVars[334] /* points[25]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[517])) * (data->localData[0]->realVars[652] /* points[25]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 651
- type: SIMPLE_ASSIGN
- points[25]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[25].BIP[1,2,1], T[25])
- */
-void Graph_eqFunction_651(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,651};
- data->localData[0]->realVars[653] /* points[25]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[518],data->localData[0]->realVars[224] /* T[25] variable */,"T[25]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 652
- type: SIMPLE_ASSIGN
- points[25]._Gamma._G[1,2] = exp((-points[25].BIP[1,2,2]) * points[25].Gamma.tau[1,2])
- */
-void Graph_eqFunction_652(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,652};
- data->localData[0]->realVars[335] /* points[25]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[519])) * (data->localData[0]->realVars[653] /* points[25]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 653
- type: SIMPLE_ASSIGN
- points[25]._Gamma._sum2[2] = 0.6153846153846154 * points[25].Gamma.tau[1,2] * points[25].Gamma.G[1,2] + 0.3846153846153846 * points[25].Gamma.tau[2,2] * points[25].Gamma.G[2,2]
- */
-void Graph_eqFunction_653(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,653};
- data->localData[0]->realVars[525] /* points[25]._Gamma._sum2[2] variable */ = (0.6153846153846154) * ((data->localData[0]->realVars[653] /* points[25]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[335] /* points[25]._Gamma._G[1,2] variable */)) + (0.3846153846153846) * ((data->localData[0]->realVars[655] /* points[25]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[337] /* points[25]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 654
- type: SIMPLE_ASSIGN
- points[25]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[25].BIP[2,1,1], T[25])
- */
-void Graph_eqFunction_654(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,654};
- data->localData[0]->realVars[654] /* points[25]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[520],data->localData[0]->realVars[224] /* T[25] variable */,"T[25]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 655
- type: SIMPLE_ASSIGN
- points[25]._Gamma._G[2,1] = exp((-points[25].BIP[2,1,2]) * points[25].Gamma.tau[2,1])
- */
-void Graph_eqFunction_655(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,655};
- data->localData[0]->realVars[336] /* points[25]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[521])) * (data->localData[0]->realVars[654] /* points[25]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 656
- type: SIMPLE_ASSIGN
- points[25]._Gamma._sum2[1] = 0.6153846153846154 * points[25].Gamma.tau[1,1] * points[25].Gamma.G[1,1] + 0.3846153846153846 * points[25].Gamma.tau[2,1] * points[25].Gamma.G[2,1]
- */
-void Graph_eqFunction_656(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,656};
- data->localData[0]->realVars[524] /* points[25]._Gamma._sum2[1] variable */ = (0.6153846153846154) * ((data->localData[0]->realVars[652] /* points[25]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[334] /* points[25]._Gamma._G[1,1] variable */)) + (0.3846153846153846) * ((data->localData[0]->realVars[654] /* points[25]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[336] /* points[25]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 657
- type: SIMPLE_ASSIGN
- points[25]._Gamma._sum1[2] = 0.6153846153846154 * points[25].Gamma.G[1,2] + 0.3846153846153846 * points[25].Gamma.G[2,2]
- */
-void Graph_eqFunction_657(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,657};
- data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */ = (0.6153846153846154) * (data->localData[0]->realVars[335] /* points[25]._Gamma._G[1,2] variable */) + (0.3846153846153846) * (data->localData[0]->realVars[337] /* points[25]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 658
- type: SIMPLE_ASSIGN
- points[25]._Gamma._sum1[1] = 0.6153846153846154 * points[25].Gamma.G[1,1] + 0.3846153846153846 * points[25].Gamma.G[2,1]
- */
-void Graph_eqFunction_658(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,658};
- data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */ = (0.6153846153846154) * (data->localData[0]->realVars[334] /* points[25]._Gamma._G[1,1] variable */) + (0.3846153846153846) * (data->localData[0]->realVars[336] /* points[25]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 659
- type: SIMPLE_ASSIGN
- points[25]._gamma[1] = exp(DIVISION(points[25].Gamma.sum2[1], points[25].Gamma.sum1[1]) + 0.6153846153846154 * points[25].Gamma.G[1,1] * DIVISION(points[25].Gamma.tau[1,1] - DIVISION(points[25].Gamma.sum2[1], points[25].Gamma.sum1[1]), points[25].Gamma.sum1[1]) + 0.3846153846153846 * points[25].Gamma.G[1,2] * DIVISION(points[25].Gamma.tau[1,2] - DIVISION(points[25].Gamma.sum2[2], points[25].Gamma.sum1[2]), points[25].Gamma.sum1[2]))
- */
-void Graph_eqFunction_659(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,659};
- data->localData[0]->realVars[922] /* points[25]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[524] /* points[25]._Gamma._sum2[1] variable */,data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes) + (0.6153846153846154) * ((data->localData[0]->realVars[334] /* points[25]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[652] /* points[25]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[524] /* points[25]._Gamma._sum2[1] variable */,data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes))) + (0.3846153846153846) * ((data->localData[0]->realVars[335] /* points[25]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[653] /* points[25]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[525] /* points[25]._Gamma._sum2[2] variable */,data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 660
- type: SIMPLE_ASSIGN
- points[25]._gamma[2] = exp(DIVISION(points[25].Gamma.sum2[2], points[25].Gamma.sum1[2]) + 0.6153846153846154 * points[25].Gamma.G[2,1] * DIVISION(points[25].Gamma.tau[2,1] - DIVISION(points[25].Gamma.sum2[1], points[25].Gamma.sum1[1]), points[25].Gamma.sum1[1]) + 0.3846153846153846 * points[25].Gamma.G[2,2] * DIVISION(points[25].Gamma.tau[2,2] - DIVISION(points[25].Gamma.sum2[2], points[25].Gamma.sum1[2]), points[25].Gamma.sum1[2]))
- */
-void Graph_eqFunction_660(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,660};
- data->localData[0]->realVars[923] /* points[25]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[525] /* points[25]._Gamma._sum2[2] variable */,data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes) + (0.6153846153846154) * ((data->localData[0]->realVars[336] /* points[25]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[654] /* points[25]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[524] /* points[25]._Gamma._sum2[1] variable */,data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes))) + (0.3846153846153846) * ((data->localData[0]->realVars[337] /* points[25]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[655] /* points[25]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[525] /* points[25]._Gamma._sum2[2] variable */,data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 661
- type: SIMPLE_ASSIGN
- points[25]._K[2] = 0.0001 * points[25].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[25].comp[2].VP[1], points[25].comp[2].VP[2], points[25].comp[2].VP[3], points[25].comp[2].VP[4], points[25].comp[2].VP[5], points[25].comp[2].VP[6]}, T[25])
- */
-void Graph_eqFunction_661(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,661};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11578], (modelica_real)data->simulationInfo->realParameter[11579], (modelica_real)data->simulationInfo->realParameter[11580], (modelica_real)data->simulationInfo->realParameter[11581], (modelica_real)data->simulationInfo->realParameter[11582], (modelica_real)data->simulationInfo->realParameter[11583]);
- data->localData[0]->realVars[764] /* points[25]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[923] /* points[25]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[224] /* T[25] variable */)));
- TRACE_POP
-}
-/*
- equation index: 662
- type: SIMPLE_ASSIGN
- points[25]._K[1] = 0.0001 * points[25].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[25].comp[1].VP[1], points[25].comp[1].VP[2], points[25].comp[1].VP[3], points[25].comp[1].VP[4], points[25].comp[1].VP[5], points[25].comp[1].VP[6]}, T[25])
- */
-void Graph_eqFunction_662(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,662};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11572], (modelica_real)data->simulationInfo->realParameter[11573], (modelica_real)data->simulationInfo->realParameter[11574], (modelica_real)data->simulationInfo->realParameter[11575], (modelica_real)data->simulationInfo->realParameter[11576], (modelica_real)data->simulationInfo->realParameter[11577]);
- data->localData[0]->realVars[763] /* points[25]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[922] /* points[25]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[224] /* T[25] variable */)));
- TRACE_POP
-}
-
-void residualFunc664(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,664};
- /* iteration variables */
- data->localData[0]->realVars[224] /* T[25] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_647(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_648(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_649(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_650(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_651(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_652(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_653(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_654(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_655(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_656(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_657(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_658(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_659(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_660(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_661(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_662(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.3846153846153846) * (data->localData[0]->realVars[764] /* points[25]._K[2] variable */) + (-0.6153846153846154) * (data->localData[0]->realVars[763] /* points[25]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS664(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS664(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[25] */
- sysData->nominal[i] = data->modelData->realVarsData[224].attribute /* T[25] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[224].attribute /* T[25] */.min;
- sysData->max[i++] = data->modelData->realVarsData[224].attribute /* T[25] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS664(sysData);
-}
-
-void getIterationVarsNLS664(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[224] /* T[25] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 669
- type: SIMPLE_ASSIGN
- points[26]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[26].BIP[2,2,1], T[26])
- */
-void Graph_eqFunction_669(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,669};
- data->localData[0]->realVars[659] /* points[26]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[530],data->localData[0]->realVars[225] /* T[26] variable */,"T[26]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 670
- type: SIMPLE_ASSIGN
- points[26]._Gamma._G[2,2] = exp((-points[26].BIP[2,2,2]) * points[26].Gamma.tau[2,2])
- */
-void Graph_eqFunction_670(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,670};
- data->localData[0]->realVars[341] /* points[26]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[531])) * (data->localData[0]->realVars[659] /* points[26]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 671
- type: SIMPLE_ASSIGN
- points[26]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[26].BIP[1,1,1], T[26])
- */
-void Graph_eqFunction_671(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,671};
- data->localData[0]->realVars[656] /* points[26]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[524],data->localData[0]->realVars[225] /* T[26] variable */,"T[26]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 672
- type: SIMPLE_ASSIGN
- points[26]._Gamma._G[1,1] = exp((-points[26].BIP[1,1,2]) * points[26].Gamma.tau[1,1])
- */
-void Graph_eqFunction_672(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,672};
- data->localData[0]->realVars[338] /* points[26]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[525])) * (data->localData[0]->realVars[656] /* points[26]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 673
- type: SIMPLE_ASSIGN
- points[26]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[26].BIP[1,2,1], T[26])
- */
-void Graph_eqFunction_673(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,673};
- data->localData[0]->realVars[657] /* points[26]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[526],data->localData[0]->realVars[225] /* T[26] variable */,"T[26]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 674
- type: SIMPLE_ASSIGN
- points[26]._Gamma._G[1,2] = exp((-points[26].BIP[1,2,2]) * points[26].Gamma.tau[1,2])
- */
-void Graph_eqFunction_674(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,674};
- data->localData[0]->realVars[339] /* points[26]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[527])) * (data->localData[0]->realVars[657] /* points[26]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 675
- type: SIMPLE_ASSIGN
- points[26]._Gamma._sum2[2] = 0.6410256410256411 * points[26].Gamma.tau[1,2] * points[26].Gamma.G[1,2] + 0.3589743589743589 * points[26].Gamma.tau[2,2] * points[26].Gamma.G[2,2]
- */
-void Graph_eqFunction_675(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,675};
- data->localData[0]->realVars[527] /* points[26]._Gamma._sum2[2] variable */ = (0.6410256410256411) * ((data->localData[0]->realVars[657] /* points[26]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[339] /* points[26]._Gamma._G[1,2] variable */)) + (0.3589743589743589) * ((data->localData[0]->realVars[659] /* points[26]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[341] /* points[26]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 676
- type: SIMPLE_ASSIGN
- points[26]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[26].BIP[2,1,1], T[26])
- */
-void Graph_eqFunction_676(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,676};
- data->localData[0]->realVars[658] /* points[26]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[528],data->localData[0]->realVars[225] /* T[26] variable */,"T[26]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 677
- type: SIMPLE_ASSIGN
- points[26]._Gamma._G[2,1] = exp((-points[26].BIP[2,1,2]) * points[26].Gamma.tau[2,1])
- */
-void Graph_eqFunction_677(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,677};
- data->localData[0]->realVars[340] /* points[26]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[529])) * (data->localData[0]->realVars[658] /* points[26]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 678
- type: SIMPLE_ASSIGN
- points[26]._Gamma._sum2[1] = 0.6410256410256411 * points[26].Gamma.tau[1,1] * points[26].Gamma.G[1,1] + 0.3589743589743589 * points[26].Gamma.tau[2,1] * points[26].Gamma.G[2,1]
- */
-void Graph_eqFunction_678(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,678};
- data->localData[0]->realVars[526] /* points[26]._Gamma._sum2[1] variable */ = (0.6410256410256411) * ((data->localData[0]->realVars[656] /* points[26]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[338] /* points[26]._Gamma._G[1,1] variable */)) + (0.3589743589743589) * ((data->localData[0]->realVars[658] /* points[26]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[340] /* points[26]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 679
- type: SIMPLE_ASSIGN
- points[26]._Gamma._sum1[2] = 0.6410256410256411 * points[26].Gamma.G[1,2] + 0.3589743589743589 * points[26].Gamma.G[2,2]
- */
-void Graph_eqFunction_679(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,679};
- data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */ = (0.6410256410256411) * (data->localData[0]->realVars[339] /* points[26]._Gamma._G[1,2] variable */) + (0.3589743589743589) * (data->localData[0]->realVars[341] /* points[26]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 680
- type: SIMPLE_ASSIGN
- points[26]._Gamma._sum1[1] = 0.6410256410256411 * points[26].Gamma.G[1,1] + 0.3589743589743589 * points[26].Gamma.G[2,1]
- */
-void Graph_eqFunction_680(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,680};
- data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */ = (0.6410256410256411) * (data->localData[0]->realVars[338] /* points[26]._Gamma._G[1,1] variable */) + (0.3589743589743589) * (data->localData[0]->realVars[340] /* points[26]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 681
- type: SIMPLE_ASSIGN
- points[26]._gamma[1] = exp(DIVISION(points[26].Gamma.sum2[1], points[26].Gamma.sum1[1]) + 0.6410256410256411 * points[26].Gamma.G[1,1] * DIVISION(points[26].Gamma.tau[1,1] - DIVISION(points[26].Gamma.sum2[1], points[26].Gamma.sum1[1]), points[26].Gamma.sum1[1]) + 0.3589743589743589 * points[26].Gamma.G[1,2] * DIVISION(points[26].Gamma.tau[1,2] - DIVISION(points[26].Gamma.sum2[2], points[26].Gamma.sum1[2]), points[26].Gamma.sum1[2]))
- */
-void Graph_eqFunction_681(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,681};
- data->localData[0]->realVars[924] /* points[26]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[526] /* points[26]._Gamma._sum2[1] variable */,data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes) + (0.6410256410256411) * ((data->localData[0]->realVars[338] /* points[26]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[656] /* points[26]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[526] /* points[26]._Gamma._sum2[1] variable */,data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes))) + (0.3589743589743589) * ((data->localData[0]->realVars[339] /* points[26]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[657] /* points[26]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[527] /* points[26]._Gamma._sum2[2] variable */,data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 682
- type: SIMPLE_ASSIGN
- points[26]._gamma[2] = exp(DIVISION(points[26].Gamma.sum2[2], points[26].Gamma.sum1[2]) + 0.6410256410256411 * points[26].Gamma.G[2,1] * DIVISION(points[26].Gamma.tau[2,1] - DIVISION(points[26].Gamma.sum2[1], points[26].Gamma.sum1[1]), points[26].Gamma.sum1[1]) + 0.3589743589743589 * points[26].Gamma.G[2,2] * DIVISION(points[26].Gamma.tau[2,2] - DIVISION(points[26].Gamma.sum2[2], points[26].Gamma.sum1[2]), points[26].Gamma.sum1[2]))
- */
-void Graph_eqFunction_682(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,682};
- data->localData[0]->realVars[925] /* points[26]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[527] /* points[26]._Gamma._sum2[2] variable */,data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes) + (0.6410256410256411) * ((data->localData[0]->realVars[340] /* points[26]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[658] /* points[26]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[526] /* points[26]._Gamma._sum2[1] variable */,data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes))) + (0.3589743589743589) * ((data->localData[0]->realVars[341] /* points[26]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[659] /* points[26]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[527] /* points[26]._Gamma._sum2[2] variable */,data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 683
- type: SIMPLE_ASSIGN
- points[26]._K[2] = 0.0001 * points[26].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[26].comp[2].VP[1], points[26].comp[2].VP[2], points[26].comp[2].VP[3], points[26].comp[2].VP[4], points[26].comp[2].VP[5], points[26].comp[2].VP[6]}, T[26])
- */
-void Graph_eqFunction_683(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,683};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11590], (modelica_real)data->simulationInfo->realParameter[11591], (modelica_real)data->simulationInfo->realParameter[11592], (modelica_real)data->simulationInfo->realParameter[11593], (modelica_real)data->simulationInfo->realParameter[11594], (modelica_real)data->simulationInfo->realParameter[11595]);
- data->localData[0]->realVars[766] /* points[26]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[925] /* points[26]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[225] /* T[26] variable */)));
- TRACE_POP
-}
-/*
- equation index: 684
- type: SIMPLE_ASSIGN
- points[26]._K[1] = 0.0001 * points[26].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[26].comp[1].VP[1], points[26].comp[1].VP[2], points[26].comp[1].VP[3], points[26].comp[1].VP[4], points[26].comp[1].VP[5], points[26].comp[1].VP[6]}, T[26])
- */
-void Graph_eqFunction_684(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,684};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11584], (modelica_real)data->simulationInfo->realParameter[11585], (modelica_real)data->simulationInfo->realParameter[11586], (modelica_real)data->simulationInfo->realParameter[11587], (modelica_real)data->simulationInfo->realParameter[11588], (modelica_real)data->simulationInfo->realParameter[11589]);
- data->localData[0]->realVars[765] /* points[26]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[924] /* points[26]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[225] /* T[26] variable */)));
- TRACE_POP
-}
-
-void residualFunc686(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,686};
- /* iteration variables */
- data->localData[0]->realVars[225] /* T[26] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_669(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_670(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_671(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_672(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_673(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_674(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_675(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_676(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_677(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_678(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_679(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_680(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_681(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_682(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_683(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_684(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.3589743589743589) * (data->localData[0]->realVars[766] /* points[26]._K[2] variable */) + (-0.6410256410256411) * (data->localData[0]->realVars[765] /* points[26]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS686(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS686(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[26] */
- sysData->nominal[i] = data->modelData->realVarsData[225].attribute /* T[26] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[225].attribute /* T[26] */.min;
- sysData->max[i++] = data->modelData->realVarsData[225].attribute /* T[26] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS686(sysData);
-}
-
-void getIterationVarsNLS686(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[225] /* T[26] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 691
- type: SIMPLE_ASSIGN
- points[27]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[27].BIP[2,2,1], T[27])
- */
-void Graph_eqFunction_691(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,691};
- data->localData[0]->realVars[663] /* points[27]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[538],data->localData[0]->realVars[226] /* T[27] variable */,"T[27]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 692
- type: SIMPLE_ASSIGN
- points[27]._Gamma._G[2,2] = exp((-points[27].BIP[2,2,2]) * points[27].Gamma.tau[2,2])
- */
-void Graph_eqFunction_692(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,692};
- data->localData[0]->realVars[345] /* points[27]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[539])) * (data->localData[0]->realVars[663] /* points[27]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 693
- type: SIMPLE_ASSIGN
- points[27]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[27].BIP[1,1,1], T[27])
- */
-void Graph_eqFunction_693(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,693};
- data->localData[0]->realVars[660] /* points[27]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[532],data->localData[0]->realVars[226] /* T[27] variable */,"T[27]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 694
- type: SIMPLE_ASSIGN
- points[27]._Gamma._G[1,1] = exp((-points[27].BIP[1,1,2]) * points[27].Gamma.tau[1,1])
- */
-void Graph_eqFunction_694(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,694};
- data->localData[0]->realVars[342] /* points[27]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[533])) * (data->localData[0]->realVars[660] /* points[27]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 695
- type: SIMPLE_ASSIGN
- points[27]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[27].BIP[1,2,1], T[27])
- */
-void Graph_eqFunction_695(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,695};
- data->localData[0]->realVars[661] /* points[27]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[534],data->localData[0]->realVars[226] /* T[27] variable */,"T[27]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 696
- type: SIMPLE_ASSIGN
- points[27]._Gamma._G[1,2] = exp((-points[27].BIP[1,2,2]) * points[27].Gamma.tau[1,2])
- */
-void Graph_eqFunction_696(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,696};
- data->localData[0]->realVars[343] /* points[27]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[535])) * (data->localData[0]->realVars[661] /* points[27]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 697
- type: SIMPLE_ASSIGN
- points[27]._Gamma._sum2[2] = 0.6666666666666666 * points[27].Gamma.tau[1,2] * points[27].Gamma.G[1,2] + 0.3333333333333334 * points[27].Gamma.tau[2,2] * points[27].Gamma.G[2,2]
- */
-void Graph_eqFunction_697(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,697};
- data->localData[0]->realVars[529] /* points[27]._Gamma._sum2[2] variable */ = (0.6666666666666666) * ((data->localData[0]->realVars[661] /* points[27]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[343] /* points[27]._Gamma._G[1,2] variable */)) + (0.3333333333333334) * ((data->localData[0]->realVars[663] /* points[27]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[345] /* points[27]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 698
- type: SIMPLE_ASSIGN
- points[27]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[27].BIP[2,1,1], T[27])
- */
-void Graph_eqFunction_698(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,698};
- data->localData[0]->realVars[662] /* points[27]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[536],data->localData[0]->realVars[226] /* T[27] variable */,"T[27]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 699
- type: SIMPLE_ASSIGN
- points[27]._Gamma._G[2,1] = exp((-points[27].BIP[2,1,2]) * points[27].Gamma.tau[2,1])
- */
-void Graph_eqFunction_699(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,699};
- data->localData[0]->realVars[344] /* points[27]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[537])) * (data->localData[0]->realVars[662] /* points[27]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 700
- type: SIMPLE_ASSIGN
- points[27]._Gamma._sum2[1] = 0.6666666666666666 * points[27].Gamma.tau[1,1] * points[27].Gamma.G[1,1] + 0.3333333333333334 * points[27].Gamma.tau[2,1] * points[27].Gamma.G[2,1]
- */
-void Graph_eqFunction_700(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,700};
- data->localData[0]->realVars[528] /* points[27]._Gamma._sum2[1] variable */ = (0.6666666666666666) * ((data->localData[0]->realVars[660] /* points[27]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[342] /* points[27]._Gamma._G[1,1] variable */)) + (0.3333333333333334) * ((data->localData[0]->realVars[662] /* points[27]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[344] /* points[27]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 701
- type: SIMPLE_ASSIGN
- points[27]._Gamma._sum1[2] = 0.6666666666666666 * points[27].Gamma.G[1,2] + 0.3333333333333334 * points[27].Gamma.G[2,2]
- */
-void Graph_eqFunction_701(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,701};
- data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */ = (0.6666666666666666) * (data->localData[0]->realVars[343] /* points[27]._Gamma._G[1,2] variable */) + (0.3333333333333334) * (data->localData[0]->realVars[345] /* points[27]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 702
- type: SIMPLE_ASSIGN
- points[27]._Gamma._sum1[1] = 0.6666666666666666 * points[27].Gamma.G[1,1] + 0.3333333333333334 * points[27].Gamma.G[2,1]
- */
-void Graph_eqFunction_702(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,702};
- data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */ = (0.6666666666666666) * (data->localData[0]->realVars[342] /* points[27]._Gamma._G[1,1] variable */) + (0.3333333333333334) * (data->localData[0]->realVars[344] /* points[27]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 703
- type: SIMPLE_ASSIGN
- points[27]._gamma[1] = exp(DIVISION(points[27].Gamma.sum2[1], points[27].Gamma.sum1[1]) + 0.6666666666666666 * points[27].Gamma.G[1,1] * DIVISION(points[27].Gamma.tau[1,1] - DIVISION(points[27].Gamma.sum2[1], points[27].Gamma.sum1[1]), points[27].Gamma.sum1[1]) + 0.3333333333333334 * points[27].Gamma.G[1,2] * DIVISION(points[27].Gamma.tau[1,2] - DIVISION(points[27].Gamma.sum2[2], points[27].Gamma.sum1[2]), points[27].Gamma.sum1[2]))
- */
-void Graph_eqFunction_703(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,703};
- data->localData[0]->realVars[926] /* points[27]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[528] /* points[27]._Gamma._sum2[1] variable */,data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes) + (0.6666666666666666) * ((data->localData[0]->realVars[342] /* points[27]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[660] /* points[27]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[528] /* points[27]._Gamma._sum2[1] variable */,data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes))) + (0.3333333333333334) * ((data->localData[0]->realVars[343] /* points[27]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[661] /* points[27]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[529] /* points[27]._Gamma._sum2[2] variable */,data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 704
- type: SIMPLE_ASSIGN
- points[27]._gamma[2] = exp(DIVISION(points[27].Gamma.sum2[2], points[27].Gamma.sum1[2]) + 0.6666666666666666 * points[27].Gamma.G[2,1] * DIVISION(points[27].Gamma.tau[2,1] - DIVISION(points[27].Gamma.sum2[1], points[27].Gamma.sum1[1]), points[27].Gamma.sum1[1]) + 0.3333333333333334 * points[27].Gamma.G[2,2] * DIVISION(points[27].Gamma.tau[2,2] - DIVISION(points[27].Gamma.sum2[2], points[27].Gamma.sum1[2]), points[27].Gamma.sum1[2]))
- */
-void Graph_eqFunction_704(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,704};
- data->localData[0]->realVars[927] /* points[27]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[529] /* points[27]._Gamma._sum2[2] variable */,data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes) + (0.6666666666666666) * ((data->localData[0]->realVars[344] /* points[27]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[662] /* points[27]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[528] /* points[27]._Gamma._sum2[1] variable */,data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes))) + (0.3333333333333334) * ((data->localData[0]->realVars[345] /* points[27]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[663] /* points[27]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[529] /* points[27]._Gamma._sum2[2] variable */,data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 705
- type: SIMPLE_ASSIGN
- points[27]._K[2] = 0.0001 * points[27].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[27].comp[2].VP[1], points[27].comp[2].VP[2], points[27].comp[2].VP[3], points[27].comp[2].VP[4], points[27].comp[2].VP[5], points[27].comp[2].VP[6]}, T[27])
- */
-void Graph_eqFunction_705(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,705};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11602], (modelica_real)data->simulationInfo->realParameter[11603], (modelica_real)data->simulationInfo->realParameter[11604], (modelica_real)data->simulationInfo->realParameter[11605], (modelica_real)data->simulationInfo->realParameter[11606], (modelica_real)data->simulationInfo->realParameter[11607]);
- data->localData[0]->realVars[768] /* points[27]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[927] /* points[27]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[226] /* T[27] variable */)));
- TRACE_POP
-}
-/*
- equation index: 706
- type: SIMPLE_ASSIGN
- points[27]._K[1] = 0.0001 * points[27].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[27].comp[1].VP[1], points[27].comp[1].VP[2], points[27].comp[1].VP[3], points[27].comp[1].VP[4], points[27].comp[1].VP[5], points[27].comp[1].VP[6]}, T[27])
- */
-void Graph_eqFunction_706(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,706};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11596], (modelica_real)data->simulationInfo->realParameter[11597], (modelica_real)data->simulationInfo->realParameter[11598], (modelica_real)data->simulationInfo->realParameter[11599], (modelica_real)data->simulationInfo->realParameter[11600], (modelica_real)data->simulationInfo->realParameter[11601]);
- data->localData[0]->realVars[767] /* points[27]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[926] /* points[27]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[226] /* T[27] variable */)));
- TRACE_POP
-}
-
-void residualFunc708(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,708};
- /* iteration variables */
- data->localData[0]->realVars[226] /* T[27] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_691(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_692(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_693(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_694(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_695(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_696(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_697(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_698(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_699(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_700(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_701(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_702(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_703(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_704(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_705(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_706(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.3333333333333334) * (data->localData[0]->realVars[768] /* points[27]._K[2] variable */) + (-0.6666666666666666) * (data->localData[0]->realVars[767] /* points[27]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS708(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS708(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[27] */
- sysData->nominal[i] = data->modelData->realVarsData[226].attribute /* T[27] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[226].attribute /* T[27] */.min;
- sysData->max[i++] = data->modelData->realVarsData[226].attribute /* T[27] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS708(sysData);
-}
-
-void getIterationVarsNLS708(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[226] /* T[27] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 713
- type: SIMPLE_ASSIGN
- points[28]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[28].BIP[2,2,1], T[28])
- */
-void Graph_eqFunction_713(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,713};
- data->localData[0]->realVars[667] /* points[28]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[546],data->localData[0]->realVars[227] /* T[28] variable */,"T[28]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 714
- type: SIMPLE_ASSIGN
- points[28]._Gamma._G[2,2] = exp((-points[28].BIP[2,2,2]) * points[28].Gamma.tau[2,2])
- */
-void Graph_eqFunction_714(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,714};
- data->localData[0]->realVars[349] /* points[28]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[547])) * (data->localData[0]->realVars[667] /* points[28]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 715
- type: SIMPLE_ASSIGN
- points[28]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[28].BIP[1,1,1], T[28])
- */
-void Graph_eqFunction_715(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,715};
- data->localData[0]->realVars[664] /* points[28]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[540],data->localData[0]->realVars[227] /* T[28] variable */,"T[28]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 716
- type: SIMPLE_ASSIGN
- points[28]._Gamma._G[1,1] = exp((-points[28].BIP[1,1,2]) * points[28].Gamma.tau[1,1])
- */
-void Graph_eqFunction_716(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,716};
- data->localData[0]->realVars[346] /* points[28]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[541])) * (data->localData[0]->realVars[664] /* points[28]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 717
- type: SIMPLE_ASSIGN
- points[28]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[28].BIP[1,2,1], T[28])
- */
-void Graph_eqFunction_717(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,717};
- data->localData[0]->realVars[665] /* points[28]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[542],data->localData[0]->realVars[227] /* T[28] variable */,"T[28]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 718
- type: SIMPLE_ASSIGN
- points[28]._Gamma._G[1,2] = exp((-points[28].BIP[1,2,2]) * points[28].Gamma.tau[1,2])
- */
-void Graph_eqFunction_718(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,718};
- data->localData[0]->realVars[347] /* points[28]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[543])) * (data->localData[0]->realVars[665] /* points[28]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 719
- type: SIMPLE_ASSIGN
- points[28]._Gamma._sum2[2] = 0.6923076923076923 * points[28].Gamma.tau[1,2] * points[28].Gamma.G[1,2] + 0.3076923076923077 * points[28].Gamma.tau[2,2] * points[28].Gamma.G[2,2]
- */
-void Graph_eqFunction_719(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,719};
- data->localData[0]->realVars[531] /* points[28]._Gamma._sum2[2] variable */ = (0.6923076923076923) * ((data->localData[0]->realVars[665] /* points[28]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[347] /* points[28]._Gamma._G[1,2] variable */)) + (0.3076923076923077) * ((data->localData[0]->realVars[667] /* points[28]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[349] /* points[28]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 720
- type: SIMPLE_ASSIGN
- points[28]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[28].BIP[2,1,1], T[28])
- */
-void Graph_eqFunction_720(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,720};
- data->localData[0]->realVars[666] /* points[28]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[544],data->localData[0]->realVars[227] /* T[28] variable */,"T[28]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 721
- type: SIMPLE_ASSIGN
- points[28]._Gamma._G[2,1] = exp((-points[28].BIP[2,1,2]) * points[28].Gamma.tau[2,1])
- */
-void Graph_eqFunction_721(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,721};
- data->localData[0]->realVars[348] /* points[28]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[545])) * (data->localData[0]->realVars[666] /* points[28]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 722
- type: SIMPLE_ASSIGN
- points[28]._Gamma._sum2[1] = 0.6923076923076923 * points[28].Gamma.tau[1,1] * points[28].Gamma.G[1,1] + 0.3076923076923077 * points[28].Gamma.tau[2,1] * points[28].Gamma.G[2,1]
- */
-void Graph_eqFunction_722(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,722};
- data->localData[0]->realVars[530] /* points[28]._Gamma._sum2[1] variable */ = (0.6923076923076923) * ((data->localData[0]->realVars[664] /* points[28]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[346] /* points[28]._Gamma._G[1,1] variable */)) + (0.3076923076923077) * ((data->localData[0]->realVars[666] /* points[28]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[348] /* points[28]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 723
- type: SIMPLE_ASSIGN
- points[28]._Gamma._sum1[2] = 0.6923076923076923 * points[28].Gamma.G[1,2] + 0.3076923076923077 * points[28].Gamma.G[2,2]
- */
-void Graph_eqFunction_723(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,723};
- data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */ = (0.6923076923076923) * (data->localData[0]->realVars[347] /* points[28]._Gamma._G[1,2] variable */) + (0.3076923076923077) * (data->localData[0]->realVars[349] /* points[28]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 724
- type: SIMPLE_ASSIGN
- points[28]._Gamma._sum1[1] = 0.6923076923076923 * points[28].Gamma.G[1,1] + 0.3076923076923077 * points[28].Gamma.G[2,1]
- */
-void Graph_eqFunction_724(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,724};
- data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */ = (0.6923076923076923) * (data->localData[0]->realVars[346] /* points[28]._Gamma._G[1,1] variable */) + (0.3076923076923077) * (data->localData[0]->realVars[348] /* points[28]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 725
- type: SIMPLE_ASSIGN
- points[28]._gamma[1] = exp(DIVISION(points[28].Gamma.sum2[1], points[28].Gamma.sum1[1]) + 0.6923076923076923 * points[28].Gamma.G[1,1] * DIVISION(points[28].Gamma.tau[1,1] - DIVISION(points[28].Gamma.sum2[1], points[28].Gamma.sum1[1]), points[28].Gamma.sum1[1]) + 0.3076923076923077 * points[28].Gamma.G[1,2] * DIVISION(points[28].Gamma.tau[1,2] - DIVISION(points[28].Gamma.sum2[2], points[28].Gamma.sum1[2]), points[28].Gamma.sum1[2]))
- */
-void Graph_eqFunction_725(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,725};
- data->localData[0]->realVars[928] /* points[28]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[530] /* points[28]._Gamma._sum2[1] variable */,data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes) + (0.6923076923076923) * ((data->localData[0]->realVars[346] /* points[28]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[664] /* points[28]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[530] /* points[28]._Gamma._sum2[1] variable */,data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes))) + (0.3076923076923077) * ((data->localData[0]->realVars[347] /* points[28]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[665] /* points[28]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[531] /* points[28]._Gamma._sum2[2] variable */,data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 726
- type: SIMPLE_ASSIGN
- points[28]._gamma[2] = exp(DIVISION(points[28].Gamma.sum2[2], points[28].Gamma.sum1[2]) + 0.6923076923076923 * points[28].Gamma.G[2,1] * DIVISION(points[28].Gamma.tau[2,1] - DIVISION(points[28].Gamma.sum2[1], points[28].Gamma.sum1[1]), points[28].Gamma.sum1[1]) + 0.3076923076923077 * points[28].Gamma.G[2,2] * DIVISION(points[28].Gamma.tau[2,2] - DIVISION(points[28].Gamma.sum2[2], points[28].Gamma.sum1[2]), points[28].Gamma.sum1[2]))
- */
-void Graph_eqFunction_726(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,726};
- data->localData[0]->realVars[929] /* points[28]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[531] /* points[28]._Gamma._sum2[2] variable */,data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes) + (0.6923076923076923) * ((data->localData[0]->realVars[348] /* points[28]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[666] /* points[28]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[530] /* points[28]._Gamma._sum2[1] variable */,data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes))) + (0.3076923076923077) * ((data->localData[0]->realVars[349] /* points[28]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[667] /* points[28]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[531] /* points[28]._Gamma._sum2[2] variable */,data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 727
- type: SIMPLE_ASSIGN
- points[28]._K[2] = 0.0001 * points[28].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[28].comp[2].VP[1], points[28].comp[2].VP[2], points[28].comp[2].VP[3], points[28].comp[2].VP[4], points[28].comp[2].VP[5], points[28].comp[2].VP[6]}, T[28])
- */
-void Graph_eqFunction_727(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,727};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11614], (modelica_real)data->simulationInfo->realParameter[11615], (modelica_real)data->simulationInfo->realParameter[11616], (modelica_real)data->simulationInfo->realParameter[11617], (modelica_real)data->simulationInfo->realParameter[11618], (modelica_real)data->simulationInfo->realParameter[11619]);
- data->localData[0]->realVars[770] /* points[28]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[929] /* points[28]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[227] /* T[28] variable */)));
- TRACE_POP
-}
-/*
- equation index: 728
- type: SIMPLE_ASSIGN
- points[28]._K[1] = 0.0001 * points[28].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[28].comp[1].VP[1], points[28].comp[1].VP[2], points[28].comp[1].VP[3], points[28].comp[1].VP[4], points[28].comp[1].VP[5], points[28].comp[1].VP[6]}, T[28])
- */
-void Graph_eqFunction_728(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,728};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11608], (modelica_real)data->simulationInfo->realParameter[11609], (modelica_real)data->simulationInfo->realParameter[11610], (modelica_real)data->simulationInfo->realParameter[11611], (modelica_real)data->simulationInfo->realParameter[11612], (modelica_real)data->simulationInfo->realParameter[11613]);
- data->localData[0]->realVars[769] /* points[28]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[928] /* points[28]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[227] /* T[28] variable */)));
- TRACE_POP
-}
-
-void residualFunc730(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,730};
- /* iteration variables */
- data->localData[0]->realVars[227] /* T[28] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_713(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_714(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_715(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_716(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_717(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_718(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_719(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_720(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_721(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_722(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_723(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_724(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_725(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_726(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_727(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_728(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.3076923076923077) * (data->localData[0]->realVars[770] /* points[28]._K[2] variable */) + (-0.6923076923076923) * (data->localData[0]->realVars[769] /* points[28]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS730(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS730(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[28] */
- sysData->nominal[i] = data->modelData->realVarsData[227].attribute /* T[28] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[227].attribute /* T[28] */.min;
- sysData->max[i++] = data->modelData->realVarsData[227].attribute /* T[28] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS730(sysData);
-}
-
-void getIterationVarsNLS730(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[227] /* T[28] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 735
- type: SIMPLE_ASSIGN
- points[29]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[29].BIP[2,2,1], T[29])
- */
-void Graph_eqFunction_735(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,735};
- data->localData[0]->realVars[671] /* points[29]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[554],data->localData[0]->realVars[228] /* T[29] variable */,"T[29]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 736
- type: SIMPLE_ASSIGN
- points[29]._Gamma._G[2,2] = exp((-points[29].BIP[2,2,2]) * points[29].Gamma.tau[2,2])
- */
-void Graph_eqFunction_736(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,736};
- data->localData[0]->realVars[353] /* points[29]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[555])) * (data->localData[0]->realVars[671] /* points[29]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 737
- type: SIMPLE_ASSIGN
- points[29]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[29].BIP[1,1,1], T[29])
- */
-void Graph_eqFunction_737(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,737};
- data->localData[0]->realVars[668] /* points[29]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[548],data->localData[0]->realVars[228] /* T[29] variable */,"T[29]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 738
- type: SIMPLE_ASSIGN
- points[29]._Gamma._G[1,1] = exp((-points[29].BIP[1,1,2]) * points[29].Gamma.tau[1,1])
- */
-void Graph_eqFunction_738(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,738};
- data->localData[0]->realVars[350] /* points[29]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[549])) * (data->localData[0]->realVars[668] /* points[29]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 739
- type: SIMPLE_ASSIGN
- points[29]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[29].BIP[1,2,1], T[29])
- */
-void Graph_eqFunction_739(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,739};
- data->localData[0]->realVars[669] /* points[29]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[550],data->localData[0]->realVars[228] /* T[29] variable */,"T[29]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 740
- type: SIMPLE_ASSIGN
- points[29]._Gamma._G[1,2] = exp((-points[29].BIP[1,2,2]) * points[29].Gamma.tau[1,2])
- */
-void Graph_eqFunction_740(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,740};
- data->localData[0]->realVars[351] /* points[29]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[551])) * (data->localData[0]->realVars[669] /* points[29]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 741
- type: SIMPLE_ASSIGN
- points[29]._Gamma._sum2[2] = 0.717948717948718 * points[29].Gamma.tau[1,2] * points[29].Gamma.G[1,2] + 0.2820512820512821 * points[29].Gamma.tau[2,2] * points[29].Gamma.G[2,2]
- */
-void Graph_eqFunction_741(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,741};
- data->localData[0]->realVars[533] /* points[29]._Gamma._sum2[2] variable */ = (0.717948717948718) * ((data->localData[0]->realVars[669] /* points[29]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[351] /* points[29]._Gamma._G[1,2] variable */)) + (0.2820512820512821) * ((data->localData[0]->realVars[671] /* points[29]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[353] /* points[29]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 742
- type: SIMPLE_ASSIGN
- points[29]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[29].BIP[2,1,1], T[29])
- */
-void Graph_eqFunction_742(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,742};
- data->localData[0]->realVars[670] /* points[29]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[552],data->localData[0]->realVars[228] /* T[29] variable */,"T[29]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 743
- type: SIMPLE_ASSIGN
- points[29]._Gamma._G[2,1] = exp((-points[29].BIP[2,1,2]) * points[29].Gamma.tau[2,1])
- */
-void Graph_eqFunction_743(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,743};
- data->localData[0]->realVars[352] /* points[29]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[553])) * (data->localData[0]->realVars[670] /* points[29]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 744
- type: SIMPLE_ASSIGN
- points[29]._Gamma._sum2[1] = 0.717948717948718 * points[29].Gamma.tau[1,1] * points[29].Gamma.G[1,1] + 0.2820512820512821 * points[29].Gamma.tau[2,1] * points[29].Gamma.G[2,1]
- */
-void Graph_eqFunction_744(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,744};
- data->localData[0]->realVars[532] /* points[29]._Gamma._sum2[1] variable */ = (0.717948717948718) * ((data->localData[0]->realVars[668] /* points[29]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[350] /* points[29]._Gamma._G[1,1] variable */)) + (0.2820512820512821) * ((data->localData[0]->realVars[670] /* points[29]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[352] /* points[29]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 745
- type: SIMPLE_ASSIGN
- points[29]._Gamma._sum1[2] = 0.717948717948718 * points[29].Gamma.G[1,2] + 0.2820512820512821 * points[29].Gamma.G[2,2]
- */
-void Graph_eqFunction_745(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,745};
- data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */ = (0.717948717948718) * (data->localData[0]->realVars[351] /* points[29]._Gamma._G[1,2] variable */) + (0.2820512820512821) * (data->localData[0]->realVars[353] /* points[29]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 746
- type: SIMPLE_ASSIGN
- points[29]._Gamma._sum1[1] = 0.717948717948718 * points[29].Gamma.G[1,1] + 0.2820512820512821 * points[29].Gamma.G[2,1]
- */
-void Graph_eqFunction_746(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,746};
- data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */ = (0.717948717948718) * (data->localData[0]->realVars[350] /* points[29]._Gamma._G[1,1] variable */) + (0.2820512820512821) * (data->localData[0]->realVars[352] /* points[29]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 747
- type: SIMPLE_ASSIGN
- points[29]._gamma[1] = exp(DIVISION(points[29].Gamma.sum2[1], points[29].Gamma.sum1[1]) + 0.717948717948718 * points[29].Gamma.G[1,1] * DIVISION(points[29].Gamma.tau[1,1] - DIVISION(points[29].Gamma.sum2[1], points[29].Gamma.sum1[1]), points[29].Gamma.sum1[1]) + 0.2820512820512821 * points[29].Gamma.G[1,2] * DIVISION(points[29].Gamma.tau[1,2] - DIVISION(points[29].Gamma.sum2[2], points[29].Gamma.sum1[2]), points[29].Gamma.sum1[2]))
- */
-void Graph_eqFunction_747(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,747};
- data->localData[0]->realVars[930] /* points[29]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[532] /* points[29]._Gamma._sum2[1] variable */,data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes) + (0.717948717948718) * ((data->localData[0]->realVars[350] /* points[29]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[668] /* points[29]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[532] /* points[29]._Gamma._sum2[1] variable */,data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes))) + (0.2820512820512821) * ((data->localData[0]->realVars[351] /* points[29]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[669] /* points[29]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[533] /* points[29]._Gamma._sum2[2] variable */,data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 748
- type: SIMPLE_ASSIGN
- points[29]._gamma[2] = exp(DIVISION(points[29].Gamma.sum2[2], points[29].Gamma.sum1[2]) + 0.717948717948718 * points[29].Gamma.G[2,1] * DIVISION(points[29].Gamma.tau[2,1] - DIVISION(points[29].Gamma.sum2[1], points[29].Gamma.sum1[1]), points[29].Gamma.sum1[1]) + 0.2820512820512821 * points[29].Gamma.G[2,2] * DIVISION(points[29].Gamma.tau[2,2] - DIVISION(points[29].Gamma.sum2[2], points[29].Gamma.sum1[2]), points[29].Gamma.sum1[2]))
- */
-void Graph_eqFunction_748(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,748};
- data->localData[0]->realVars[931] /* points[29]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[533] /* points[29]._Gamma._sum2[2] variable */,data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes) + (0.717948717948718) * ((data->localData[0]->realVars[352] /* points[29]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[670] /* points[29]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[532] /* points[29]._Gamma._sum2[1] variable */,data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes))) + (0.2820512820512821) * ((data->localData[0]->realVars[353] /* points[29]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[671] /* points[29]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[533] /* points[29]._Gamma._sum2[2] variable */,data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 749
- type: SIMPLE_ASSIGN
- points[29]._K[2] = 0.0001 * points[29].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[29].comp[2].VP[1], points[29].comp[2].VP[2], points[29].comp[2].VP[3], points[29].comp[2].VP[4], points[29].comp[2].VP[5], points[29].comp[2].VP[6]}, T[29])
- */
-void Graph_eqFunction_749(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,749};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11626], (modelica_real)data->simulationInfo->realParameter[11627], (modelica_real)data->simulationInfo->realParameter[11628], (modelica_real)data->simulationInfo->realParameter[11629], (modelica_real)data->simulationInfo->realParameter[11630], (modelica_real)data->simulationInfo->realParameter[11631]);
- data->localData[0]->realVars[772] /* points[29]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[931] /* points[29]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[228] /* T[29] variable */)));
- TRACE_POP
-}
-/*
- equation index: 750
- type: SIMPLE_ASSIGN
- points[29]._K[1] = 0.0001 * points[29].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[29].comp[1].VP[1], points[29].comp[1].VP[2], points[29].comp[1].VP[3], points[29].comp[1].VP[4], points[29].comp[1].VP[5], points[29].comp[1].VP[6]}, T[29])
- */
-void Graph_eqFunction_750(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,750};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11620], (modelica_real)data->simulationInfo->realParameter[11621], (modelica_real)data->simulationInfo->realParameter[11622], (modelica_real)data->simulationInfo->realParameter[11623], (modelica_real)data->simulationInfo->realParameter[11624], (modelica_real)data->simulationInfo->realParameter[11625]);
- data->localData[0]->realVars[771] /* points[29]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[930] /* points[29]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[228] /* T[29] variable */)));
- TRACE_POP
-}
-
-void residualFunc752(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,752};
- /* iteration variables */
- data->localData[0]->realVars[228] /* T[29] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_735(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_736(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_737(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_738(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_739(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_740(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_741(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_742(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_743(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_744(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_745(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_746(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_747(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_748(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_749(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_750(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.2820512820512821) * (data->localData[0]->realVars[772] /* points[29]._K[2] variable */) + (-0.717948717948718) * (data->localData[0]->realVars[771] /* points[29]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS752(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS752(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[29] */
- sysData->nominal[i] = data->modelData->realVarsData[228].attribute /* T[29] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[228].attribute /* T[29] */.min;
- sysData->max[i++] = data->modelData->realVarsData[228].attribute /* T[29] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS752(sysData);
-}
-
-void getIterationVarsNLS752(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[228] /* T[29] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 757
- type: SIMPLE_ASSIGN
- points[30]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[30].BIP[2,2,1], T[30])
- */
-void Graph_eqFunction_757(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,757};
- data->localData[0]->realVars[675] /* points[30]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[562],data->localData[0]->realVars[229] /* T[30] variable */,"T[30]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 758
- type: SIMPLE_ASSIGN
- points[30]._Gamma._G[2,2] = exp((-points[30].BIP[2,2,2]) * points[30].Gamma.tau[2,2])
- */
-void Graph_eqFunction_758(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,758};
- data->localData[0]->realVars[357] /* points[30]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[563])) * (data->localData[0]->realVars[675] /* points[30]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 759
- type: SIMPLE_ASSIGN
- points[30]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[30].BIP[1,1,1], T[30])
- */
-void Graph_eqFunction_759(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,759};
- data->localData[0]->realVars[672] /* points[30]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[556],data->localData[0]->realVars[229] /* T[30] variable */,"T[30]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 760
- type: SIMPLE_ASSIGN
- points[30]._Gamma._G[1,1] = exp((-points[30].BIP[1,1,2]) * points[30].Gamma.tau[1,1])
- */
-void Graph_eqFunction_760(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,760};
- data->localData[0]->realVars[354] /* points[30]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[557])) * (data->localData[0]->realVars[672] /* points[30]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 761
- type: SIMPLE_ASSIGN
- points[30]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[30].BIP[1,2,1], T[30])
- */
-void Graph_eqFunction_761(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,761};
- data->localData[0]->realVars[673] /* points[30]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[558],data->localData[0]->realVars[229] /* T[30] variable */,"T[30]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 762
- type: SIMPLE_ASSIGN
- points[30]._Gamma._G[1,2] = exp((-points[30].BIP[1,2,2]) * points[30].Gamma.tau[1,2])
- */
-void Graph_eqFunction_762(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,762};
- data->localData[0]->realVars[355] /* points[30]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[559])) * (data->localData[0]->realVars[673] /* points[30]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 763
- type: SIMPLE_ASSIGN
- points[30]._Gamma._sum2[2] = 0.7435897435897436 * points[30].Gamma.tau[1,2] * points[30].Gamma.G[1,2] + 0.2564102564102564 * points[30].Gamma.tau[2,2] * points[30].Gamma.G[2,2]
- */
-void Graph_eqFunction_763(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,763};
- data->localData[0]->realVars[535] /* points[30]._Gamma._sum2[2] variable */ = (0.7435897435897436) * ((data->localData[0]->realVars[673] /* points[30]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[355] /* points[30]._Gamma._G[1,2] variable */)) + (0.2564102564102564) * ((data->localData[0]->realVars[675] /* points[30]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[357] /* points[30]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 764
- type: SIMPLE_ASSIGN
- points[30]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[30].BIP[2,1,1], T[30])
- */
-void Graph_eqFunction_764(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,764};
- data->localData[0]->realVars[674] /* points[30]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[560],data->localData[0]->realVars[229] /* T[30] variable */,"T[30]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 765
- type: SIMPLE_ASSIGN
- points[30]._Gamma._G[2,1] = exp((-points[30].BIP[2,1,2]) * points[30].Gamma.tau[2,1])
- */
-void Graph_eqFunction_765(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,765};
- data->localData[0]->realVars[356] /* points[30]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[561])) * (data->localData[0]->realVars[674] /* points[30]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 766
- type: SIMPLE_ASSIGN
- points[30]._Gamma._sum2[1] = 0.7435897435897436 * points[30].Gamma.tau[1,1] * points[30].Gamma.G[1,1] + 0.2564102564102564 * points[30].Gamma.tau[2,1] * points[30].Gamma.G[2,1]
- */
-void Graph_eqFunction_766(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,766};
- data->localData[0]->realVars[534] /* points[30]._Gamma._sum2[1] variable */ = (0.7435897435897436) * ((data->localData[0]->realVars[672] /* points[30]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[354] /* points[30]._Gamma._G[1,1] variable */)) + (0.2564102564102564) * ((data->localData[0]->realVars[674] /* points[30]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[356] /* points[30]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 767
- type: SIMPLE_ASSIGN
- points[30]._Gamma._sum1[2] = 0.7435897435897436 * points[30].Gamma.G[1,2] + 0.2564102564102564 * points[30].Gamma.G[2,2]
- */
-void Graph_eqFunction_767(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,767};
- data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */ = (0.7435897435897436) * (data->localData[0]->realVars[355] /* points[30]._Gamma._G[1,2] variable */) + (0.2564102564102564) * (data->localData[0]->realVars[357] /* points[30]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 768
- type: SIMPLE_ASSIGN
- points[30]._Gamma._sum1[1] = 0.7435897435897436 * points[30].Gamma.G[1,1] + 0.2564102564102564 * points[30].Gamma.G[2,1]
- */
-void Graph_eqFunction_768(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,768};
- data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */ = (0.7435897435897436) * (data->localData[0]->realVars[354] /* points[30]._Gamma._G[1,1] variable */) + (0.2564102564102564) * (data->localData[0]->realVars[356] /* points[30]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 769
- type: SIMPLE_ASSIGN
- points[30]._gamma[1] = exp(DIVISION(points[30].Gamma.sum2[1], points[30].Gamma.sum1[1]) + 0.7435897435897436 * points[30].Gamma.G[1,1] * DIVISION(points[30].Gamma.tau[1,1] - DIVISION(points[30].Gamma.sum2[1], points[30].Gamma.sum1[1]), points[30].Gamma.sum1[1]) + 0.2564102564102564 * points[30].Gamma.G[1,2] * DIVISION(points[30].Gamma.tau[1,2] - DIVISION(points[30].Gamma.sum2[2], points[30].Gamma.sum1[2]), points[30].Gamma.sum1[2]))
- */
-void Graph_eqFunction_769(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,769};
- data->localData[0]->realVars[932] /* points[30]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[534] /* points[30]._Gamma._sum2[1] variable */,data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes) + (0.7435897435897436) * ((data->localData[0]->realVars[354] /* points[30]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[672] /* points[30]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[534] /* points[30]._Gamma._sum2[1] variable */,data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes))) + (0.2564102564102564) * ((data->localData[0]->realVars[355] /* points[30]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[673] /* points[30]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[535] /* points[30]._Gamma._sum2[2] variable */,data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 770
- type: SIMPLE_ASSIGN
- points[30]._gamma[2] = exp(DIVISION(points[30].Gamma.sum2[2], points[30].Gamma.sum1[2]) + 0.7435897435897436 * points[30].Gamma.G[2,1] * DIVISION(points[30].Gamma.tau[2,1] - DIVISION(points[30].Gamma.sum2[1], points[30].Gamma.sum1[1]), points[30].Gamma.sum1[1]) + 0.2564102564102564 * points[30].Gamma.G[2,2] * DIVISION(points[30].Gamma.tau[2,2] - DIVISION(points[30].Gamma.sum2[2], points[30].Gamma.sum1[2]), points[30].Gamma.sum1[2]))
- */
-void Graph_eqFunction_770(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,770};
- data->localData[0]->realVars[933] /* points[30]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[535] /* points[30]._Gamma._sum2[2] variable */,data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes) + (0.7435897435897436) * ((data->localData[0]->realVars[356] /* points[30]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[674] /* points[30]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[534] /* points[30]._Gamma._sum2[1] variable */,data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes))) + (0.2564102564102564) * ((data->localData[0]->realVars[357] /* points[30]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[675] /* points[30]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[535] /* points[30]._Gamma._sum2[2] variable */,data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 771
- type: SIMPLE_ASSIGN
- points[30]._K[2] = 0.0001 * points[30].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[30].comp[2].VP[1], points[30].comp[2].VP[2], points[30].comp[2].VP[3], points[30].comp[2].VP[4], points[30].comp[2].VP[5], points[30].comp[2].VP[6]}, T[30])
- */
-void Graph_eqFunction_771(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,771};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11638], (modelica_real)data->simulationInfo->realParameter[11639], (modelica_real)data->simulationInfo->realParameter[11640], (modelica_real)data->simulationInfo->realParameter[11641], (modelica_real)data->simulationInfo->realParameter[11642], (modelica_real)data->simulationInfo->realParameter[11643]);
- data->localData[0]->realVars[774] /* points[30]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[933] /* points[30]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[229] /* T[30] variable */)));
- TRACE_POP
-}
-/*
- equation index: 772
- type: SIMPLE_ASSIGN
- points[30]._K[1] = 0.0001 * points[30].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[30].comp[1].VP[1], points[30].comp[1].VP[2], points[30].comp[1].VP[3], points[30].comp[1].VP[4], points[30].comp[1].VP[5], points[30].comp[1].VP[6]}, T[30])
- */
-void Graph_eqFunction_772(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,772};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11632], (modelica_real)data->simulationInfo->realParameter[11633], (modelica_real)data->simulationInfo->realParameter[11634], (modelica_real)data->simulationInfo->realParameter[11635], (modelica_real)data->simulationInfo->realParameter[11636], (modelica_real)data->simulationInfo->realParameter[11637]);
- data->localData[0]->realVars[773] /* points[30]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[932] /* points[30]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[229] /* T[30] variable */)));
- TRACE_POP
-}
-
-void residualFunc774(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,774};
- /* iteration variables */
- data->localData[0]->realVars[229] /* T[30] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_757(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_758(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_759(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_760(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_761(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_762(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_763(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_764(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_765(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_766(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_767(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_768(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_769(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_770(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_771(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_772(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.2564102564102564) * (data->localData[0]->realVars[774] /* points[30]._K[2] variable */) + (-0.7435897435897436) * (data->localData[0]->realVars[773] /* points[30]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS774(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS774(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[30] */
- sysData->nominal[i] = data->modelData->realVarsData[229].attribute /* T[30] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[229].attribute /* T[30] */.min;
- sysData->max[i++] = data->modelData->realVarsData[229].attribute /* T[30] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS774(sysData);
-}
-
-void getIterationVarsNLS774(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[229] /* T[30] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 779
- type: SIMPLE_ASSIGN
- points[31]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[31].BIP[2,2,1], T[31])
- */
-void Graph_eqFunction_779(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,779};
- data->localData[0]->realVars[679] /* points[31]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[570],data->localData[0]->realVars[230] /* T[31] variable */,"T[31]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 780
- type: SIMPLE_ASSIGN
- points[31]._Gamma._G[2,2] = exp((-points[31].BIP[2,2,2]) * points[31].Gamma.tau[2,2])
- */
-void Graph_eqFunction_780(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,780};
- data->localData[0]->realVars[361] /* points[31]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[571])) * (data->localData[0]->realVars[679] /* points[31]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 781
- type: SIMPLE_ASSIGN
- points[31]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[31].BIP[1,1,1], T[31])
- */
-void Graph_eqFunction_781(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,781};
- data->localData[0]->realVars[676] /* points[31]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[564],data->localData[0]->realVars[230] /* T[31] variable */,"T[31]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 782
- type: SIMPLE_ASSIGN
- points[31]._Gamma._G[1,1] = exp((-points[31].BIP[1,1,2]) * points[31].Gamma.tau[1,1])
- */
-void Graph_eqFunction_782(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,782};
- data->localData[0]->realVars[358] /* points[31]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[565])) * (data->localData[0]->realVars[676] /* points[31]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 783
- type: SIMPLE_ASSIGN
- points[31]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[31].BIP[1,2,1], T[31])
- */
-void Graph_eqFunction_783(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,783};
- data->localData[0]->realVars[677] /* points[31]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[566],data->localData[0]->realVars[230] /* T[31] variable */,"T[31]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 784
- type: SIMPLE_ASSIGN
- points[31]._Gamma._G[1,2] = exp((-points[31].BIP[1,2,2]) * points[31].Gamma.tau[1,2])
- */
-void Graph_eqFunction_784(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,784};
- data->localData[0]->realVars[359] /* points[31]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[567])) * (data->localData[0]->realVars[677] /* points[31]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 785
- type: SIMPLE_ASSIGN
- points[31]._Gamma._sum2[2] = 0.7692307692307693 * points[31].Gamma.tau[1,2] * points[31].Gamma.G[1,2] + 0.2307692307692307 * points[31].Gamma.tau[2,2] * points[31].Gamma.G[2,2]
- */
-void Graph_eqFunction_785(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,785};
- data->localData[0]->realVars[537] /* points[31]._Gamma._sum2[2] variable */ = (0.7692307692307693) * ((data->localData[0]->realVars[677] /* points[31]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[359] /* points[31]._Gamma._G[1,2] variable */)) + (0.2307692307692307) * ((data->localData[0]->realVars[679] /* points[31]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[361] /* points[31]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 786
- type: SIMPLE_ASSIGN
- points[31]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[31].BIP[2,1,1], T[31])
- */
-void Graph_eqFunction_786(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,786};
- data->localData[0]->realVars[678] /* points[31]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[568],data->localData[0]->realVars[230] /* T[31] variable */,"T[31]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 787
- type: SIMPLE_ASSIGN
- points[31]._Gamma._G[2,1] = exp((-points[31].BIP[2,1,2]) * points[31].Gamma.tau[2,1])
- */
-void Graph_eqFunction_787(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,787};
- data->localData[0]->realVars[360] /* points[31]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[569])) * (data->localData[0]->realVars[678] /* points[31]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 788
- type: SIMPLE_ASSIGN
- points[31]._Gamma._sum2[1] = 0.7692307692307693 * points[31].Gamma.tau[1,1] * points[31].Gamma.G[1,1] + 0.2307692307692307 * points[31].Gamma.tau[2,1] * points[31].Gamma.G[2,1]
- */
-void Graph_eqFunction_788(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,788};
- data->localData[0]->realVars[536] /* points[31]._Gamma._sum2[1] variable */ = (0.7692307692307693) * ((data->localData[0]->realVars[676] /* points[31]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[358] /* points[31]._Gamma._G[1,1] variable */)) + (0.2307692307692307) * ((data->localData[0]->realVars[678] /* points[31]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[360] /* points[31]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 789
- type: SIMPLE_ASSIGN
- points[31]._Gamma._sum1[2] = 0.7692307692307693 * points[31].Gamma.G[1,2] + 0.2307692307692307 * points[31].Gamma.G[2,2]
- */
-void Graph_eqFunction_789(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,789};
- data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */ = (0.7692307692307693) * (data->localData[0]->realVars[359] /* points[31]._Gamma._G[1,2] variable */) + (0.2307692307692307) * (data->localData[0]->realVars[361] /* points[31]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 790
- type: SIMPLE_ASSIGN
- points[31]._Gamma._sum1[1] = 0.7692307692307693 * points[31].Gamma.G[1,1] + 0.2307692307692307 * points[31].Gamma.G[2,1]
- */
-void Graph_eqFunction_790(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,790};
- data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */ = (0.7692307692307693) * (data->localData[0]->realVars[358] /* points[31]._Gamma._G[1,1] variable */) + (0.2307692307692307) * (data->localData[0]->realVars[360] /* points[31]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 791
- type: SIMPLE_ASSIGN
- points[31]._gamma[1] = exp(DIVISION(points[31].Gamma.sum2[1], points[31].Gamma.sum1[1]) + 0.7692307692307693 * points[31].Gamma.G[1,1] * DIVISION(points[31].Gamma.tau[1,1] - DIVISION(points[31].Gamma.sum2[1], points[31].Gamma.sum1[1]), points[31].Gamma.sum1[1]) + 0.2307692307692307 * points[31].Gamma.G[1,2] * DIVISION(points[31].Gamma.tau[1,2] - DIVISION(points[31].Gamma.sum2[2], points[31].Gamma.sum1[2]), points[31].Gamma.sum1[2]))
- */
-void Graph_eqFunction_791(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,791};
- data->localData[0]->realVars[934] /* points[31]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[536] /* points[31]._Gamma._sum2[1] variable */,data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes) + (0.7692307692307693) * ((data->localData[0]->realVars[358] /* points[31]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[676] /* points[31]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[536] /* points[31]._Gamma._sum2[1] variable */,data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes))) + (0.2307692307692307) * ((data->localData[0]->realVars[359] /* points[31]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[677] /* points[31]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[537] /* points[31]._Gamma._sum2[2] variable */,data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 792
- type: SIMPLE_ASSIGN
- points[31]._gamma[2] = exp(DIVISION(points[31].Gamma.sum2[2], points[31].Gamma.sum1[2]) + 0.7692307692307693 * points[31].Gamma.G[2,1] * DIVISION(points[31].Gamma.tau[2,1] - DIVISION(points[31].Gamma.sum2[1], points[31].Gamma.sum1[1]), points[31].Gamma.sum1[1]) + 0.2307692307692307 * points[31].Gamma.G[2,2] * DIVISION(points[31].Gamma.tau[2,2] - DIVISION(points[31].Gamma.sum2[2], points[31].Gamma.sum1[2]), points[31].Gamma.sum1[2]))
- */
-void Graph_eqFunction_792(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,792};
- data->localData[0]->realVars[935] /* points[31]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[537] /* points[31]._Gamma._sum2[2] variable */,data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes) + (0.7692307692307693) * ((data->localData[0]->realVars[360] /* points[31]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[678] /* points[31]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[536] /* points[31]._Gamma._sum2[1] variable */,data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes))) + (0.2307692307692307) * ((data->localData[0]->realVars[361] /* points[31]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[679] /* points[31]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[537] /* points[31]._Gamma._sum2[2] variable */,data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 793
- type: SIMPLE_ASSIGN
- points[31]._K[2] = 0.0001 * points[31].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[31].comp[2].VP[1], points[31].comp[2].VP[2], points[31].comp[2].VP[3], points[31].comp[2].VP[4], points[31].comp[2].VP[5], points[31].comp[2].VP[6]}, T[31])
- */
-void Graph_eqFunction_793(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,793};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11650], (modelica_real)data->simulationInfo->realParameter[11651], (modelica_real)data->simulationInfo->realParameter[11652], (modelica_real)data->simulationInfo->realParameter[11653], (modelica_real)data->simulationInfo->realParameter[11654], (modelica_real)data->simulationInfo->realParameter[11655]);
- data->localData[0]->realVars[776] /* points[31]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[935] /* points[31]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[230] /* T[31] variable */)));
- TRACE_POP
-}
-/*
- equation index: 794
- type: SIMPLE_ASSIGN
- points[31]._K[1] = 0.0001 * points[31].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[31].comp[1].VP[1], points[31].comp[1].VP[2], points[31].comp[1].VP[3], points[31].comp[1].VP[4], points[31].comp[1].VP[5], points[31].comp[1].VP[6]}, T[31])
- */
-void Graph_eqFunction_794(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,794};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11644], (modelica_real)data->simulationInfo->realParameter[11645], (modelica_real)data->simulationInfo->realParameter[11646], (modelica_real)data->simulationInfo->realParameter[11647], (modelica_real)data->simulationInfo->realParameter[11648], (modelica_real)data->simulationInfo->realParameter[11649]);
- data->localData[0]->realVars[775] /* points[31]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[934] /* points[31]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[230] /* T[31] variable */)));
- TRACE_POP
-}
-
-void residualFunc796(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,796};
- /* iteration variables */
- data->localData[0]->realVars[230] /* T[31] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_779(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_780(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_781(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_782(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_783(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_784(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_785(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_786(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_787(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_788(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_789(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_790(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_791(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_792(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_793(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_794(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.2307692307692307) * (data->localData[0]->realVars[776] /* points[31]._K[2] variable */) + (-0.7692307692307693) * (data->localData[0]->realVars[775] /* points[31]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS796(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS796(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[31] */
- sysData->nominal[i] = data->modelData->realVarsData[230].attribute /* T[31] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[230].attribute /* T[31] */.min;
- sysData->max[i++] = data->modelData->realVarsData[230].attribute /* T[31] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS796(sysData);
-}
-
-void getIterationVarsNLS796(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[230] /* T[31] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 801
- type: SIMPLE_ASSIGN
- points[32]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[32].BIP[2,2,1], T[32])
- */
-void Graph_eqFunction_801(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,801};
- data->localData[0]->realVars[683] /* points[32]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[578],data->localData[0]->realVars[231] /* T[32] variable */,"T[32]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 802
- type: SIMPLE_ASSIGN
- points[32]._Gamma._G[2,2] = exp((-points[32].BIP[2,2,2]) * points[32].Gamma.tau[2,2])
- */
-void Graph_eqFunction_802(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,802};
- data->localData[0]->realVars[365] /* points[32]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[579])) * (data->localData[0]->realVars[683] /* points[32]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 803
- type: SIMPLE_ASSIGN
- points[32]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[32].BIP[1,1,1], T[32])
- */
-void Graph_eqFunction_803(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,803};
- data->localData[0]->realVars[680] /* points[32]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[572],data->localData[0]->realVars[231] /* T[32] variable */,"T[32]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 804
- type: SIMPLE_ASSIGN
- points[32]._Gamma._G[1,1] = exp((-points[32].BIP[1,1,2]) * points[32].Gamma.tau[1,1])
- */
-void Graph_eqFunction_804(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,804};
- data->localData[0]->realVars[362] /* points[32]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[573])) * (data->localData[0]->realVars[680] /* points[32]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 805
- type: SIMPLE_ASSIGN
- points[32]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[32].BIP[1,2,1], T[32])
- */
-void Graph_eqFunction_805(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,805};
- data->localData[0]->realVars[681] /* points[32]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[574],data->localData[0]->realVars[231] /* T[32] variable */,"T[32]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 806
- type: SIMPLE_ASSIGN
- points[32]._Gamma._G[1,2] = exp((-points[32].BIP[1,2,2]) * points[32].Gamma.tau[1,2])
- */
-void Graph_eqFunction_806(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,806};
- data->localData[0]->realVars[363] /* points[32]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[575])) * (data->localData[0]->realVars[681] /* points[32]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 807
- type: SIMPLE_ASSIGN
- points[32]._Gamma._sum2[2] = 0.7948717948717948 * points[32].Gamma.tau[1,2] * points[32].Gamma.G[1,2] + 0.2051282051282052 * points[32].Gamma.tau[2,2] * points[32].Gamma.G[2,2]
- */
-void Graph_eqFunction_807(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,807};
- data->localData[0]->realVars[539] /* points[32]._Gamma._sum2[2] variable */ = (0.7948717948717948) * ((data->localData[0]->realVars[681] /* points[32]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[363] /* points[32]._Gamma._G[1,2] variable */)) + (0.2051282051282052) * ((data->localData[0]->realVars[683] /* points[32]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[365] /* points[32]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 808
- type: SIMPLE_ASSIGN
- points[32]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[32].BIP[2,1,1], T[32])
- */
-void Graph_eqFunction_808(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,808};
- data->localData[0]->realVars[682] /* points[32]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[576],data->localData[0]->realVars[231] /* T[32] variable */,"T[32]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 809
- type: SIMPLE_ASSIGN
- points[32]._Gamma._G[2,1] = exp((-points[32].BIP[2,1,2]) * points[32].Gamma.tau[2,1])
- */
-void Graph_eqFunction_809(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,809};
- data->localData[0]->realVars[364] /* points[32]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[577])) * (data->localData[0]->realVars[682] /* points[32]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 810
- type: SIMPLE_ASSIGN
- points[32]._Gamma._sum2[1] = 0.7948717948717948 * points[32].Gamma.tau[1,1] * points[32].Gamma.G[1,1] + 0.2051282051282052 * points[32].Gamma.tau[2,1] * points[32].Gamma.G[2,1]
- */
-void Graph_eqFunction_810(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,810};
- data->localData[0]->realVars[538] /* points[32]._Gamma._sum2[1] variable */ = (0.7948717948717948) * ((data->localData[0]->realVars[680] /* points[32]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[362] /* points[32]._Gamma._G[1,1] variable */)) + (0.2051282051282052) * ((data->localData[0]->realVars[682] /* points[32]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[364] /* points[32]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 811
- type: SIMPLE_ASSIGN
- points[32]._Gamma._sum1[2] = 0.7948717948717948 * points[32].Gamma.G[1,2] + 0.2051282051282052 * points[32].Gamma.G[2,2]
- */
-void Graph_eqFunction_811(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,811};
- data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */ = (0.7948717948717948) * (data->localData[0]->realVars[363] /* points[32]._Gamma._G[1,2] variable */) + (0.2051282051282052) * (data->localData[0]->realVars[365] /* points[32]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 812
- type: SIMPLE_ASSIGN
- points[32]._Gamma._sum1[1] = 0.7948717948717948 * points[32].Gamma.G[1,1] + 0.2051282051282052 * points[32].Gamma.G[2,1]
- */
-void Graph_eqFunction_812(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,812};
- data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */ = (0.7948717948717948) * (data->localData[0]->realVars[362] /* points[32]._Gamma._G[1,1] variable */) + (0.2051282051282052) * (data->localData[0]->realVars[364] /* points[32]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 813
- type: SIMPLE_ASSIGN
- points[32]._gamma[1] = exp(DIVISION(points[32].Gamma.sum2[1], points[32].Gamma.sum1[1]) + 0.7948717948717948 * points[32].Gamma.G[1,1] * DIVISION(points[32].Gamma.tau[1,1] - DIVISION(points[32].Gamma.sum2[1], points[32].Gamma.sum1[1]), points[32].Gamma.sum1[1]) + 0.2051282051282052 * points[32].Gamma.G[1,2] * DIVISION(points[32].Gamma.tau[1,2] - DIVISION(points[32].Gamma.sum2[2], points[32].Gamma.sum1[2]), points[32].Gamma.sum1[2]))
- */
-void Graph_eqFunction_813(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,813};
- data->localData[0]->realVars[936] /* points[32]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[538] /* points[32]._Gamma._sum2[1] variable */,data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes) + (0.7948717948717948) * ((data->localData[0]->realVars[362] /* points[32]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[680] /* points[32]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[538] /* points[32]._Gamma._sum2[1] variable */,data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes))) + (0.2051282051282052) * ((data->localData[0]->realVars[363] /* points[32]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[681] /* points[32]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[539] /* points[32]._Gamma._sum2[2] variable */,data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 814
- type: SIMPLE_ASSIGN
- points[32]._gamma[2] = exp(DIVISION(points[32].Gamma.sum2[2], points[32].Gamma.sum1[2]) + 0.7948717948717948 * points[32].Gamma.G[2,1] * DIVISION(points[32].Gamma.tau[2,1] - DIVISION(points[32].Gamma.sum2[1], points[32].Gamma.sum1[1]), points[32].Gamma.sum1[1]) + 0.2051282051282052 * points[32].Gamma.G[2,2] * DIVISION(points[32].Gamma.tau[2,2] - DIVISION(points[32].Gamma.sum2[2], points[32].Gamma.sum1[2]), points[32].Gamma.sum1[2]))
- */
-void Graph_eqFunction_814(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,814};
- data->localData[0]->realVars[937] /* points[32]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[539] /* points[32]._Gamma._sum2[2] variable */,data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes) + (0.7948717948717948) * ((data->localData[0]->realVars[364] /* points[32]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[682] /* points[32]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[538] /* points[32]._Gamma._sum2[1] variable */,data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes))) + (0.2051282051282052) * ((data->localData[0]->realVars[365] /* points[32]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[683] /* points[32]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[539] /* points[32]._Gamma._sum2[2] variable */,data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 815
- type: SIMPLE_ASSIGN
- points[32]._K[2] = 0.0001 * points[32].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[32].comp[2].VP[1], points[32].comp[2].VP[2], points[32].comp[2].VP[3], points[32].comp[2].VP[4], points[32].comp[2].VP[5], points[32].comp[2].VP[6]}, T[32])
- */
-void Graph_eqFunction_815(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,815};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11662], (modelica_real)data->simulationInfo->realParameter[11663], (modelica_real)data->simulationInfo->realParameter[11664], (modelica_real)data->simulationInfo->realParameter[11665], (modelica_real)data->simulationInfo->realParameter[11666], (modelica_real)data->simulationInfo->realParameter[11667]);
- data->localData[0]->realVars[778] /* points[32]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[937] /* points[32]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[231] /* T[32] variable */)));
- TRACE_POP
-}
-/*
- equation index: 816
- type: SIMPLE_ASSIGN
- points[32]._K[1] = 0.0001 * points[32].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[32].comp[1].VP[1], points[32].comp[1].VP[2], points[32].comp[1].VP[3], points[32].comp[1].VP[4], points[32].comp[1].VP[5], points[32].comp[1].VP[6]}, T[32])
- */
-void Graph_eqFunction_816(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,816};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11656], (modelica_real)data->simulationInfo->realParameter[11657], (modelica_real)data->simulationInfo->realParameter[11658], (modelica_real)data->simulationInfo->realParameter[11659], (modelica_real)data->simulationInfo->realParameter[11660], (modelica_real)data->simulationInfo->realParameter[11661]);
- data->localData[0]->realVars[777] /* points[32]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[936] /* points[32]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[231] /* T[32] variable */)));
- TRACE_POP
-}
-
-void residualFunc818(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,818};
- /* iteration variables */
- data->localData[0]->realVars[231] /* T[32] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_801(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_802(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_803(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_804(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_805(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_806(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_807(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_808(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_809(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_810(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_811(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_812(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_813(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_814(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_815(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_816(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.2051282051282052) * (data->localData[0]->realVars[778] /* points[32]._K[2] variable */) + (-0.7948717948717948) * (data->localData[0]->realVars[777] /* points[32]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS818(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS818(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[32] */
- sysData->nominal[i] = data->modelData->realVarsData[231].attribute /* T[32] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[231].attribute /* T[32] */.min;
- sysData->max[i++] = data->modelData->realVarsData[231].attribute /* T[32] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS818(sysData);
-}
-
-void getIterationVarsNLS818(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[231] /* T[32] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 823
- type: SIMPLE_ASSIGN
- points[33]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[33].BIP[2,2,1], T[33])
- */
-void Graph_eqFunction_823(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,823};
- data->localData[0]->realVars[687] /* points[33]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[586],data->localData[0]->realVars[232] /* T[33] variable */,"T[33]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 824
- type: SIMPLE_ASSIGN
- points[33]._Gamma._G[2,2] = exp((-points[33].BIP[2,2,2]) * points[33].Gamma.tau[2,2])
- */
-void Graph_eqFunction_824(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,824};
- data->localData[0]->realVars[369] /* points[33]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[587])) * (data->localData[0]->realVars[687] /* points[33]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 825
- type: SIMPLE_ASSIGN
- points[33]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[33].BIP[1,1,1], T[33])
- */
-void Graph_eqFunction_825(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,825};
- data->localData[0]->realVars[684] /* points[33]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[580],data->localData[0]->realVars[232] /* T[33] variable */,"T[33]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 826
- type: SIMPLE_ASSIGN
- points[33]._Gamma._G[1,1] = exp((-points[33].BIP[1,1,2]) * points[33].Gamma.tau[1,1])
- */
-void Graph_eqFunction_826(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,826};
- data->localData[0]->realVars[366] /* points[33]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[581])) * (data->localData[0]->realVars[684] /* points[33]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 827
- type: SIMPLE_ASSIGN
- points[33]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[33].BIP[1,2,1], T[33])
- */
-void Graph_eqFunction_827(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,827};
- data->localData[0]->realVars[685] /* points[33]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[582],data->localData[0]->realVars[232] /* T[33] variable */,"T[33]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 828
- type: SIMPLE_ASSIGN
- points[33]._Gamma._G[1,2] = exp((-points[33].BIP[1,2,2]) * points[33].Gamma.tau[1,2])
- */
-void Graph_eqFunction_828(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,828};
- data->localData[0]->realVars[367] /* points[33]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[583])) * (data->localData[0]->realVars[685] /* points[33]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 829
- type: SIMPLE_ASSIGN
- points[33]._Gamma._sum2[2] = 0.8205128205128205 * points[33].Gamma.tau[1,2] * points[33].Gamma.G[1,2] + 0.1794871794871795 * points[33].Gamma.tau[2,2] * points[33].Gamma.G[2,2]
- */
-void Graph_eqFunction_829(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,829};
- data->localData[0]->realVars[541] /* points[33]._Gamma._sum2[2] variable */ = (0.8205128205128205) * ((data->localData[0]->realVars[685] /* points[33]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[367] /* points[33]._Gamma._G[1,2] variable */)) + (0.1794871794871795) * ((data->localData[0]->realVars[687] /* points[33]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[369] /* points[33]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 830
- type: SIMPLE_ASSIGN
- points[33]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[33].BIP[2,1,1], T[33])
- */
-void Graph_eqFunction_830(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,830};
- data->localData[0]->realVars[686] /* points[33]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[584],data->localData[0]->realVars[232] /* T[33] variable */,"T[33]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 831
- type: SIMPLE_ASSIGN
- points[33]._Gamma._G[2,1] = exp((-points[33].BIP[2,1,2]) * points[33].Gamma.tau[2,1])
- */
-void Graph_eqFunction_831(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,831};
- data->localData[0]->realVars[368] /* points[33]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[585])) * (data->localData[0]->realVars[686] /* points[33]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 832
- type: SIMPLE_ASSIGN
- points[33]._Gamma._sum2[1] = 0.8205128205128205 * points[33].Gamma.tau[1,1] * points[33].Gamma.G[1,1] + 0.1794871794871795 * points[33].Gamma.tau[2,1] * points[33].Gamma.G[2,1]
- */
-void Graph_eqFunction_832(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,832};
- data->localData[0]->realVars[540] /* points[33]._Gamma._sum2[1] variable */ = (0.8205128205128205) * ((data->localData[0]->realVars[684] /* points[33]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[366] /* points[33]._Gamma._G[1,1] variable */)) + (0.1794871794871795) * ((data->localData[0]->realVars[686] /* points[33]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[368] /* points[33]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 833
- type: SIMPLE_ASSIGN
- points[33]._Gamma._sum1[2] = 0.8205128205128205 * points[33].Gamma.G[1,2] + 0.1794871794871795 * points[33].Gamma.G[2,2]
- */
-void Graph_eqFunction_833(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,833};
- data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */ = (0.8205128205128205) * (data->localData[0]->realVars[367] /* points[33]._Gamma._G[1,2] variable */) + (0.1794871794871795) * (data->localData[0]->realVars[369] /* points[33]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 834
- type: SIMPLE_ASSIGN
- points[33]._Gamma._sum1[1] = 0.8205128205128205 * points[33].Gamma.G[1,1] + 0.1794871794871795 * points[33].Gamma.G[2,1]
- */
-void Graph_eqFunction_834(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,834};
- data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */ = (0.8205128205128205) * (data->localData[0]->realVars[366] /* points[33]._Gamma._G[1,1] variable */) + (0.1794871794871795) * (data->localData[0]->realVars[368] /* points[33]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 835
- type: SIMPLE_ASSIGN
- points[33]._gamma[1] = exp(DIVISION(points[33].Gamma.sum2[1], points[33].Gamma.sum1[1]) + 0.8205128205128205 * points[33].Gamma.G[1,1] * DIVISION(points[33].Gamma.tau[1,1] - DIVISION(points[33].Gamma.sum2[1], points[33].Gamma.sum1[1]), points[33].Gamma.sum1[1]) + 0.1794871794871795 * points[33].Gamma.G[1,2] * DIVISION(points[33].Gamma.tau[1,2] - DIVISION(points[33].Gamma.sum2[2], points[33].Gamma.sum1[2]), points[33].Gamma.sum1[2]))
- */
-void Graph_eqFunction_835(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,835};
- data->localData[0]->realVars[938] /* points[33]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[540] /* points[33]._Gamma._sum2[1] variable */,data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes) + (0.8205128205128205) * ((data->localData[0]->realVars[366] /* points[33]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[684] /* points[33]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[540] /* points[33]._Gamma._sum2[1] variable */,data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes))) + (0.1794871794871795) * ((data->localData[0]->realVars[367] /* points[33]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[685] /* points[33]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[541] /* points[33]._Gamma._sum2[2] variable */,data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 836
- type: SIMPLE_ASSIGN
- points[33]._gamma[2] = exp(DIVISION(points[33].Gamma.sum2[2], points[33].Gamma.sum1[2]) + 0.8205128205128205 * points[33].Gamma.G[2,1] * DIVISION(points[33].Gamma.tau[2,1] - DIVISION(points[33].Gamma.sum2[1], points[33].Gamma.sum1[1]), points[33].Gamma.sum1[1]) + 0.1794871794871795 * points[33].Gamma.G[2,2] * DIVISION(points[33].Gamma.tau[2,2] - DIVISION(points[33].Gamma.sum2[2], points[33].Gamma.sum1[2]), points[33].Gamma.sum1[2]))
- */
-void Graph_eqFunction_836(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,836};
- data->localData[0]->realVars[939] /* points[33]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[541] /* points[33]._Gamma._sum2[2] variable */,data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes) + (0.8205128205128205) * ((data->localData[0]->realVars[368] /* points[33]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[686] /* points[33]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[540] /* points[33]._Gamma._sum2[1] variable */,data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes))) + (0.1794871794871795) * ((data->localData[0]->realVars[369] /* points[33]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[687] /* points[33]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[541] /* points[33]._Gamma._sum2[2] variable */,data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 837
- type: SIMPLE_ASSIGN
- points[33]._K[2] = 0.0001 * points[33].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[33].comp[2].VP[1], points[33].comp[2].VP[2], points[33].comp[2].VP[3], points[33].comp[2].VP[4], points[33].comp[2].VP[5], points[33].comp[2].VP[6]}, T[33])
- */
-void Graph_eqFunction_837(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,837};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11674], (modelica_real)data->simulationInfo->realParameter[11675], (modelica_real)data->simulationInfo->realParameter[11676], (modelica_real)data->simulationInfo->realParameter[11677], (modelica_real)data->simulationInfo->realParameter[11678], (modelica_real)data->simulationInfo->realParameter[11679]);
- data->localData[0]->realVars[780] /* points[33]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[939] /* points[33]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[232] /* T[33] variable */)));
- TRACE_POP
-}
-/*
- equation index: 838
- type: SIMPLE_ASSIGN
- points[33]._K[1] = 0.0001 * points[33].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[33].comp[1].VP[1], points[33].comp[1].VP[2], points[33].comp[1].VP[3], points[33].comp[1].VP[4], points[33].comp[1].VP[5], points[33].comp[1].VP[6]}, T[33])
- */
-void Graph_eqFunction_838(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,838};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11668], (modelica_real)data->simulationInfo->realParameter[11669], (modelica_real)data->simulationInfo->realParameter[11670], (modelica_real)data->simulationInfo->realParameter[11671], (modelica_real)data->simulationInfo->realParameter[11672], (modelica_real)data->simulationInfo->realParameter[11673]);
- data->localData[0]->realVars[779] /* points[33]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[938] /* points[33]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[232] /* T[33] variable */)));
- TRACE_POP
-}
-
-void residualFunc840(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,840};
- /* iteration variables */
- data->localData[0]->realVars[232] /* T[33] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_823(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_824(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_825(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_826(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_827(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_828(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_829(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_830(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_831(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_832(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_833(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_834(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_835(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_836(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_837(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_838(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.1794871794871795) * (data->localData[0]->realVars[780] /* points[33]._K[2] variable */) + (-0.8205128205128205) * (data->localData[0]->realVars[779] /* points[33]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS840(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS840(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[33] */
- sysData->nominal[i] = data->modelData->realVarsData[232].attribute /* T[33] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[232].attribute /* T[33] */.min;
- sysData->max[i++] = data->modelData->realVarsData[232].attribute /* T[33] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS840(sysData);
-}
-
-void getIterationVarsNLS840(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[232] /* T[33] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 845
- type: SIMPLE_ASSIGN
- points[34]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[34].BIP[2,2,1], T[34])
- */
-void Graph_eqFunction_845(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,845};
- data->localData[0]->realVars[691] /* points[34]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[594],data->localData[0]->realVars[233] /* T[34] variable */,"T[34]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 846
- type: SIMPLE_ASSIGN
- points[34]._Gamma._G[2,2] = exp((-points[34].BIP[2,2,2]) * points[34].Gamma.tau[2,2])
- */
-void Graph_eqFunction_846(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,846};
- data->localData[0]->realVars[373] /* points[34]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[595])) * (data->localData[0]->realVars[691] /* points[34]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 847
- type: SIMPLE_ASSIGN
- points[34]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[34].BIP[1,1,1], T[34])
- */
-void Graph_eqFunction_847(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,847};
- data->localData[0]->realVars[688] /* points[34]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[588],data->localData[0]->realVars[233] /* T[34] variable */,"T[34]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 848
- type: SIMPLE_ASSIGN
- points[34]._Gamma._G[1,1] = exp((-points[34].BIP[1,1,2]) * points[34].Gamma.tau[1,1])
- */
-void Graph_eqFunction_848(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,848};
- data->localData[0]->realVars[370] /* points[34]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[589])) * (data->localData[0]->realVars[688] /* points[34]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 849
- type: SIMPLE_ASSIGN
- points[34]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[34].BIP[1,2,1], T[34])
- */
-void Graph_eqFunction_849(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,849};
- data->localData[0]->realVars[689] /* points[34]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[590],data->localData[0]->realVars[233] /* T[34] variable */,"T[34]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 850
- type: SIMPLE_ASSIGN
- points[34]._Gamma._G[1,2] = exp((-points[34].BIP[1,2,2]) * points[34].Gamma.tau[1,2])
- */
-void Graph_eqFunction_850(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,850};
- data->localData[0]->realVars[371] /* points[34]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[591])) * (data->localData[0]->realVars[689] /* points[34]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 851
- type: SIMPLE_ASSIGN
- points[34]._Gamma._sum2[2] = 0.8461538461538462 * points[34].Gamma.tau[1,2] * points[34].Gamma.G[1,2] + 0.1538461538461539 * points[34].Gamma.tau[2,2] * points[34].Gamma.G[2,2]
- */
-void Graph_eqFunction_851(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,851};
- data->localData[0]->realVars[543] /* points[34]._Gamma._sum2[2] variable */ = (0.8461538461538462) * ((data->localData[0]->realVars[689] /* points[34]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[371] /* points[34]._Gamma._G[1,2] variable */)) + (0.1538461538461539) * ((data->localData[0]->realVars[691] /* points[34]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[373] /* points[34]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 852
- type: SIMPLE_ASSIGN
- points[34]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[34].BIP[2,1,1], T[34])
- */
-void Graph_eqFunction_852(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,852};
- data->localData[0]->realVars[690] /* points[34]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[592],data->localData[0]->realVars[233] /* T[34] variable */,"T[34]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 853
- type: SIMPLE_ASSIGN
- points[34]._Gamma._G[2,1] = exp((-points[34].BIP[2,1,2]) * points[34].Gamma.tau[2,1])
- */
-void Graph_eqFunction_853(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,853};
- data->localData[0]->realVars[372] /* points[34]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[593])) * (data->localData[0]->realVars[690] /* points[34]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 854
- type: SIMPLE_ASSIGN
- points[34]._Gamma._sum2[1] = 0.8461538461538462 * points[34].Gamma.tau[1,1] * points[34].Gamma.G[1,1] + 0.1538461538461539 * points[34].Gamma.tau[2,1] * points[34].Gamma.G[2,1]
- */
-void Graph_eqFunction_854(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,854};
- data->localData[0]->realVars[542] /* points[34]._Gamma._sum2[1] variable */ = (0.8461538461538462) * ((data->localData[0]->realVars[688] /* points[34]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[370] /* points[34]._Gamma._G[1,1] variable */)) + (0.1538461538461539) * ((data->localData[0]->realVars[690] /* points[34]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[372] /* points[34]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 855
- type: SIMPLE_ASSIGN
- points[34]._Gamma._sum1[2] = 0.8461538461538462 * points[34].Gamma.G[1,2] + 0.1538461538461539 * points[34].Gamma.G[2,2]
- */
-void Graph_eqFunction_855(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,855};
- data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */ = (0.8461538461538462) * (data->localData[0]->realVars[371] /* points[34]._Gamma._G[1,2] variable */) + (0.1538461538461539) * (data->localData[0]->realVars[373] /* points[34]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 856
- type: SIMPLE_ASSIGN
- points[34]._Gamma._sum1[1] = 0.8461538461538462 * points[34].Gamma.G[1,1] + 0.1538461538461539 * points[34].Gamma.G[2,1]
- */
-void Graph_eqFunction_856(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,856};
- data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */ = (0.8461538461538462) * (data->localData[0]->realVars[370] /* points[34]._Gamma._G[1,1] variable */) + (0.1538461538461539) * (data->localData[0]->realVars[372] /* points[34]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 857
- type: SIMPLE_ASSIGN
- points[34]._gamma[1] = exp(DIVISION(points[34].Gamma.sum2[1], points[34].Gamma.sum1[1]) + 0.8461538461538462 * points[34].Gamma.G[1,1] * DIVISION(points[34].Gamma.tau[1,1] - DIVISION(points[34].Gamma.sum2[1], points[34].Gamma.sum1[1]), points[34].Gamma.sum1[1]) + 0.1538461538461539 * points[34].Gamma.G[1,2] * DIVISION(points[34].Gamma.tau[1,2] - DIVISION(points[34].Gamma.sum2[2], points[34].Gamma.sum1[2]), points[34].Gamma.sum1[2]))
- */
-void Graph_eqFunction_857(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,857};
- data->localData[0]->realVars[940] /* points[34]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[542] /* points[34]._Gamma._sum2[1] variable */,data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes) + (0.8461538461538462) * ((data->localData[0]->realVars[370] /* points[34]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[688] /* points[34]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[542] /* points[34]._Gamma._sum2[1] variable */,data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes))) + (0.1538461538461539) * ((data->localData[0]->realVars[371] /* points[34]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[689] /* points[34]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[543] /* points[34]._Gamma._sum2[2] variable */,data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 858
- type: SIMPLE_ASSIGN
- points[34]._gamma[2] = exp(DIVISION(points[34].Gamma.sum2[2], points[34].Gamma.sum1[2]) + 0.8461538461538462 * points[34].Gamma.G[2,1] * DIVISION(points[34].Gamma.tau[2,1] - DIVISION(points[34].Gamma.sum2[1], points[34].Gamma.sum1[1]), points[34].Gamma.sum1[1]) + 0.1538461538461539 * points[34].Gamma.G[2,2] * DIVISION(points[34].Gamma.tau[2,2] - DIVISION(points[34].Gamma.sum2[2], points[34].Gamma.sum1[2]), points[34].Gamma.sum1[2]))
- */
-void Graph_eqFunction_858(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,858};
- data->localData[0]->realVars[941] /* points[34]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[543] /* points[34]._Gamma._sum2[2] variable */,data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes) + (0.8461538461538462) * ((data->localData[0]->realVars[372] /* points[34]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[690] /* points[34]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[542] /* points[34]._Gamma._sum2[1] variable */,data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes))) + (0.1538461538461539) * ((data->localData[0]->realVars[373] /* points[34]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[691] /* points[34]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[543] /* points[34]._Gamma._sum2[2] variable */,data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 859
- type: SIMPLE_ASSIGN
- points[34]._K[2] = 0.0001 * points[34].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[34].comp[2].VP[1], points[34].comp[2].VP[2], points[34].comp[2].VP[3], points[34].comp[2].VP[4], points[34].comp[2].VP[5], points[34].comp[2].VP[6]}, T[34])
- */
-void Graph_eqFunction_859(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,859};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11686], (modelica_real)data->simulationInfo->realParameter[11687], (modelica_real)data->simulationInfo->realParameter[11688], (modelica_real)data->simulationInfo->realParameter[11689], (modelica_real)data->simulationInfo->realParameter[11690], (modelica_real)data->simulationInfo->realParameter[11691]);
- data->localData[0]->realVars[782] /* points[34]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[941] /* points[34]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[233] /* T[34] variable */)));
- TRACE_POP
-}
-/*
- equation index: 860
- type: SIMPLE_ASSIGN
- points[34]._K[1] = 0.0001 * points[34].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[34].comp[1].VP[1], points[34].comp[1].VP[2], points[34].comp[1].VP[3], points[34].comp[1].VP[4], points[34].comp[1].VP[5], points[34].comp[1].VP[6]}, T[34])
- */
-void Graph_eqFunction_860(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,860};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11680], (modelica_real)data->simulationInfo->realParameter[11681], (modelica_real)data->simulationInfo->realParameter[11682], (modelica_real)data->simulationInfo->realParameter[11683], (modelica_real)data->simulationInfo->realParameter[11684], (modelica_real)data->simulationInfo->realParameter[11685]);
- data->localData[0]->realVars[781] /* points[34]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[940] /* points[34]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[233] /* T[34] variable */)));
- TRACE_POP
-}
-
-void residualFunc862(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,862};
- /* iteration variables */
- data->localData[0]->realVars[233] /* T[34] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_845(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_846(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_847(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_848(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_849(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_850(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_851(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_852(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_853(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_854(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_855(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_856(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_857(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_858(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_859(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_860(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.1538461538461539) * (data->localData[0]->realVars[782] /* points[34]._K[2] variable */) + (-0.8461538461538462) * (data->localData[0]->realVars[781] /* points[34]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS862(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS862(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[34] */
- sysData->nominal[i] = data->modelData->realVarsData[233].attribute /* T[34] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[233].attribute /* T[34] */.min;
- sysData->max[i++] = data->modelData->realVarsData[233].attribute /* T[34] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS862(sysData);
-}
-
-void getIterationVarsNLS862(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[233] /* T[34] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 867
- type: SIMPLE_ASSIGN
- points[35]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[35].BIP[2,2,1], T[35])
- */
-void Graph_eqFunction_867(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,867};
- data->localData[0]->realVars[695] /* points[35]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[602],data->localData[0]->realVars[234] /* T[35] variable */,"T[35]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 868
- type: SIMPLE_ASSIGN
- points[35]._Gamma._G[2,2] = exp((-points[35].BIP[2,2,2]) * points[35].Gamma.tau[2,2])
- */
-void Graph_eqFunction_868(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,868};
- data->localData[0]->realVars[377] /* points[35]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[603])) * (data->localData[0]->realVars[695] /* points[35]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 869
- type: SIMPLE_ASSIGN
- points[35]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[35].BIP[1,1,1], T[35])
- */
-void Graph_eqFunction_869(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,869};
- data->localData[0]->realVars[692] /* points[35]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[596],data->localData[0]->realVars[234] /* T[35] variable */,"T[35]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 870
- type: SIMPLE_ASSIGN
- points[35]._Gamma._G[1,1] = exp((-points[35].BIP[1,1,2]) * points[35].Gamma.tau[1,1])
- */
-void Graph_eqFunction_870(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,870};
- data->localData[0]->realVars[374] /* points[35]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[597])) * (data->localData[0]->realVars[692] /* points[35]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 871
- type: SIMPLE_ASSIGN
- points[35]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[35].BIP[1,2,1], T[35])
- */
-void Graph_eqFunction_871(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,871};
- data->localData[0]->realVars[693] /* points[35]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[598],data->localData[0]->realVars[234] /* T[35] variable */,"T[35]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 872
- type: SIMPLE_ASSIGN
- points[35]._Gamma._G[1,2] = exp((-points[35].BIP[1,2,2]) * points[35].Gamma.tau[1,2])
- */
-void Graph_eqFunction_872(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,872};
- data->localData[0]->realVars[375] /* points[35]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[599])) * (data->localData[0]->realVars[693] /* points[35]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 873
- type: SIMPLE_ASSIGN
- points[35]._Gamma._sum2[2] = 0.8717948717948718 * points[35].Gamma.tau[1,2] * points[35].Gamma.G[1,2] + 0.1282051282051282 * points[35].Gamma.tau[2,2] * points[35].Gamma.G[2,2]
- */
-void Graph_eqFunction_873(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,873};
- data->localData[0]->realVars[545] /* points[35]._Gamma._sum2[2] variable */ = (0.8717948717948718) * ((data->localData[0]->realVars[693] /* points[35]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[375] /* points[35]._Gamma._G[1,2] variable */)) + (0.1282051282051282) * ((data->localData[0]->realVars[695] /* points[35]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[377] /* points[35]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 874
- type: SIMPLE_ASSIGN
- points[35]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[35].BIP[2,1,1], T[35])
- */
-void Graph_eqFunction_874(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,874};
- data->localData[0]->realVars[694] /* points[35]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[600],data->localData[0]->realVars[234] /* T[35] variable */,"T[35]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 875
- type: SIMPLE_ASSIGN
- points[35]._Gamma._G[2,1] = exp((-points[35].BIP[2,1,2]) * points[35].Gamma.tau[2,1])
- */
-void Graph_eqFunction_875(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,875};
- data->localData[0]->realVars[376] /* points[35]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[601])) * (data->localData[0]->realVars[694] /* points[35]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 876
- type: SIMPLE_ASSIGN
- points[35]._Gamma._sum2[1] = 0.8717948717948718 * points[35].Gamma.tau[1,1] * points[35].Gamma.G[1,1] + 0.1282051282051282 * points[35].Gamma.tau[2,1] * points[35].Gamma.G[2,1]
- */
-void Graph_eqFunction_876(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,876};
- data->localData[0]->realVars[544] /* points[35]._Gamma._sum2[1] variable */ = (0.8717948717948718) * ((data->localData[0]->realVars[692] /* points[35]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[374] /* points[35]._Gamma._G[1,1] variable */)) + (0.1282051282051282) * ((data->localData[0]->realVars[694] /* points[35]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[376] /* points[35]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 877
- type: SIMPLE_ASSIGN
- points[35]._Gamma._sum1[2] = 0.8717948717948718 * points[35].Gamma.G[1,2] + 0.1282051282051282 * points[35].Gamma.G[2,2]
- */
-void Graph_eqFunction_877(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,877};
- data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */ = (0.8717948717948718) * (data->localData[0]->realVars[375] /* points[35]._Gamma._G[1,2] variable */) + (0.1282051282051282) * (data->localData[0]->realVars[377] /* points[35]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 878
- type: SIMPLE_ASSIGN
- points[35]._Gamma._sum1[1] = 0.8717948717948718 * points[35].Gamma.G[1,1] + 0.1282051282051282 * points[35].Gamma.G[2,1]
- */
-void Graph_eqFunction_878(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,878};
- data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */ = (0.8717948717948718) * (data->localData[0]->realVars[374] /* points[35]._Gamma._G[1,1] variable */) + (0.1282051282051282) * (data->localData[0]->realVars[376] /* points[35]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 879
- type: SIMPLE_ASSIGN
- points[35]._gamma[1] = exp(DIVISION(points[35].Gamma.sum2[1], points[35].Gamma.sum1[1]) + 0.8717948717948718 * points[35].Gamma.G[1,1] * DIVISION(points[35].Gamma.tau[1,1] - DIVISION(points[35].Gamma.sum2[1], points[35].Gamma.sum1[1]), points[35].Gamma.sum1[1]) + 0.1282051282051282 * points[35].Gamma.G[1,2] * DIVISION(points[35].Gamma.tau[1,2] - DIVISION(points[35].Gamma.sum2[2], points[35].Gamma.sum1[2]), points[35].Gamma.sum1[2]))
- */
-void Graph_eqFunction_879(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,879};
- data->localData[0]->realVars[942] /* points[35]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[544] /* points[35]._Gamma._sum2[1] variable */,data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes) + (0.8717948717948718) * ((data->localData[0]->realVars[374] /* points[35]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[692] /* points[35]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[544] /* points[35]._Gamma._sum2[1] variable */,data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes))) + (0.1282051282051282) * ((data->localData[0]->realVars[375] /* points[35]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[693] /* points[35]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[545] /* points[35]._Gamma._sum2[2] variable */,data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 880
- type: SIMPLE_ASSIGN
- points[35]._gamma[2] = exp(DIVISION(points[35].Gamma.sum2[2], points[35].Gamma.sum1[2]) + 0.8717948717948718 * points[35].Gamma.G[2,1] * DIVISION(points[35].Gamma.tau[2,1] - DIVISION(points[35].Gamma.sum2[1], points[35].Gamma.sum1[1]), points[35].Gamma.sum1[1]) + 0.1282051282051282 * points[35].Gamma.G[2,2] * DIVISION(points[35].Gamma.tau[2,2] - DIVISION(points[35].Gamma.sum2[2], points[35].Gamma.sum1[2]), points[35].Gamma.sum1[2]))
- */
-void Graph_eqFunction_880(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,880};
- data->localData[0]->realVars[943] /* points[35]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[545] /* points[35]._Gamma._sum2[2] variable */,data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes) + (0.8717948717948718) * ((data->localData[0]->realVars[376] /* points[35]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[694] /* points[35]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[544] /* points[35]._Gamma._sum2[1] variable */,data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes))) + (0.1282051282051282) * ((data->localData[0]->realVars[377] /* points[35]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[695] /* points[35]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[545] /* points[35]._Gamma._sum2[2] variable */,data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 881
- type: SIMPLE_ASSIGN
- points[35]._K[2] = 0.0001 * points[35].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[35].comp[2].VP[1], points[35].comp[2].VP[2], points[35].comp[2].VP[3], points[35].comp[2].VP[4], points[35].comp[2].VP[5], points[35].comp[2].VP[6]}, T[35])
- */
-void Graph_eqFunction_881(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,881};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11698], (modelica_real)data->simulationInfo->realParameter[11699], (modelica_real)data->simulationInfo->realParameter[11700], (modelica_real)data->simulationInfo->realParameter[11701], (modelica_real)data->simulationInfo->realParameter[11702], (modelica_real)data->simulationInfo->realParameter[11703]);
- data->localData[0]->realVars[784] /* points[35]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[943] /* points[35]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[234] /* T[35] variable */)));
- TRACE_POP
-}
-/*
- equation index: 882
- type: SIMPLE_ASSIGN
- points[35]._K[1] = 0.0001 * points[35].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[35].comp[1].VP[1], points[35].comp[1].VP[2], points[35].comp[1].VP[3], points[35].comp[1].VP[4], points[35].comp[1].VP[5], points[35].comp[1].VP[6]}, T[35])
- */
-void Graph_eqFunction_882(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,882};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11692], (modelica_real)data->simulationInfo->realParameter[11693], (modelica_real)data->simulationInfo->realParameter[11694], (modelica_real)data->simulationInfo->realParameter[11695], (modelica_real)data->simulationInfo->realParameter[11696], (modelica_real)data->simulationInfo->realParameter[11697]);
- data->localData[0]->realVars[783] /* points[35]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[942] /* points[35]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[234] /* T[35] variable */)));
- TRACE_POP
-}
-
-void residualFunc884(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,884};
- /* iteration variables */
- data->localData[0]->realVars[234] /* T[35] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_867(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_868(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_869(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_870(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_871(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_872(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_873(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_874(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_875(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_876(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_877(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_878(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_879(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_880(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_881(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_882(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.1282051282051282) * (data->localData[0]->realVars[784] /* points[35]._K[2] variable */) + (-0.8717948717948718) * (data->localData[0]->realVars[783] /* points[35]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS884(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS884(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[35] */
- sysData->nominal[i] = data->modelData->realVarsData[234].attribute /* T[35] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[234].attribute /* T[35] */.min;
- sysData->max[i++] = data->modelData->realVarsData[234].attribute /* T[35] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS884(sysData);
-}
-
-void getIterationVarsNLS884(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[234] /* T[35] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 889
- type: SIMPLE_ASSIGN
- points[36]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[36].BIP[2,2,1], T[36])
- */
-void Graph_eqFunction_889(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,889};
- data->localData[0]->realVars[699] /* points[36]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[610],data->localData[0]->realVars[235] /* T[36] variable */,"T[36]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 890
- type: SIMPLE_ASSIGN
- points[36]._Gamma._G[2,2] = exp((-points[36].BIP[2,2,2]) * points[36].Gamma.tau[2,2])
- */
-void Graph_eqFunction_890(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,890};
- data->localData[0]->realVars[381] /* points[36]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[611])) * (data->localData[0]->realVars[699] /* points[36]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 891
- type: SIMPLE_ASSIGN
- points[36]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[36].BIP[1,1,1], T[36])
- */
-void Graph_eqFunction_891(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,891};
- data->localData[0]->realVars[696] /* points[36]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[604],data->localData[0]->realVars[235] /* T[36] variable */,"T[36]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 892
- type: SIMPLE_ASSIGN
- points[36]._Gamma._G[1,1] = exp((-points[36].BIP[1,1,2]) * points[36].Gamma.tau[1,1])
- */
-void Graph_eqFunction_892(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,892};
- data->localData[0]->realVars[378] /* points[36]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[605])) * (data->localData[0]->realVars[696] /* points[36]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 893
- type: SIMPLE_ASSIGN
- points[36]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[36].BIP[1,2,1], T[36])
- */
-void Graph_eqFunction_893(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,893};
- data->localData[0]->realVars[697] /* points[36]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[606],data->localData[0]->realVars[235] /* T[36] variable */,"T[36]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 894
- type: SIMPLE_ASSIGN
- points[36]._Gamma._G[1,2] = exp((-points[36].BIP[1,2,2]) * points[36].Gamma.tau[1,2])
- */
-void Graph_eqFunction_894(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,894};
- data->localData[0]->realVars[379] /* points[36]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[607])) * (data->localData[0]->realVars[697] /* points[36]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 895
- type: SIMPLE_ASSIGN
- points[36]._Gamma._sum2[2] = 0.8974358974358975 * points[36].Gamma.tau[1,2] * points[36].Gamma.G[1,2] + 0.1025641025641025 * points[36].Gamma.tau[2,2] * points[36].Gamma.G[2,2]
- */
-void Graph_eqFunction_895(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,895};
- data->localData[0]->realVars[547] /* points[36]._Gamma._sum2[2] variable */ = (0.8974358974358975) * ((data->localData[0]->realVars[697] /* points[36]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[379] /* points[36]._Gamma._G[1,2] variable */)) + (0.1025641025641025) * ((data->localData[0]->realVars[699] /* points[36]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[381] /* points[36]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 896
- type: SIMPLE_ASSIGN
- points[36]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[36].BIP[2,1,1], T[36])
- */
-void Graph_eqFunction_896(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,896};
- data->localData[0]->realVars[698] /* points[36]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[608],data->localData[0]->realVars[235] /* T[36] variable */,"T[36]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 897
- type: SIMPLE_ASSIGN
- points[36]._Gamma._G[2,1] = exp((-points[36].BIP[2,1,2]) * points[36].Gamma.tau[2,1])
- */
-void Graph_eqFunction_897(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,897};
- data->localData[0]->realVars[380] /* points[36]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[609])) * (data->localData[0]->realVars[698] /* points[36]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 898
- type: SIMPLE_ASSIGN
- points[36]._Gamma._sum2[1] = 0.8974358974358975 * points[36].Gamma.tau[1,1] * points[36].Gamma.G[1,1] + 0.1025641025641025 * points[36].Gamma.tau[2,1] * points[36].Gamma.G[2,1]
- */
-void Graph_eqFunction_898(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,898};
- data->localData[0]->realVars[546] /* points[36]._Gamma._sum2[1] variable */ = (0.8974358974358975) * ((data->localData[0]->realVars[696] /* points[36]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[378] /* points[36]._Gamma._G[1,1] variable */)) + (0.1025641025641025) * ((data->localData[0]->realVars[698] /* points[36]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[380] /* points[36]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 899
- type: SIMPLE_ASSIGN
- points[36]._Gamma._sum1[2] = 0.8974358974358975 * points[36].Gamma.G[1,2] + 0.1025641025641025 * points[36].Gamma.G[2,2]
- */
-void Graph_eqFunction_899(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,899};
- data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */ = (0.8974358974358975) * (data->localData[0]->realVars[379] /* points[36]._Gamma._G[1,2] variable */) + (0.1025641025641025) * (data->localData[0]->realVars[381] /* points[36]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 900
- type: SIMPLE_ASSIGN
- points[36]._Gamma._sum1[1] = 0.8974358974358975 * points[36].Gamma.G[1,1] + 0.1025641025641025 * points[36].Gamma.G[2,1]
- */
-void Graph_eqFunction_900(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,900};
- data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */ = (0.8974358974358975) * (data->localData[0]->realVars[378] /* points[36]._Gamma._G[1,1] variable */) + (0.1025641025641025) * (data->localData[0]->realVars[380] /* points[36]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 901
- type: SIMPLE_ASSIGN
- points[36]._gamma[1] = exp(DIVISION(points[36].Gamma.sum2[1], points[36].Gamma.sum1[1]) + 0.8974358974358975 * points[36].Gamma.G[1,1] * DIVISION(points[36].Gamma.tau[1,1] - DIVISION(points[36].Gamma.sum2[1], points[36].Gamma.sum1[1]), points[36].Gamma.sum1[1]) + 0.1025641025641025 * points[36].Gamma.G[1,2] * DIVISION(points[36].Gamma.tau[1,2] - DIVISION(points[36].Gamma.sum2[2], points[36].Gamma.sum1[2]), points[36].Gamma.sum1[2]))
- */
-void Graph_eqFunction_901(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,901};
- data->localData[0]->realVars[944] /* points[36]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[546] /* points[36]._Gamma._sum2[1] variable */,data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes) + (0.8974358974358975) * ((data->localData[0]->realVars[378] /* points[36]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[696] /* points[36]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[546] /* points[36]._Gamma._sum2[1] variable */,data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes))) + (0.1025641025641025) * ((data->localData[0]->realVars[379] /* points[36]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[697] /* points[36]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[547] /* points[36]._Gamma._sum2[2] variable */,data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 902
- type: SIMPLE_ASSIGN
- points[36]._gamma[2] = exp(DIVISION(points[36].Gamma.sum2[2], points[36].Gamma.sum1[2]) + 0.8974358974358975 * points[36].Gamma.G[2,1] * DIVISION(points[36].Gamma.tau[2,1] - DIVISION(points[36].Gamma.sum2[1], points[36].Gamma.sum1[1]), points[36].Gamma.sum1[1]) + 0.1025641025641025 * points[36].Gamma.G[2,2] * DIVISION(points[36].Gamma.tau[2,2] - DIVISION(points[36].Gamma.sum2[2], points[36].Gamma.sum1[2]), points[36].Gamma.sum1[2]))
- */
-void Graph_eqFunction_902(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,902};
- data->localData[0]->realVars[945] /* points[36]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[547] /* points[36]._Gamma._sum2[2] variable */,data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes) + (0.8974358974358975) * ((data->localData[0]->realVars[380] /* points[36]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[698] /* points[36]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[546] /* points[36]._Gamma._sum2[1] variable */,data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes))) + (0.1025641025641025) * ((data->localData[0]->realVars[381] /* points[36]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[699] /* points[36]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[547] /* points[36]._Gamma._sum2[2] variable */,data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 903
- type: SIMPLE_ASSIGN
- points[36]._K[2] = 0.0001 * points[36].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[36].comp[2].VP[1], points[36].comp[2].VP[2], points[36].comp[2].VP[3], points[36].comp[2].VP[4], points[36].comp[2].VP[5], points[36].comp[2].VP[6]}, T[36])
- */
-void Graph_eqFunction_903(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,903};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11710], (modelica_real)data->simulationInfo->realParameter[11711], (modelica_real)data->simulationInfo->realParameter[11712], (modelica_real)data->simulationInfo->realParameter[11713], (modelica_real)data->simulationInfo->realParameter[11714], (modelica_real)data->simulationInfo->realParameter[11715]);
- data->localData[0]->realVars[786] /* points[36]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[945] /* points[36]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[235] /* T[36] variable */)));
- TRACE_POP
-}
-/*
- equation index: 904
- type: SIMPLE_ASSIGN
- points[36]._K[1] = 0.0001 * points[36].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[36].comp[1].VP[1], points[36].comp[1].VP[2], points[36].comp[1].VP[3], points[36].comp[1].VP[4], points[36].comp[1].VP[5], points[36].comp[1].VP[6]}, T[36])
- */
-void Graph_eqFunction_904(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,904};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11704], (modelica_real)data->simulationInfo->realParameter[11705], (modelica_real)data->simulationInfo->realParameter[11706], (modelica_real)data->simulationInfo->realParameter[11707], (modelica_real)data->simulationInfo->realParameter[11708], (modelica_real)data->simulationInfo->realParameter[11709]);
- data->localData[0]->realVars[785] /* points[36]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[944] /* points[36]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[235] /* T[36] variable */)));
- TRACE_POP
-}
-
-void residualFunc906(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,906};
- /* iteration variables */
- data->localData[0]->realVars[235] /* T[36] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_889(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_890(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_891(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_892(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_893(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_894(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_895(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_896(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_897(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_898(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_899(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_900(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_901(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_902(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_903(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_904(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.1025641025641025) * (data->localData[0]->realVars[786] /* points[36]._K[2] variable */) + (-0.8974358974358975) * (data->localData[0]->realVars[785] /* points[36]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS906(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS906(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[36] */
- sysData->nominal[i] = data->modelData->realVarsData[235].attribute /* T[36] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[235].attribute /* T[36] */.min;
- sysData->max[i++] = data->modelData->realVarsData[235].attribute /* T[36] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS906(sysData);
-}
-
-void getIterationVarsNLS906(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[235] /* T[36] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 911
- type: SIMPLE_ASSIGN
- points[37]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[37].BIP[2,2,1], T[37])
- */
-void Graph_eqFunction_911(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,911};
- data->localData[0]->realVars[703] /* points[37]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[618],data->localData[0]->realVars[236] /* T[37] variable */,"T[37]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 912
- type: SIMPLE_ASSIGN
- points[37]._Gamma._G[2,2] = exp((-points[37].BIP[2,2,2]) * points[37].Gamma.tau[2,2])
- */
-void Graph_eqFunction_912(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,912};
- data->localData[0]->realVars[385] /* points[37]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[619])) * (data->localData[0]->realVars[703] /* points[37]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 913
- type: SIMPLE_ASSIGN
- points[37]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[37].BIP[1,1,1], T[37])
- */
-void Graph_eqFunction_913(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,913};
- data->localData[0]->realVars[700] /* points[37]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[612],data->localData[0]->realVars[236] /* T[37] variable */,"T[37]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 914
- type: SIMPLE_ASSIGN
- points[37]._Gamma._G[1,1] = exp((-points[37].BIP[1,1,2]) * points[37].Gamma.tau[1,1])
- */
-void Graph_eqFunction_914(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,914};
- data->localData[0]->realVars[382] /* points[37]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[613])) * (data->localData[0]->realVars[700] /* points[37]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 915
- type: SIMPLE_ASSIGN
- points[37]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[37].BIP[1,2,1], T[37])
- */
-void Graph_eqFunction_915(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,915};
- data->localData[0]->realVars[701] /* points[37]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[614],data->localData[0]->realVars[236] /* T[37] variable */,"T[37]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 916
- type: SIMPLE_ASSIGN
- points[37]._Gamma._G[1,2] = exp((-points[37].BIP[1,2,2]) * points[37].Gamma.tau[1,2])
- */
-void Graph_eqFunction_916(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,916};
- data->localData[0]->realVars[383] /* points[37]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[615])) * (data->localData[0]->realVars[701] /* points[37]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 917
- type: SIMPLE_ASSIGN
- points[37]._Gamma._sum2[2] = 0.9230769230769231 * points[37].Gamma.tau[1,2] * points[37].Gamma.G[1,2] + 0.07692307692307687 * points[37].Gamma.tau[2,2] * points[37].Gamma.G[2,2]
- */
-void Graph_eqFunction_917(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,917};
- data->localData[0]->realVars[549] /* points[37]._Gamma._sum2[2] variable */ = (0.9230769230769231) * ((data->localData[0]->realVars[701] /* points[37]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[383] /* points[37]._Gamma._G[1,2] variable */)) + (0.07692307692307687) * ((data->localData[0]->realVars[703] /* points[37]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[385] /* points[37]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 918
- type: SIMPLE_ASSIGN
- points[37]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[37].BIP[2,1,1], T[37])
- */
-void Graph_eqFunction_918(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,918};
- data->localData[0]->realVars[702] /* points[37]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[616],data->localData[0]->realVars[236] /* T[37] variable */,"T[37]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 919
- type: SIMPLE_ASSIGN
- points[37]._Gamma._G[2,1] = exp((-points[37].BIP[2,1,2]) * points[37].Gamma.tau[2,1])
- */
-void Graph_eqFunction_919(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,919};
- data->localData[0]->realVars[384] /* points[37]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[617])) * (data->localData[0]->realVars[702] /* points[37]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 920
- type: SIMPLE_ASSIGN
- points[37]._Gamma._sum2[1] = 0.9230769230769231 * points[37].Gamma.tau[1,1] * points[37].Gamma.G[1,1] + 0.07692307692307687 * points[37].Gamma.tau[2,1] * points[37].Gamma.G[2,1]
- */
-void Graph_eqFunction_920(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,920};
- data->localData[0]->realVars[548] /* points[37]._Gamma._sum2[1] variable */ = (0.9230769230769231) * ((data->localData[0]->realVars[700] /* points[37]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[382] /* points[37]._Gamma._G[1,1] variable */)) + (0.07692307692307687) * ((data->localData[0]->realVars[702] /* points[37]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[384] /* points[37]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 921
- type: SIMPLE_ASSIGN
- points[37]._Gamma._sum1[2] = 0.9230769230769231 * points[37].Gamma.G[1,2] + 0.07692307692307687 * points[37].Gamma.G[2,2]
- */
-void Graph_eqFunction_921(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,921};
- data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */ = (0.9230769230769231) * (data->localData[0]->realVars[383] /* points[37]._Gamma._G[1,2] variable */) + (0.07692307692307687) * (data->localData[0]->realVars[385] /* points[37]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 922
- type: SIMPLE_ASSIGN
- points[37]._Gamma._sum1[1] = 0.9230769230769231 * points[37].Gamma.G[1,1] + 0.07692307692307687 * points[37].Gamma.G[2,1]
- */
-void Graph_eqFunction_922(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,922};
- data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */ = (0.9230769230769231) * (data->localData[0]->realVars[382] /* points[37]._Gamma._G[1,1] variable */) + (0.07692307692307687) * (data->localData[0]->realVars[384] /* points[37]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 923
- type: SIMPLE_ASSIGN
- points[37]._gamma[1] = exp(DIVISION(points[37].Gamma.sum2[1], points[37].Gamma.sum1[1]) + 0.9230769230769231 * points[37].Gamma.G[1,1] * DIVISION(points[37].Gamma.tau[1,1] - DIVISION(points[37].Gamma.sum2[1], points[37].Gamma.sum1[1]), points[37].Gamma.sum1[1]) + 0.07692307692307687 * points[37].Gamma.G[1,2] * DIVISION(points[37].Gamma.tau[1,2] - DIVISION(points[37].Gamma.sum2[2], points[37].Gamma.sum1[2]), points[37].Gamma.sum1[2]))
- */
-void Graph_eqFunction_923(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,923};
- data->localData[0]->realVars[946] /* points[37]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[548] /* points[37]._Gamma._sum2[1] variable */,data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes) + (0.9230769230769231) * ((data->localData[0]->realVars[382] /* points[37]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[700] /* points[37]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[548] /* points[37]._Gamma._sum2[1] variable */,data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes))) + (0.07692307692307687) * ((data->localData[0]->realVars[383] /* points[37]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[701] /* points[37]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[549] /* points[37]._Gamma._sum2[2] variable */,data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 924
- type: SIMPLE_ASSIGN
- points[37]._gamma[2] = exp(DIVISION(points[37].Gamma.sum2[2], points[37].Gamma.sum1[2]) + 0.9230769230769231 * points[37].Gamma.G[2,1] * DIVISION(points[37].Gamma.tau[2,1] - DIVISION(points[37].Gamma.sum2[1], points[37].Gamma.sum1[1]), points[37].Gamma.sum1[1]) + 0.07692307692307687 * points[37].Gamma.G[2,2] * DIVISION(points[37].Gamma.tau[2,2] - DIVISION(points[37].Gamma.sum2[2], points[37].Gamma.sum1[2]), points[37].Gamma.sum1[2]))
- */
-void Graph_eqFunction_924(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,924};
- data->localData[0]->realVars[947] /* points[37]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[549] /* points[37]._Gamma._sum2[2] variable */,data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes) + (0.9230769230769231) * ((data->localData[0]->realVars[384] /* points[37]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[702] /* points[37]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[548] /* points[37]._Gamma._sum2[1] variable */,data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes))) + (0.07692307692307687) * ((data->localData[0]->realVars[385] /* points[37]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[703] /* points[37]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[549] /* points[37]._Gamma._sum2[2] variable */,data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 925
- type: SIMPLE_ASSIGN
- points[37]._K[2] = 0.0001 * points[37].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[37].comp[2].VP[1], points[37].comp[2].VP[2], points[37].comp[2].VP[3], points[37].comp[2].VP[4], points[37].comp[2].VP[5], points[37].comp[2].VP[6]}, T[37])
- */
-void Graph_eqFunction_925(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,925};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11722], (modelica_real)data->simulationInfo->realParameter[11723], (modelica_real)data->simulationInfo->realParameter[11724], (modelica_real)data->simulationInfo->realParameter[11725], (modelica_real)data->simulationInfo->realParameter[11726], (modelica_real)data->simulationInfo->realParameter[11727]);
- data->localData[0]->realVars[788] /* points[37]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[947] /* points[37]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[236] /* T[37] variable */)));
- TRACE_POP
-}
-/*
- equation index: 926
- type: SIMPLE_ASSIGN
- points[37]._K[1] = 0.0001 * points[37].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[37].comp[1].VP[1], points[37].comp[1].VP[2], points[37].comp[1].VP[3], points[37].comp[1].VP[4], points[37].comp[1].VP[5], points[37].comp[1].VP[6]}, T[37])
- */
-void Graph_eqFunction_926(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,926};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11716], (modelica_real)data->simulationInfo->realParameter[11717], (modelica_real)data->simulationInfo->realParameter[11718], (modelica_real)data->simulationInfo->realParameter[11719], (modelica_real)data->simulationInfo->realParameter[11720], (modelica_real)data->simulationInfo->realParameter[11721]);
- data->localData[0]->realVars[787] /* points[37]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[946] /* points[37]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[236] /* T[37] variable */)));
- TRACE_POP
-}
-
-void residualFunc928(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,928};
- /* iteration variables */
- data->localData[0]->realVars[236] /* T[37] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_911(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_912(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_913(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_914(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_915(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_916(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_917(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_918(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_919(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_920(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_921(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_922(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_923(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_924(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_925(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_926(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.07692307692307687) * (data->localData[0]->realVars[788] /* points[37]._K[2] variable */) + (-0.9230769230769231) * (data->localData[0]->realVars[787] /* points[37]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS928(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS928(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[37] */
- sysData->nominal[i] = data->modelData->realVarsData[236].attribute /* T[37] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[236].attribute /* T[37] */.min;
- sysData->max[i++] = data->modelData->realVarsData[236].attribute /* T[37] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS928(sysData);
-}
-
-void getIterationVarsNLS928(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[236] /* T[37] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 933
- type: SIMPLE_ASSIGN
- points[38]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[38].BIP[2,2,1], T[38])
- */
-void Graph_eqFunction_933(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,933};
- data->localData[0]->realVars[707] /* points[38]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[626],data->localData[0]->realVars[237] /* T[38] variable */,"T[38]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 934
- type: SIMPLE_ASSIGN
- points[38]._Gamma._G[2,2] = exp((-points[38].BIP[2,2,2]) * points[38].Gamma.tau[2,2])
- */
-void Graph_eqFunction_934(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,934};
- data->localData[0]->realVars[389] /* points[38]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[627])) * (data->localData[0]->realVars[707] /* points[38]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 935
- type: SIMPLE_ASSIGN
- points[38]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[38].BIP[1,1,1], T[38])
- */
-void Graph_eqFunction_935(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,935};
- data->localData[0]->realVars[704] /* points[38]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[620],data->localData[0]->realVars[237] /* T[38] variable */,"T[38]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 936
- type: SIMPLE_ASSIGN
- points[38]._Gamma._G[1,1] = exp((-points[38].BIP[1,1,2]) * points[38].Gamma.tau[1,1])
- */
-void Graph_eqFunction_936(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,936};
- data->localData[0]->realVars[386] /* points[38]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[621])) * (data->localData[0]->realVars[704] /* points[38]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 937
- type: SIMPLE_ASSIGN
- points[38]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[38].BIP[1,2,1], T[38])
- */
-void Graph_eqFunction_937(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,937};
- data->localData[0]->realVars[705] /* points[38]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[622],data->localData[0]->realVars[237] /* T[38] variable */,"T[38]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 938
- type: SIMPLE_ASSIGN
- points[38]._Gamma._G[1,2] = exp((-points[38].BIP[1,2,2]) * points[38].Gamma.tau[1,2])
- */
-void Graph_eqFunction_938(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,938};
- data->localData[0]->realVars[387] /* points[38]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[623])) * (data->localData[0]->realVars[705] /* points[38]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 939
- type: SIMPLE_ASSIGN
- points[38]._Gamma._sum2[2] = 0.9487179487179487 * points[38].Gamma.tau[1,2] * points[38].Gamma.G[1,2] + 0.05128205128205132 * points[38].Gamma.tau[2,2] * points[38].Gamma.G[2,2]
- */
-void Graph_eqFunction_939(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,939};
- data->localData[0]->realVars[551] /* points[38]._Gamma._sum2[2] variable */ = (0.9487179487179487) * ((data->localData[0]->realVars[705] /* points[38]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[387] /* points[38]._Gamma._G[1,2] variable */)) + (0.05128205128205132) * ((data->localData[0]->realVars[707] /* points[38]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[389] /* points[38]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 940
- type: SIMPLE_ASSIGN
- points[38]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[38].BIP[2,1,1], T[38])
- */
-void Graph_eqFunction_940(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,940};
- data->localData[0]->realVars[706] /* points[38]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[624],data->localData[0]->realVars[237] /* T[38] variable */,"T[38]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 941
- type: SIMPLE_ASSIGN
- points[38]._Gamma._G[2,1] = exp((-points[38].BIP[2,1,2]) * points[38].Gamma.tau[2,1])
- */
-void Graph_eqFunction_941(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,941};
- data->localData[0]->realVars[388] /* points[38]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[625])) * (data->localData[0]->realVars[706] /* points[38]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 942
- type: SIMPLE_ASSIGN
- points[38]._Gamma._sum2[1] = 0.9487179487179487 * points[38].Gamma.tau[1,1] * points[38].Gamma.G[1,1] + 0.05128205128205132 * points[38].Gamma.tau[2,1] * points[38].Gamma.G[2,1]
- */
-void Graph_eqFunction_942(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,942};
- data->localData[0]->realVars[550] /* points[38]._Gamma._sum2[1] variable */ = (0.9487179487179487) * ((data->localData[0]->realVars[704] /* points[38]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[386] /* points[38]._Gamma._G[1,1] variable */)) + (0.05128205128205132) * ((data->localData[0]->realVars[706] /* points[38]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[388] /* points[38]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 943
- type: SIMPLE_ASSIGN
- points[38]._Gamma._sum1[2] = 0.9487179487179487 * points[38].Gamma.G[1,2] + 0.05128205128205132 * points[38].Gamma.G[2,2]
- */
-void Graph_eqFunction_943(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,943};
- data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */ = (0.9487179487179487) * (data->localData[0]->realVars[387] /* points[38]._Gamma._G[1,2] variable */) + (0.05128205128205132) * (data->localData[0]->realVars[389] /* points[38]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 944
- type: SIMPLE_ASSIGN
- points[38]._Gamma._sum1[1] = 0.9487179487179487 * points[38].Gamma.G[1,1] + 0.05128205128205132 * points[38].Gamma.G[2,1]
- */
-void Graph_eqFunction_944(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,944};
- data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */ = (0.9487179487179487) * (data->localData[0]->realVars[386] /* points[38]._Gamma._G[1,1] variable */) + (0.05128205128205132) * (data->localData[0]->realVars[388] /* points[38]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 945
- type: SIMPLE_ASSIGN
- points[38]._gamma[1] = exp(DIVISION(points[38].Gamma.sum2[1], points[38].Gamma.sum1[1]) + 0.9487179487179487 * points[38].Gamma.G[1,1] * DIVISION(points[38].Gamma.tau[1,1] - DIVISION(points[38].Gamma.sum2[1], points[38].Gamma.sum1[1]), points[38].Gamma.sum1[1]) + 0.05128205128205132 * points[38].Gamma.G[1,2] * DIVISION(points[38].Gamma.tau[1,2] - DIVISION(points[38].Gamma.sum2[2], points[38].Gamma.sum1[2]), points[38].Gamma.sum1[2]))
- */
-void Graph_eqFunction_945(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,945};
- data->localData[0]->realVars[948] /* points[38]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[550] /* points[38]._Gamma._sum2[1] variable */,data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes) + (0.9487179487179487) * ((data->localData[0]->realVars[386] /* points[38]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[704] /* points[38]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[550] /* points[38]._Gamma._sum2[1] variable */,data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes))) + (0.05128205128205132) * ((data->localData[0]->realVars[387] /* points[38]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[705] /* points[38]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[551] /* points[38]._Gamma._sum2[2] variable */,data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 946
- type: SIMPLE_ASSIGN
- points[38]._gamma[2] = exp(DIVISION(points[38].Gamma.sum2[2], points[38].Gamma.sum1[2]) + 0.9487179487179487 * points[38].Gamma.G[2,1] * DIVISION(points[38].Gamma.tau[2,1] - DIVISION(points[38].Gamma.sum2[1], points[38].Gamma.sum1[1]), points[38].Gamma.sum1[1]) + 0.05128205128205132 * points[38].Gamma.G[2,2] * DIVISION(points[38].Gamma.tau[2,2] - DIVISION(points[38].Gamma.sum2[2], points[38].Gamma.sum1[2]), points[38].Gamma.sum1[2]))
- */
-void Graph_eqFunction_946(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,946};
- data->localData[0]->realVars[949] /* points[38]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[551] /* points[38]._Gamma._sum2[2] variable */,data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes) + (0.9487179487179487) * ((data->localData[0]->realVars[388] /* points[38]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[706] /* points[38]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[550] /* points[38]._Gamma._sum2[1] variable */,data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes))) + (0.05128205128205132) * ((data->localData[0]->realVars[389] /* points[38]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[707] /* points[38]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[551] /* points[38]._Gamma._sum2[2] variable */,data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 947
- type: SIMPLE_ASSIGN
- points[38]._K[2] = 0.0001 * points[38].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[38].comp[2].VP[1], points[38].comp[2].VP[2], points[38].comp[2].VP[3], points[38].comp[2].VP[4], points[38].comp[2].VP[5], points[38].comp[2].VP[6]}, T[38])
- */
-void Graph_eqFunction_947(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,947};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11734], (modelica_real)data->simulationInfo->realParameter[11735], (modelica_real)data->simulationInfo->realParameter[11736], (modelica_real)data->simulationInfo->realParameter[11737], (modelica_real)data->simulationInfo->realParameter[11738], (modelica_real)data->simulationInfo->realParameter[11739]);
- data->localData[0]->realVars[790] /* points[38]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[949] /* points[38]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[237] /* T[38] variable */)));
- TRACE_POP
-}
-/*
- equation index: 948
- type: SIMPLE_ASSIGN
- points[38]._K[1] = 0.0001 * points[38].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[38].comp[1].VP[1], points[38].comp[1].VP[2], points[38].comp[1].VP[3], points[38].comp[1].VP[4], points[38].comp[1].VP[5], points[38].comp[1].VP[6]}, T[38])
- */
-void Graph_eqFunction_948(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,948};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11728], (modelica_real)data->simulationInfo->realParameter[11729], (modelica_real)data->simulationInfo->realParameter[11730], (modelica_real)data->simulationInfo->realParameter[11731], (modelica_real)data->simulationInfo->realParameter[11732], (modelica_real)data->simulationInfo->realParameter[11733]);
- data->localData[0]->realVars[789] /* points[38]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[948] /* points[38]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[237] /* T[38] variable */)));
- TRACE_POP
-}
-
-void residualFunc950(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,950};
- /* iteration variables */
- data->localData[0]->realVars[237] /* T[38] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_933(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_934(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_935(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_936(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_937(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_938(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_939(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_940(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_941(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_942(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_943(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_944(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_945(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_946(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_947(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_948(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.05128205128205132) * (data->localData[0]->realVars[790] /* points[38]._K[2] variable */) + (-0.9487179487179487) * (data->localData[0]->realVars[789] /* points[38]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS950(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS950(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[38] */
- sysData->nominal[i] = data->modelData->realVarsData[237].attribute /* T[38] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[237].attribute /* T[38] */.min;
- sysData->max[i++] = data->modelData->realVarsData[237].attribute /* T[38] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS950(sysData);
-}
-
-void getIterationVarsNLS950(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[237] /* T[38] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 955
- type: SIMPLE_ASSIGN
- points[39]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[39].BIP[2,2,1], T[39])
- */
-void Graph_eqFunction_955(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,955};
- data->localData[0]->realVars[711] /* points[39]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[634],data->localData[0]->realVars[238] /* T[39] variable */,"T[39]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 956
- type: SIMPLE_ASSIGN
- points[39]._Gamma._G[2,2] = exp((-points[39].BIP[2,2,2]) * points[39].Gamma.tau[2,2])
- */
-void Graph_eqFunction_956(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,956};
- data->localData[0]->realVars[393] /* points[39]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[635])) * (data->localData[0]->realVars[711] /* points[39]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 957
- type: SIMPLE_ASSIGN
- points[39]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[39].BIP[1,1,1], T[39])
- */
-void Graph_eqFunction_957(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,957};
- data->localData[0]->realVars[708] /* points[39]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[628],data->localData[0]->realVars[238] /* T[39] variable */,"T[39]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 958
- type: SIMPLE_ASSIGN
- points[39]._Gamma._G[1,1] = exp((-points[39].BIP[1,1,2]) * points[39].Gamma.tau[1,1])
- */
-void Graph_eqFunction_958(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,958};
- data->localData[0]->realVars[390] /* points[39]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[629])) * (data->localData[0]->realVars[708] /* points[39]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 959
- type: SIMPLE_ASSIGN
- points[39]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[39].BIP[1,2,1], T[39])
- */
-void Graph_eqFunction_959(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,959};
- data->localData[0]->realVars[709] /* points[39]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[630],data->localData[0]->realVars[238] /* T[39] variable */,"T[39]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 960
- type: SIMPLE_ASSIGN
- points[39]._Gamma._G[1,2] = exp((-points[39].BIP[1,2,2]) * points[39].Gamma.tau[1,2])
- */
-void Graph_eqFunction_960(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,960};
- data->localData[0]->realVars[391] /* points[39]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[631])) * (data->localData[0]->realVars[709] /* points[39]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 961
- type: SIMPLE_ASSIGN
- points[39]._Gamma._sum2[2] = 0.9743589743589743 * points[39].Gamma.tau[1,2] * points[39].Gamma.G[1,2] + 0.02564102564102566 * points[39].Gamma.tau[2,2] * points[39].Gamma.G[2,2]
- */
-void Graph_eqFunction_961(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,961};
- data->localData[0]->realVars[553] /* points[39]._Gamma._sum2[2] variable */ = (0.9743589743589743) * ((data->localData[0]->realVars[709] /* points[39]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[391] /* points[39]._Gamma._G[1,2] variable */)) + (0.02564102564102566) * ((data->localData[0]->realVars[711] /* points[39]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[393] /* points[39]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 962
- type: SIMPLE_ASSIGN
- points[39]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[39].BIP[2,1,1], T[39])
- */
-void Graph_eqFunction_962(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,962};
- data->localData[0]->realVars[710] /* points[39]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[632],data->localData[0]->realVars[238] /* T[39] variable */,"T[39]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 963
- type: SIMPLE_ASSIGN
- points[39]._Gamma._G[2,1] = exp((-points[39].BIP[2,1,2]) * points[39].Gamma.tau[2,1])
- */
-void Graph_eqFunction_963(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,963};
- data->localData[0]->realVars[392] /* points[39]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[633])) * (data->localData[0]->realVars[710] /* points[39]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 964
- type: SIMPLE_ASSIGN
- points[39]._Gamma._sum2[1] = 0.9743589743589743 * points[39].Gamma.tau[1,1] * points[39].Gamma.G[1,1] + 0.02564102564102566 * points[39].Gamma.tau[2,1] * points[39].Gamma.G[2,1]
- */
-void Graph_eqFunction_964(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,964};
- data->localData[0]->realVars[552] /* points[39]._Gamma._sum2[1] variable */ = (0.9743589743589743) * ((data->localData[0]->realVars[708] /* points[39]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[390] /* points[39]._Gamma._G[1,1] variable */)) + (0.02564102564102566) * ((data->localData[0]->realVars[710] /* points[39]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[392] /* points[39]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 965
- type: SIMPLE_ASSIGN
- points[39]._Gamma._sum1[2] = 0.9743589743589743 * points[39].Gamma.G[1,2] + 0.02564102564102566 * points[39].Gamma.G[2,2]
- */
-void Graph_eqFunction_965(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,965};
- data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */ = (0.9743589743589743) * (data->localData[0]->realVars[391] /* points[39]._Gamma._G[1,2] variable */) + (0.02564102564102566) * (data->localData[0]->realVars[393] /* points[39]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 966
- type: SIMPLE_ASSIGN
- points[39]._Gamma._sum1[1] = 0.9743589743589743 * points[39].Gamma.G[1,1] + 0.02564102564102566 * points[39].Gamma.G[2,1]
- */
-void Graph_eqFunction_966(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,966};
- data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */ = (0.9743589743589743) * (data->localData[0]->realVars[390] /* points[39]._Gamma._G[1,1] variable */) + (0.02564102564102566) * (data->localData[0]->realVars[392] /* points[39]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 967
- type: SIMPLE_ASSIGN
- points[39]._gamma[1] = exp(DIVISION(points[39].Gamma.sum2[1], points[39].Gamma.sum1[1]) + 0.9743589743589743 * points[39].Gamma.G[1,1] * DIVISION(points[39].Gamma.tau[1,1] - DIVISION(points[39].Gamma.sum2[1], points[39].Gamma.sum1[1]), points[39].Gamma.sum1[1]) + 0.02564102564102566 * points[39].Gamma.G[1,2] * DIVISION(points[39].Gamma.tau[1,2] - DIVISION(points[39].Gamma.sum2[2], points[39].Gamma.sum1[2]), points[39].Gamma.sum1[2]))
- */
-void Graph_eqFunction_967(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,967};
- data->localData[0]->realVars[950] /* points[39]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[552] /* points[39]._Gamma._sum2[1] variable */,data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes) + (0.9743589743589743) * ((data->localData[0]->realVars[390] /* points[39]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[708] /* points[39]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[552] /* points[39]._Gamma._sum2[1] variable */,data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes))) + (0.02564102564102566) * ((data->localData[0]->realVars[391] /* points[39]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[709] /* points[39]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[553] /* points[39]._Gamma._sum2[2] variable */,data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 968
- type: SIMPLE_ASSIGN
- points[39]._gamma[2] = exp(DIVISION(points[39].Gamma.sum2[2], points[39].Gamma.sum1[2]) + 0.9743589743589743 * points[39].Gamma.G[2,1] * DIVISION(points[39].Gamma.tau[2,1] - DIVISION(points[39].Gamma.sum2[1], points[39].Gamma.sum1[1]), points[39].Gamma.sum1[1]) + 0.02564102564102566 * points[39].Gamma.G[2,2] * DIVISION(points[39].Gamma.tau[2,2] - DIVISION(points[39].Gamma.sum2[2], points[39].Gamma.sum1[2]), points[39].Gamma.sum1[2]))
- */
-void Graph_eqFunction_968(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,968};
- data->localData[0]->realVars[951] /* points[39]._gamma[2] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[553] /* points[39]._Gamma._sum2[2] variable */,data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes) + (0.9743589743589743) * ((data->localData[0]->realVars[392] /* points[39]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[710] /* points[39]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[552] /* points[39]._Gamma._sum2[1] variable */,data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes))) + (0.02564102564102566) * ((data->localData[0]->realVars[393] /* points[39]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[711] /* points[39]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[553] /* points[39]._Gamma._sum2[2] variable */,data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes))));
- TRACE_POP
-}
-/*
- equation index: 969
- type: SIMPLE_ASSIGN
- points[39]._K[2] = 0.0001 * points[39].gamma[2] * Simulator.Files.ThermodynamicFunctions.Psat({points[39].comp[2].VP[1], points[39].comp[2].VP[2], points[39].comp[2].VP[3], points[39].comp[2].VP[4], points[39].comp[2].VP[5], points[39].comp[2].VP[6]}, T[39])
- */
-void Graph_eqFunction_969(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,969};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11746], (modelica_real)data->simulationInfo->realParameter[11747], (modelica_real)data->simulationInfo->realParameter[11748], (modelica_real)data->simulationInfo->realParameter[11749], (modelica_real)data->simulationInfo->realParameter[11750], (modelica_real)data->simulationInfo->realParameter[11751]);
- data->localData[0]->realVars[792] /* points[39]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[951] /* points[39]._gamma[2] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[238] /* T[39] variable */)));
- TRACE_POP
-}
-/*
- equation index: 970
- type: SIMPLE_ASSIGN
- points[39]._K[1] = 0.0001 * points[39].gamma[1] * Simulator.Files.ThermodynamicFunctions.Psat({points[39].comp[1].VP[1], points[39].comp[1].VP[2], points[39].comp[1].VP[3], points[39].comp[1].VP[4], points[39].comp[1].VP[5], points[39].comp[1].VP[6]}, T[39])
- */
-void Graph_eqFunction_970(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,970};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11740], (modelica_real)data->simulationInfo->realParameter[11741], (modelica_real)data->simulationInfo->realParameter[11742], (modelica_real)data->simulationInfo->realParameter[11743], (modelica_real)data->simulationInfo->realParameter[11744], (modelica_real)data->simulationInfo->realParameter[11745]);
- data->localData[0]->realVars[791] /* points[39]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[950] /* points[39]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[238] /* T[39] variable */)));
- TRACE_POP
-}
-
-void residualFunc972(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,972};
- /* iteration variables */
- data->localData[0]->realVars[238] /* T[39] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_955(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_956(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_957(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_958(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_959(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_960(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_961(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_962(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_963(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_964(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_965(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_966(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_967(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_968(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_969(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_970(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.02564102564102566) * (data->localData[0]->realVars[792] /* points[39]._K[2] variable */) + (-0.9743589743589743) * (data->localData[0]->realVars[791] /* points[39]._K[1] variable */);
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS972(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS972(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[39] */
- sysData->nominal[i] = data->modelData->realVarsData[238].attribute /* T[39] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[238].attribute /* T[39] */.min;
- sysData->max[i++] = data->modelData->realVarsData[238].attribute /* T[39] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS972(sysData);
-}
-
-void getIterationVarsNLS972(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[238] /* T[39] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 978
- type: SIMPLE_ASSIGN
- points[40]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[40].BIP[1,1,1], T[40])
- */
-void Graph_eqFunction_978(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,978};
- data->localData[0]->realVars[712] /* points[40]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[636],data->localData[0]->realVars[239] /* T[40] variable */,"T[40]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 979
- type: SIMPLE_ASSIGN
- points[40]._Gamma._sum1[1] = exp((-points[40].BIP[1,1,2]) * points[40].Gamma.tau[1,1])
- */
-void Graph_eqFunction_979(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,979};
- data->localData[0]->realVars[474] /* points[40]._Gamma._sum1[1] variable */ = exp(((-data->simulationInfo->realParameter[637])) * (data->localData[0]->realVars[712] /* points[40]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 980
- type: SIMPLE_ASSIGN
- points[40]._Gamma._sum2[1] = points[40].Gamma.tau[1,1] * points[40].Gamma.sum1[1]
- */
-void Graph_eqFunction_980(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,980};
- data->localData[0]->realVars[554] /* points[40]._Gamma._sum2[1] variable */ = (data->localData[0]->realVars[712] /* points[40]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[474] /* points[40]._Gamma._sum1[1] variable */);
- TRACE_POP
-}
-/*
- equation index: 981
- type: SIMPLE_ASSIGN
- points[40]._gamma[1] = exp(DIVISION(points[40].Gamma.sum2[1], points[40].Gamma.sum1[1]) + points[40].Gamma.tau[1,1] - DIVISION(points[40].Gamma.sum2[1], points[40].Gamma.sum1[1]))
- */
-void Graph_eqFunction_981(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,981};
- data->localData[0]->realVars[952] /* points[40]._gamma[1] variable */ = exp(DIVISION_SIM(data->localData[0]->realVars[554] /* points[40]._Gamma._sum2[1] variable */,data->localData[0]->realVars[474] /* points[40]._Gamma._sum1[1] variable */,"points[40].Gamma.sum1[1]",equationIndexes) + data->localData[0]->realVars[712] /* points[40]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[554] /* points[40]._Gamma._sum2[1] variable */,data->localData[0]->realVars[474] /* points[40]._Gamma._sum1[1] variable */,"points[40].Gamma.sum1[1]",equationIndexes));
- TRACE_POP
-}
-
-void residualFunc983(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,983};
- real_array tmp0;
- /* iteration variables */
- data->localData[0]->realVars[239] /* T[40] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_978(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_979(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_980(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_981(data, threadData);
- /* body */
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11752], (modelica_real)data->simulationInfo->realParameter[11753], (modelica_real)data->simulationInfo->realParameter[11754], (modelica_real)data->simulationInfo->realParameter[11755], (modelica_real)data->simulationInfo->realParameter[11756], (modelica_real)data->simulationInfo->realParameter[11757]);
- res[0] = (0.0001) * ((data->localData[0]->realVars[952] /* points[40]._gamma[1] variable */) * (omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[239] /* T[40] variable */))) - data->localData[0]->realVars[1112] /* y[40,1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS983(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS983(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[40] */
- sysData->nominal[i] = data->modelData->realVarsData[239].attribute /* T[40] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[239].attribute /* T[40] */.min;
- sysData->max[i++] = data->modelData->realVarsData[239].attribute /* T[40] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS983(sysData);
-}
-
-void getIterationVarsNLS983(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[239] /* T[40] variable */;
-}
-
-/* inner equations */
-
-/*
- equation index: 996
- type: SIMPLE_ASSIGN
- $cse4 = Simulator.Files.ThermodynamicFunctions.Psat({points[1].comp[2].VP[1], points[1].comp[2].VP[2], points[1].comp[2].VP[3], points[1].comp[2].VP[4], points[1].comp[2].VP[5], points[1].comp[2].VP[6]}, T[1])
- */
-void Graph_eqFunction_996(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,996};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11290], (modelica_real)data->simulationInfo->realParameter[11291], (modelica_real)data->simulationInfo->realParameter[11292], (modelica_real)data->simulationInfo->realParameter[11293], (modelica_real)data->simulationInfo->realParameter[11294], (modelica_real)data->simulationInfo->realParameter[11295]);
- data->localData[0]->realVars[94] /* $cse4 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[200] /* T[1] variable */);
- TRACE_POP
-}
-/*
- equation index: 997
- type: SIMPLE_ASSIGN
- points[1]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[1].BIP[2,2,1], T[1])
- */
-void Graph_eqFunction_997(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,997};
- data->localData[0]->realVars[559] /* points[1]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[330],data->localData[0]->realVars[200] /* T[1] variable */,"T[1]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 998
- type: SIMPLE_ASSIGN
- points[1]._Gamma._sum1[2] = exp((-points[1].BIP[2,2,2]) * points[1].Gamma.tau[2,2])
- */
-void Graph_eqFunction_998(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,998};
- data->localData[0]->realVars[397] /* points[1]._Gamma._sum1[2] variable */ = exp(((-data->simulationInfo->realParameter[331])) * (data->localData[0]->realVars[559] /* points[1]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 999
- type: SIMPLE_ASSIGN
- points[1]._Gamma._sum2[2] = points[1].Gamma.tau[2,2] * points[1].Gamma.sum1[2]
- */
-void Graph_eqFunction_999(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,999};
- data->localData[0]->realVars[477] /* points[1]._Gamma._sum2[2] variable */ = (data->localData[0]->realVars[559] /* points[1]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[397] /* points[1]._Gamma._sum1[2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1000
- type: SIMPLE_ASSIGN
- $cse2 = DIVISION(points[1].Gamma.sum2[2], points[1].Gamma.sum1[2]) + points[1].Gamma.tau[2,2] - DIVISION(points[1].Gamma.sum2[2], points[1].Gamma.sum1[2])
- */
-void Graph_eqFunction_1000(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1000};
- data->localData[0]->realVars[72] /* $cse2 variable */ = DIVISION_SIM(data->localData[0]->realVars[477] /* points[1]._Gamma._sum2[2] variable */,data->localData[0]->realVars[397] /* points[1]._Gamma._sum1[2] variable */,"points[1].Gamma.sum1[2]",equationIndexes) + data->localData[0]->realVars[559] /* points[1]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[477] /* points[1]._Gamma._sum2[2] variable */,data->localData[0]->realVars[397] /* points[1]._Gamma._sum1[2] variable */,"points[1].Gamma.sum1[2]",equationIndexes);
- TRACE_POP
-}
-/*
- equation index: 1001
- type: SIMPLE_ASSIGN
- points[1]._gamma[2] = exp($cse2)
- */
-void Graph_eqFunction_1001(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1001};
- data->localData[0]->realVars[875] /* points[1]._gamma[2] variable */ = exp(data->localData[0]->realVars[72] /* $cse2 variable */);
- TRACE_POP
-}
-
-void residualFunc1003(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1003};
- /* iteration variables */
- data->localData[0]->realVars[200] /* T[1] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_996(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_997(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_998(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_999(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1000(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1001(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.0001) * ((data->localData[0]->realVars[875] /* points[1]._gamma[2] variable */) * (data->localData[0]->realVars[94] /* $cse4 variable */));
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1003(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1003(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[1] */
- sysData->nominal[i] = data->modelData->realVarsData[200].attribute /* T[1] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[200].attribute /* T[1] */.min;
- sysData->max[i++] = data->modelData->realVarsData[200].attribute /* T[1] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1003(sysData);
-}
-
-void getIterationVarsNLS1003(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[200] /* T[1] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1017
- type: SIMPLE_ASSIGN
- $cse8 = Simulator.Files.ThermodynamicFunctions.Psat({points[2].comp[2].VP[1], points[2].comp[2].VP[2], points[2].comp[2].VP[3], points[2].comp[2].VP[4], points[2].comp[2].VP[5], points[2].comp[2].VP[6]}, T[2])
- */
-void Graph_eqFunction_1017(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1017};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11302], (modelica_real)data->simulationInfo->realParameter[11303], (modelica_real)data->simulationInfo->realParameter[11304], (modelica_real)data->simulationInfo->realParameter[11305], (modelica_real)data->simulationInfo->realParameter[11306], (modelica_real)data->simulationInfo->realParameter[11307]);
- data->localData[0]->realVars[138] /* $cse8 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[201] /* T[2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1018
- type: SIMPLE_ASSIGN
- $cse7 = Simulator.Files.ThermodynamicFunctions.Psat({points[2].comp[1].VP[1], points[2].comp[1].VP[2], points[2].comp[1].VP[3], points[2].comp[1].VP[4], points[2].comp[1].VP[5], points[2].comp[1].VP[6]}, T[2])
- */
-void Graph_eqFunction_1018(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1018};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11296], (modelica_real)data->simulationInfo->realParameter[11297], (modelica_real)data->simulationInfo->realParameter[11298], (modelica_real)data->simulationInfo->realParameter[11299], (modelica_real)data->simulationInfo->realParameter[11300], (modelica_real)data->simulationInfo->realParameter[11301]);
- data->localData[0]->realVars[127] /* $cse7 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[201] /* T[2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1019
- type: SIMPLE_ASSIGN
- points[2]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[2].BIP[1,1,1], T[2])
- */
-void Graph_eqFunction_1019(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1019};
- data->localData[0]->realVars[560] /* points[2]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[332],data->localData[0]->realVars[201] /* T[2] variable */,"T[2]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1020
- type: SIMPLE_ASSIGN
- points[2]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[2].BIP[2,2,1], T[2])
- */
-void Graph_eqFunction_1020(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1020};
- data->localData[0]->realVars[563] /* points[2]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[338],data->localData[0]->realVars[201] /* T[2] variable */,"T[2]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1021
- type: SIMPLE_ASSIGN
- points[2]._Gamma._G[2,2] = exp((-points[2].BIP[2,2,2]) * points[2].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1021(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1021};
- data->localData[0]->realVars[245] /* points[2]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[339])) * (data->localData[0]->realVars[563] /* points[2]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1022
- type: SIMPLE_ASSIGN
- points[2]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[2].BIP[2,1,1], T[2])
- */
-void Graph_eqFunction_1022(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1022};
- data->localData[0]->realVars[562] /* points[2]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[336],data->localData[0]->realVars[201] /* T[2] variable */,"T[2]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1023
- type: SIMPLE_ASSIGN
- points[2]._Gamma._G[2,1] = exp((-points[2].BIP[2,1,2]) * points[2].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1023(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1023};
- data->localData[0]->realVars[244] /* points[2]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[337])) * (data->localData[0]->realVars[562] /* points[2]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1024
- type: SIMPLE_ASSIGN
- points[2]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[2].BIP[1,2,1], T[2])
- */
-void Graph_eqFunction_1024(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1024};
- data->localData[0]->realVars[561] /* points[2]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[334],data->localData[0]->realVars[201] /* T[2] variable */,"T[2]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1025
- type: SIMPLE_ASSIGN
- points[2]._Gamma._G[1,2] = exp((-points[2].BIP[1,2,2]) * points[2].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1025(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1025};
- data->localData[0]->realVars[243] /* points[2]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[335])) * (data->localData[0]->realVars[561] /* points[2]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1026
- type: SIMPLE_ASSIGN
- points[2]._Gamma._sum2[2] = 0.02564102564102564 * points[2].Gamma.tau[1,2] * points[2].Gamma.G[1,2] + 0.9743589743589743 * points[2].Gamma.tau[2,2] * points[2].Gamma.G[2,2]
- */
-void Graph_eqFunction_1026(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1026};
- data->localData[0]->realVars[479] /* points[2]._Gamma._sum2[2] variable */ = (0.02564102564102564) * ((data->localData[0]->realVars[561] /* points[2]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[243] /* points[2]._Gamma._G[1,2] variable */)) + (0.9743589743589743) * ((data->localData[0]->realVars[563] /* points[2]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[245] /* points[2]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1027
- type: SIMPLE_ASSIGN
- points[2]._Gamma._G[1,1] = exp((-points[2].BIP[1,1,2]) * points[2].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1027(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1027};
- data->localData[0]->realVars[242] /* points[2]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[333])) * (data->localData[0]->realVars[560] /* points[2]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1028
- type: SIMPLE_ASSIGN
- points[2]._Gamma._sum2[1] = 0.02564102564102564 * points[2].Gamma.tau[1,1] * points[2].Gamma.G[1,1] + 0.9743589743589743 * points[2].Gamma.tau[2,1] * points[2].Gamma.G[2,1]
- */
-void Graph_eqFunction_1028(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1028};
- data->localData[0]->realVars[478] /* points[2]._Gamma._sum2[1] variable */ = (0.02564102564102564) * ((data->localData[0]->realVars[560] /* points[2]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[242] /* points[2]._Gamma._G[1,1] variable */)) + (0.9743589743589743) * ((data->localData[0]->realVars[562] /* points[2]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[244] /* points[2]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1029
- type: SIMPLE_ASSIGN
- points[2]._Gamma._sum1[2] = 0.02564102564102564 * points[2].Gamma.G[1,2] + 0.9743589743589743 * points[2].Gamma.G[2,2]
- */
-void Graph_eqFunction_1029(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1029};
- data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */ = (0.02564102564102564) * (data->localData[0]->realVars[243] /* points[2]._Gamma._G[1,2] variable */) + (0.9743589743589743) * (data->localData[0]->realVars[245] /* points[2]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1030
- type: SIMPLE_ASSIGN
- points[2]._Gamma._sum1[1] = 0.02564102564102564 * points[2].Gamma.G[1,1] + 0.9743589743589743 * points[2].Gamma.G[2,1]
- */
-void Graph_eqFunction_1030(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1030};
- data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */ = (0.02564102564102564) * (data->localData[0]->realVars[242] /* points[2]._Gamma._G[1,1] variable */) + (0.9743589743589743) * (data->localData[0]->realVars[244] /* points[2]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1031
- type: SIMPLE_ASSIGN
- $cse6 = DIVISION(points[2].Gamma.sum2[2], points[2].Gamma.sum1[2]) + 0.02564102564102564 * points[2].Gamma.G[2,1] * DIVISION(points[2].Gamma.tau[2,1] - DIVISION(points[2].Gamma.sum2[1], points[2].Gamma.sum1[1]), points[2].Gamma.sum1[1]) + 0.9743589743589743 * points[2].Gamma.G[2,2] * DIVISION(points[2].Gamma.tau[2,2] - DIVISION(points[2].Gamma.sum2[2], points[2].Gamma.sum1[2]), points[2].Gamma.sum1[2])
- */
-void Graph_eqFunction_1031(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1031};
- data->localData[0]->realVars[116] /* $cse6 variable */ = DIVISION_SIM(data->localData[0]->realVars[479] /* points[2]._Gamma._sum2[2] variable */,data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes) + (0.02564102564102564) * ((data->localData[0]->realVars[244] /* points[2]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[562] /* points[2]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[478] /* points[2]._Gamma._sum2[1] variable */,data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes))) + (0.9743589743589743) * ((data->localData[0]->realVars[245] /* points[2]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[563] /* points[2]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[479] /* points[2]._Gamma._sum2[2] variable */,data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1032
- type: SIMPLE_ASSIGN
- $cse5 = DIVISION(points[2].Gamma.sum2[1], points[2].Gamma.sum1[1]) + 0.02564102564102564 * points[2].Gamma.G[1,1] * DIVISION(points[2].Gamma.tau[1,1] - DIVISION(points[2].Gamma.sum2[1], points[2].Gamma.sum1[1]), points[2].Gamma.sum1[1]) + 0.9743589743589743 * points[2].Gamma.G[1,2] * DIVISION(points[2].Gamma.tau[1,2] - DIVISION(points[2].Gamma.sum2[2], points[2].Gamma.sum1[2]), points[2].Gamma.sum1[2])
- */
-void Graph_eqFunction_1032(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1032};
- data->localData[0]->realVars[105] /* $cse5 variable */ = DIVISION_SIM(data->localData[0]->realVars[478] /* points[2]._Gamma._sum2[1] variable */,data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes) + (0.02564102564102564) * ((data->localData[0]->realVars[242] /* points[2]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[560] /* points[2]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[478] /* points[2]._Gamma._sum2[1] variable */,data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[398] /* points[2]._Gamma._sum1[1] variable */,"points[2].Gamma.sum1[1]",equationIndexes))) + (0.9743589743589743) * ((data->localData[0]->realVars[243] /* points[2]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[561] /* points[2]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[479] /* points[2]._Gamma._sum2[2] variable */,data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[399] /* points[2]._Gamma._sum1[2] variable */,"points[2].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1033
- type: SIMPLE_ASSIGN
- points[2]._gamma[2] = exp($cse6)
- */
-void Graph_eqFunction_1033(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1033};
- data->localData[0]->realVars[877] /* points[2]._gamma[2] variable */ = exp(data->localData[0]->realVars[116] /* $cse6 variable */);
- TRACE_POP
-}
-/*
- equation index: 1034
- type: SIMPLE_ASSIGN
- points[2]._K[2] = 0.0001 * points[2].gamma[2] * $cse8
- */
-void Graph_eqFunction_1034(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1034};
- data->localData[0]->realVars[718] /* points[2]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[877] /* points[2]._gamma[2] variable */) * (data->localData[0]->realVars[138] /* $cse8 variable */));
- TRACE_POP
-}
-/*
- equation index: 1035
- type: SIMPLE_ASSIGN
- points[2]._K[1] = -38.0 * points[2].K[2] - -39.0
- */
-void Graph_eqFunction_1035(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1035};
- data->localData[0]->realVars[717] /* points[2]._K[1] variable */ = (-38.0) * (data->localData[0]->realVars[718] /* points[2]._K[2] variable */) - (-39.0);
- TRACE_POP
-}
-/*
- equation index: 1036
- type: SIMPLE_ASSIGN
- points[2]._gamma[1] = exp($cse5)
- */
-void Graph_eqFunction_1036(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1036};
- data->localData[0]->realVars[876] /* points[2]._gamma[1] variable */ = exp(data->localData[0]->realVars[105] /* $cse5 variable */);
- TRACE_POP
-}
-
-void residualFunc1038(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1038};
- /* iteration variables */
- data->localData[0]->realVars[201] /* T[2] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1017(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1018(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1019(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1020(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1021(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1022(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1023(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1024(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1025(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1026(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1027(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1028(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1029(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1030(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1031(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1032(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1033(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1034(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1035(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1036(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[876] /* points[2]._gamma[1] variable */) * (data->localData[0]->realVars[127] /* $cse7 variable */)) - data->localData[0]->realVars[717] /* points[2]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1038(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1038(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[2] */
- sysData->nominal[i] = data->modelData->realVarsData[201].attribute /* T[2] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[201].attribute /* T[2] */.min;
- sysData->max[i++] = data->modelData->realVarsData[201].attribute /* T[2] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1038(sysData);
-}
-
-void getIterationVarsNLS1038(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[201] /* T[2] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1043
- type: SIMPLE_ASSIGN
- $cse12 = Simulator.Files.ThermodynamicFunctions.Psat({points[3].comp[2].VP[1], points[3].comp[2].VP[2], points[3].comp[2].VP[3], points[3].comp[2].VP[4], points[3].comp[2].VP[5], points[3].comp[2].VP[6]}, T[3])
- */
-void Graph_eqFunction_1043(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1043};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11314], (modelica_real)data->simulationInfo->realParameter[11315], (modelica_real)data->simulationInfo->realParameter[11316], (modelica_real)data->simulationInfo->realParameter[11317], (modelica_real)data->simulationInfo->realParameter[11318], (modelica_real)data->simulationInfo->realParameter[11319]);
- data->localData[0]->realVars[23] /* $cse12 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[202] /* T[3] variable */);
- TRACE_POP
-}
-/*
- equation index: 1044
- type: SIMPLE_ASSIGN
- $cse11 = Simulator.Files.ThermodynamicFunctions.Psat({points[3].comp[1].VP[1], points[3].comp[1].VP[2], points[3].comp[1].VP[3], points[3].comp[1].VP[4], points[3].comp[1].VP[5], points[3].comp[1].VP[6]}, T[3])
- */
-void Graph_eqFunction_1044(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1044};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11308], (modelica_real)data->simulationInfo->realParameter[11309], (modelica_real)data->simulationInfo->realParameter[11310], (modelica_real)data->simulationInfo->realParameter[11311], (modelica_real)data->simulationInfo->realParameter[11312], (modelica_real)data->simulationInfo->realParameter[11313]);
- data->localData[0]->realVars[12] /* $cse11 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[202] /* T[3] variable */);
- TRACE_POP
-}
-/*
- equation index: 1045
- type: SIMPLE_ASSIGN
- points[3]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[3].BIP[1,1,1], T[3])
- */
-void Graph_eqFunction_1045(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1045};
- data->localData[0]->realVars[564] /* points[3]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[340],data->localData[0]->realVars[202] /* T[3] variable */,"T[3]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1046
- type: SIMPLE_ASSIGN
- points[3]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[3].BIP[1,2,1], T[3])
- */
-void Graph_eqFunction_1046(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1046};
- data->localData[0]->realVars[565] /* points[3]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[342],data->localData[0]->realVars[202] /* T[3] variable */,"T[3]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1047
- type: SIMPLE_ASSIGN
- points[3]._Gamma._G[1,2] = exp((-points[3].BIP[1,2,2]) * points[3].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1047(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1047};
- data->localData[0]->realVars[247] /* points[3]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[343])) * (data->localData[0]->realVars[565] /* points[3]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1048
- type: SIMPLE_ASSIGN
- points[3]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[3].BIP[2,1,1], T[3])
- */
-void Graph_eqFunction_1048(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1048};
- data->localData[0]->realVars[566] /* points[3]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[344],data->localData[0]->realVars[202] /* T[3] variable */,"T[3]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1049
- type: SIMPLE_ASSIGN
- points[3]._Gamma._G[2,1] = exp((-points[3].BIP[2,1,2]) * points[3].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1049(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1049};
- data->localData[0]->realVars[248] /* points[3]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[345])) * (data->localData[0]->realVars[566] /* points[3]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1050
- type: SIMPLE_ASSIGN
- points[3]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[3].BIP[2,2,1], T[3])
- */
-void Graph_eqFunction_1050(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1050};
- data->localData[0]->realVars[567] /* points[3]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[346],data->localData[0]->realVars[202] /* T[3] variable */,"T[3]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1051
- type: SIMPLE_ASSIGN
- points[3]._Gamma._G[2,2] = exp((-points[3].BIP[2,2,2]) * points[3].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1051(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1051};
- data->localData[0]->realVars[249] /* points[3]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[347])) * (data->localData[0]->realVars[567] /* points[3]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1052
- type: SIMPLE_ASSIGN
- points[3]._Gamma._sum2[2] = 0.05128205128205128 * points[3].Gamma.tau[1,2] * points[3].Gamma.G[1,2] + 0.9487179487179487 * points[3].Gamma.tau[2,2] * points[3].Gamma.G[2,2]
- */
-void Graph_eqFunction_1052(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1052};
- data->localData[0]->realVars[481] /* points[3]._Gamma._sum2[2] variable */ = (0.05128205128205128) * ((data->localData[0]->realVars[565] /* points[3]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[247] /* points[3]._Gamma._G[1,2] variable */)) + (0.9487179487179487) * ((data->localData[0]->realVars[567] /* points[3]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[249] /* points[3]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1053
- type: SIMPLE_ASSIGN
- points[3]._Gamma._G[1,1] = exp((-points[3].BIP[1,1,2]) * points[3].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1053(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1053};
- data->localData[0]->realVars[246] /* points[3]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[341])) * (data->localData[0]->realVars[564] /* points[3]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1054
- type: SIMPLE_ASSIGN
- points[3]._Gamma._sum2[1] = 0.05128205128205128 * points[3].Gamma.tau[1,1] * points[3].Gamma.G[1,1] + 0.9487179487179487 * points[3].Gamma.tau[2,1] * points[3].Gamma.G[2,1]
- */
-void Graph_eqFunction_1054(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1054};
- data->localData[0]->realVars[480] /* points[3]._Gamma._sum2[1] variable */ = (0.05128205128205128) * ((data->localData[0]->realVars[564] /* points[3]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[246] /* points[3]._Gamma._G[1,1] variable */)) + (0.9487179487179487) * ((data->localData[0]->realVars[566] /* points[3]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[248] /* points[3]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1055
- type: SIMPLE_ASSIGN
- points[3]._Gamma._sum1[2] = 0.05128205128205128 * points[3].Gamma.G[1,2] + 0.9487179487179487 * points[3].Gamma.G[2,2]
- */
-void Graph_eqFunction_1055(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1055};
- data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */ = (0.05128205128205128) * (data->localData[0]->realVars[247] /* points[3]._Gamma._G[1,2] variable */) + (0.9487179487179487) * (data->localData[0]->realVars[249] /* points[3]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1056
- type: SIMPLE_ASSIGN
- points[3]._Gamma._sum1[1] = 0.05128205128205128 * points[3].Gamma.G[1,1] + 0.9487179487179487 * points[3].Gamma.G[2,1]
- */
-void Graph_eqFunction_1056(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1056};
- data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */ = (0.05128205128205128) * (data->localData[0]->realVars[246] /* points[3]._Gamma._G[1,1] variable */) + (0.9487179487179487) * (data->localData[0]->realVars[248] /* points[3]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1057
- type: SIMPLE_ASSIGN
- $cse10 = DIVISION(points[3].Gamma.sum2[2], points[3].Gamma.sum1[2]) + 0.05128205128205128 * points[3].Gamma.G[2,1] * DIVISION(points[3].Gamma.tau[2,1] - DIVISION(points[3].Gamma.sum2[1], points[3].Gamma.sum1[1]), points[3].Gamma.sum1[1]) + 0.9487179487179487 * points[3].Gamma.G[2,2] * DIVISION(points[3].Gamma.tau[2,2] - DIVISION(points[3].Gamma.sum2[2], points[3].Gamma.sum1[2]), points[3].Gamma.sum1[2])
- */
-void Graph_eqFunction_1057(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1057};
- data->localData[0]->realVars[1] /* $cse10 variable */ = DIVISION_SIM(data->localData[0]->realVars[481] /* points[3]._Gamma._sum2[2] variable */,data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes) + (0.05128205128205128) * ((data->localData[0]->realVars[248] /* points[3]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[566] /* points[3]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[480] /* points[3]._Gamma._sum2[1] variable */,data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes))) + (0.9487179487179487) * ((data->localData[0]->realVars[249] /* points[3]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[567] /* points[3]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[481] /* points[3]._Gamma._sum2[2] variable */,data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1058
- type: SIMPLE_ASSIGN
- $cse9 = DIVISION(points[3].Gamma.sum2[1], points[3].Gamma.sum1[1]) + 0.05128205128205128 * points[3].Gamma.G[1,1] * DIVISION(points[3].Gamma.tau[1,1] - DIVISION(points[3].Gamma.sum2[1], points[3].Gamma.sum1[1]), points[3].Gamma.sum1[1]) + 0.9487179487179487 * points[3].Gamma.G[1,2] * DIVISION(points[3].Gamma.tau[1,2] - DIVISION(points[3].Gamma.sum2[2], points[3].Gamma.sum1[2]), points[3].Gamma.sum1[2])
- */
-void Graph_eqFunction_1058(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1058};
- data->localData[0]->realVars[149] /* $cse9 variable */ = DIVISION_SIM(data->localData[0]->realVars[480] /* points[3]._Gamma._sum2[1] variable */,data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes) + (0.05128205128205128) * ((data->localData[0]->realVars[246] /* points[3]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[564] /* points[3]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[480] /* points[3]._Gamma._sum2[1] variable */,data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[400] /* points[3]._Gamma._sum1[1] variable */,"points[3].Gamma.sum1[1]",equationIndexes))) + (0.9487179487179487) * ((data->localData[0]->realVars[247] /* points[3]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[565] /* points[3]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[481] /* points[3]._Gamma._sum2[2] variable */,data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[401] /* points[3]._Gamma._sum1[2] variable */,"points[3].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1059
- type: SIMPLE_ASSIGN
- points[3]._gamma[2] = exp($cse10)
- */
-void Graph_eqFunction_1059(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1059};
- data->localData[0]->realVars[879] /* points[3]._gamma[2] variable */ = exp(data->localData[0]->realVars[1] /* $cse10 variable */);
- TRACE_POP
-}
-/*
- equation index: 1060
- type: SIMPLE_ASSIGN
- points[3]._K[2] = 0.0001 * points[3].gamma[2] * $cse12
- */
-void Graph_eqFunction_1060(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1060};
- data->localData[0]->realVars[720] /* points[3]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[879] /* points[3]._gamma[2] variable */) * (data->localData[0]->realVars[23] /* $cse12 variable */));
- TRACE_POP
-}
-/*
- equation index: 1061
- type: SIMPLE_ASSIGN
- points[3]._K[1] = -18.5 * points[3].K[2] - -19.5
- */
-void Graph_eqFunction_1061(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1061};
- data->localData[0]->realVars[719] /* points[3]._K[1] variable */ = (-18.5) * (data->localData[0]->realVars[720] /* points[3]._K[2] variable */) - (-19.5);
- TRACE_POP
-}
-/*
- equation index: 1062
- type: SIMPLE_ASSIGN
- points[3]._gamma[1] = exp($cse9)
- */
-void Graph_eqFunction_1062(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1062};
- data->localData[0]->realVars[878] /* points[3]._gamma[1] variable */ = exp(data->localData[0]->realVars[149] /* $cse9 variable */);
- TRACE_POP
-}
-
-void residualFunc1064(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1064};
- /* iteration variables */
- data->localData[0]->realVars[202] /* T[3] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1043(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1044(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1045(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1046(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1047(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1048(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1049(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1050(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1051(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1052(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1053(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1054(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1055(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1056(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1057(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1058(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1059(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1060(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1061(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1062(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[878] /* points[3]._gamma[1] variable */) * (data->localData[0]->realVars[12] /* $cse11 variable */)) - data->localData[0]->realVars[719] /* points[3]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1064(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1064(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[3] */
- sysData->nominal[i] = data->modelData->realVarsData[202].attribute /* T[3] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[202].attribute /* T[3] */.min;
- sysData->max[i++] = data->modelData->realVarsData[202].attribute /* T[3] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1064(sysData);
-}
-
-void getIterationVarsNLS1064(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[202] /* T[3] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1069
- type: SIMPLE_ASSIGN
- $cse16 = Simulator.Files.ThermodynamicFunctions.Psat({points[4].comp[2].VP[1], points[4].comp[2].VP[2], points[4].comp[2].VP[3], points[4].comp[2].VP[4], points[4].comp[2].VP[5], points[4].comp[2].VP[6]}, T[4])
- */
-void Graph_eqFunction_1069(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1069};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11326], (modelica_real)data->simulationInfo->realParameter[11327], (modelica_real)data->simulationInfo->realParameter[11328], (modelica_real)data->simulationInfo->realParameter[11329], (modelica_real)data->simulationInfo->realParameter[11330], (modelica_real)data->simulationInfo->realParameter[11331]);
- data->localData[0]->realVars[67] /* $cse16 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[203] /* T[4] variable */);
- TRACE_POP
-}
-/*
- equation index: 1070
- type: SIMPLE_ASSIGN
- $cse15 = Simulator.Files.ThermodynamicFunctions.Psat({points[4].comp[1].VP[1], points[4].comp[1].VP[2], points[4].comp[1].VP[3], points[4].comp[1].VP[4], points[4].comp[1].VP[5], points[4].comp[1].VP[6]}, T[4])
- */
-void Graph_eqFunction_1070(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1070};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11320], (modelica_real)data->simulationInfo->realParameter[11321], (modelica_real)data->simulationInfo->realParameter[11322], (modelica_real)data->simulationInfo->realParameter[11323], (modelica_real)data->simulationInfo->realParameter[11324], (modelica_real)data->simulationInfo->realParameter[11325]);
- data->localData[0]->realVars[56] /* $cse15 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[203] /* T[4] variable */);
- TRACE_POP
-}
-/*
- equation index: 1071
- type: SIMPLE_ASSIGN
- points[4]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[4].BIP[1,1,1], T[4])
- */
-void Graph_eqFunction_1071(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1071};
- data->localData[0]->realVars[568] /* points[4]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[348],data->localData[0]->realVars[203] /* T[4] variable */,"T[4]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1072
- type: SIMPLE_ASSIGN
- points[4]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[4].BIP[1,2,1], T[4])
- */
-void Graph_eqFunction_1072(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1072};
- data->localData[0]->realVars[569] /* points[4]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[350],data->localData[0]->realVars[203] /* T[4] variable */,"T[4]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1073
- type: SIMPLE_ASSIGN
- points[4]._Gamma._G[1,2] = exp((-points[4].BIP[1,2,2]) * points[4].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1073(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1073};
- data->localData[0]->realVars[251] /* points[4]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[351])) * (data->localData[0]->realVars[569] /* points[4]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1074
- type: SIMPLE_ASSIGN
- points[4]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[4].BIP[2,1,1], T[4])
- */
-void Graph_eqFunction_1074(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1074};
- data->localData[0]->realVars[570] /* points[4]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[352],data->localData[0]->realVars[203] /* T[4] variable */,"T[4]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1075
- type: SIMPLE_ASSIGN
- points[4]._Gamma._G[2,1] = exp((-points[4].BIP[2,1,2]) * points[4].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1075(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1075};
- data->localData[0]->realVars[252] /* points[4]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[353])) * (data->localData[0]->realVars[570] /* points[4]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1076
- type: SIMPLE_ASSIGN
- points[4]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[4].BIP[2,2,1], T[4])
- */
-void Graph_eqFunction_1076(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1076};
- data->localData[0]->realVars[571] /* points[4]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[354],data->localData[0]->realVars[203] /* T[4] variable */,"T[4]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1077
- type: SIMPLE_ASSIGN
- points[4]._Gamma._G[2,2] = exp((-points[4].BIP[2,2,2]) * points[4].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1077(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1077};
- data->localData[0]->realVars[253] /* points[4]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[355])) * (data->localData[0]->realVars[571] /* points[4]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1078
- type: SIMPLE_ASSIGN
- points[4]._Gamma._sum2[2] = 0.07692307692307693 * points[4].Gamma.tau[1,2] * points[4].Gamma.G[1,2] + 0.9230769230769231 * points[4].Gamma.tau[2,2] * points[4].Gamma.G[2,2]
- */
-void Graph_eqFunction_1078(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1078};
- data->localData[0]->realVars[483] /* points[4]._Gamma._sum2[2] variable */ = (0.07692307692307693) * ((data->localData[0]->realVars[569] /* points[4]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[251] /* points[4]._Gamma._G[1,2] variable */)) + (0.9230769230769231) * ((data->localData[0]->realVars[571] /* points[4]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[253] /* points[4]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1079
- type: SIMPLE_ASSIGN
- points[4]._Gamma._G[1,1] = exp((-points[4].BIP[1,1,2]) * points[4].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1079(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1079};
- data->localData[0]->realVars[250] /* points[4]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[349])) * (data->localData[0]->realVars[568] /* points[4]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1080
- type: SIMPLE_ASSIGN
- points[4]._Gamma._sum2[1] = 0.07692307692307693 * points[4].Gamma.tau[1,1] * points[4].Gamma.G[1,1] + 0.9230769230769231 * points[4].Gamma.tau[2,1] * points[4].Gamma.G[2,1]
- */
-void Graph_eqFunction_1080(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1080};
- data->localData[0]->realVars[482] /* points[4]._Gamma._sum2[1] variable */ = (0.07692307692307693) * ((data->localData[0]->realVars[568] /* points[4]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[250] /* points[4]._Gamma._G[1,1] variable */)) + (0.9230769230769231) * ((data->localData[0]->realVars[570] /* points[4]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[252] /* points[4]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1081
- type: SIMPLE_ASSIGN
- points[4]._Gamma._sum1[2] = 0.07692307692307693 * points[4].Gamma.G[1,2] + 0.9230769230769231 * points[4].Gamma.G[2,2]
- */
-void Graph_eqFunction_1081(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1081};
- data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */ = (0.07692307692307693) * (data->localData[0]->realVars[251] /* points[4]._Gamma._G[1,2] variable */) + (0.9230769230769231) * (data->localData[0]->realVars[253] /* points[4]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1082
- type: SIMPLE_ASSIGN
- points[4]._Gamma._sum1[1] = 0.07692307692307693 * points[4].Gamma.G[1,1] + 0.9230769230769231 * points[4].Gamma.G[2,1]
- */
-void Graph_eqFunction_1082(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1082};
- data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */ = (0.07692307692307693) * (data->localData[0]->realVars[250] /* points[4]._Gamma._G[1,1] variable */) + (0.9230769230769231) * (data->localData[0]->realVars[252] /* points[4]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1083
- type: SIMPLE_ASSIGN
- $cse14 = DIVISION(points[4].Gamma.sum2[2], points[4].Gamma.sum1[2]) + 0.07692307692307693 * points[4].Gamma.G[2,1] * DIVISION(points[4].Gamma.tau[2,1] - DIVISION(points[4].Gamma.sum2[1], points[4].Gamma.sum1[1]), points[4].Gamma.sum1[1]) + 0.9230769230769231 * points[4].Gamma.G[2,2] * DIVISION(points[4].Gamma.tau[2,2] - DIVISION(points[4].Gamma.sum2[2], points[4].Gamma.sum1[2]), points[4].Gamma.sum1[2])
- */
-void Graph_eqFunction_1083(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1083};
- data->localData[0]->realVars[45] /* $cse14 variable */ = DIVISION_SIM(data->localData[0]->realVars[483] /* points[4]._Gamma._sum2[2] variable */,data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes) + (0.07692307692307693) * ((data->localData[0]->realVars[252] /* points[4]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[570] /* points[4]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[482] /* points[4]._Gamma._sum2[1] variable */,data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes))) + (0.9230769230769231) * ((data->localData[0]->realVars[253] /* points[4]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[571] /* points[4]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[483] /* points[4]._Gamma._sum2[2] variable */,data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1084
- type: SIMPLE_ASSIGN
- $cse13 = DIVISION(points[4].Gamma.sum2[1], points[4].Gamma.sum1[1]) + 0.07692307692307693 * points[4].Gamma.G[1,1] * DIVISION(points[4].Gamma.tau[1,1] - DIVISION(points[4].Gamma.sum2[1], points[4].Gamma.sum1[1]), points[4].Gamma.sum1[1]) + 0.9230769230769231 * points[4].Gamma.G[1,2] * DIVISION(points[4].Gamma.tau[1,2] - DIVISION(points[4].Gamma.sum2[2], points[4].Gamma.sum1[2]), points[4].Gamma.sum1[2])
- */
-void Graph_eqFunction_1084(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1084};
- data->localData[0]->realVars[34] /* $cse13 variable */ = DIVISION_SIM(data->localData[0]->realVars[482] /* points[4]._Gamma._sum2[1] variable */,data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes) + (0.07692307692307693) * ((data->localData[0]->realVars[250] /* points[4]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[568] /* points[4]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[482] /* points[4]._Gamma._sum2[1] variable */,data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[402] /* points[4]._Gamma._sum1[1] variable */,"points[4].Gamma.sum1[1]",equationIndexes))) + (0.9230769230769231) * ((data->localData[0]->realVars[251] /* points[4]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[569] /* points[4]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[483] /* points[4]._Gamma._sum2[2] variable */,data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[403] /* points[4]._Gamma._sum1[2] variable */,"points[4].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1085
- type: SIMPLE_ASSIGN
- points[4]._gamma[2] = exp($cse14)
- */
-void Graph_eqFunction_1085(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1085};
- data->localData[0]->realVars[881] /* points[4]._gamma[2] variable */ = exp(data->localData[0]->realVars[45] /* $cse14 variable */);
- TRACE_POP
-}
-/*
- equation index: 1086
- type: SIMPLE_ASSIGN
- points[4]._K[2] = 0.0001 * points[4].gamma[2] * $cse16
- */
-void Graph_eqFunction_1086(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1086};
- data->localData[0]->realVars[722] /* points[4]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[881] /* points[4]._gamma[2] variable */) * (data->localData[0]->realVars[67] /* $cse16 variable */));
- TRACE_POP
-}
-/*
- equation index: 1087
- type: SIMPLE_ASSIGN
- points[4]._K[1] = -12.0 * points[4].K[2] - -13.0
- */
-void Graph_eqFunction_1087(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1087};
- data->localData[0]->realVars[721] /* points[4]._K[1] variable */ = (-12.0) * (data->localData[0]->realVars[722] /* points[4]._K[2] variable */) - (-13.0);
- TRACE_POP
-}
-/*
- equation index: 1088
- type: SIMPLE_ASSIGN
- points[4]._gamma[1] = exp($cse13)
- */
-void Graph_eqFunction_1088(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1088};
- data->localData[0]->realVars[880] /* points[4]._gamma[1] variable */ = exp(data->localData[0]->realVars[34] /* $cse13 variable */);
- TRACE_POP
-}
-
-void residualFunc1090(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1090};
- /* iteration variables */
- data->localData[0]->realVars[203] /* T[4] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1069(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1070(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1071(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1072(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1073(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1074(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1075(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1076(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1077(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1078(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1079(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1080(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1081(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1082(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1083(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1084(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1085(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1086(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1087(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1088(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[880] /* points[4]._gamma[1] variable */) * (data->localData[0]->realVars[56] /* $cse15 variable */)) - data->localData[0]->realVars[721] /* points[4]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1090(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1090(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[4] */
- sysData->nominal[i] = data->modelData->realVarsData[203].attribute /* T[4] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[203].attribute /* T[4] */.min;
- sysData->max[i++] = data->modelData->realVarsData[203].attribute /* T[4] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1090(sysData);
-}
-
-void getIterationVarsNLS1090(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[203] /* T[4] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1095
- type: SIMPLE_ASSIGN
- $cse20 = Simulator.Files.ThermodynamicFunctions.Psat({points[5].comp[2].VP[1], points[5].comp[2].VP[2], points[5].comp[2].VP[3], points[5].comp[2].VP[4], points[5].comp[2].VP[5], points[5].comp[2].VP[6]}, T[5])
- */
-void Graph_eqFunction_1095(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1095};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11338], (modelica_real)data->simulationInfo->realParameter[11339], (modelica_real)data->simulationInfo->realParameter[11340], (modelica_real)data->simulationInfo->realParameter[11341], (modelica_real)data->simulationInfo->realParameter[11342], (modelica_real)data->simulationInfo->realParameter[11343]);
- data->localData[0]->realVars[73] /* $cse20 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[204] /* T[5] variable */);
- TRACE_POP
-}
-/*
- equation index: 1096
- type: SIMPLE_ASSIGN
- $cse19 = Simulator.Files.ThermodynamicFunctions.Psat({points[5].comp[1].VP[1], points[5].comp[1].VP[2], points[5].comp[1].VP[3], points[5].comp[1].VP[4], points[5].comp[1].VP[5], points[5].comp[1].VP[6]}, T[5])
- */
-void Graph_eqFunction_1096(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1096};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11332], (modelica_real)data->simulationInfo->realParameter[11333], (modelica_real)data->simulationInfo->realParameter[11334], (modelica_real)data->simulationInfo->realParameter[11335], (modelica_real)data->simulationInfo->realParameter[11336], (modelica_real)data->simulationInfo->realParameter[11337]);
- data->localData[0]->realVars[71] /* $cse19 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[204] /* T[5] variable */);
- TRACE_POP
-}
-/*
- equation index: 1097
- type: SIMPLE_ASSIGN
- points[5]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[5].BIP[1,1,1], T[5])
- */
-void Graph_eqFunction_1097(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1097};
- data->localData[0]->realVars[572] /* points[5]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[356],data->localData[0]->realVars[204] /* T[5] variable */,"T[5]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1098
- type: SIMPLE_ASSIGN
- points[5]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[5].BIP[1,2,1], T[5])
- */
-void Graph_eqFunction_1098(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1098};
- data->localData[0]->realVars[573] /* points[5]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[358],data->localData[0]->realVars[204] /* T[5] variable */,"T[5]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1099
- type: SIMPLE_ASSIGN
- points[5]._Gamma._G[1,2] = exp((-points[5].BIP[1,2,2]) * points[5].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1099(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1099};
- data->localData[0]->realVars[255] /* points[5]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[359])) * (data->localData[0]->realVars[573] /* points[5]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1100
- type: SIMPLE_ASSIGN
- points[5]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[5].BIP[2,1,1], T[5])
- */
-void Graph_eqFunction_1100(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1100};
- data->localData[0]->realVars[574] /* points[5]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[360],data->localData[0]->realVars[204] /* T[5] variable */,"T[5]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1101
- type: SIMPLE_ASSIGN
- points[5]._Gamma._G[2,1] = exp((-points[5].BIP[2,1,2]) * points[5].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1101(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1101};
- data->localData[0]->realVars[256] /* points[5]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[361])) * (data->localData[0]->realVars[574] /* points[5]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1102
- type: SIMPLE_ASSIGN
- points[5]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[5].BIP[2,2,1], T[5])
- */
-void Graph_eqFunction_1102(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1102};
- data->localData[0]->realVars[575] /* points[5]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[362],data->localData[0]->realVars[204] /* T[5] variable */,"T[5]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1103
- type: SIMPLE_ASSIGN
- points[5]._Gamma._G[2,2] = exp((-points[5].BIP[2,2,2]) * points[5].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1103(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1103};
- data->localData[0]->realVars[257] /* points[5]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[363])) * (data->localData[0]->realVars[575] /* points[5]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1104
- type: SIMPLE_ASSIGN
- points[5]._Gamma._sum2[2] = 0.1025641025641026 * points[5].Gamma.tau[1,2] * points[5].Gamma.G[1,2] + 0.8974358974358975 * points[5].Gamma.tau[2,2] * points[5].Gamma.G[2,2]
- */
-void Graph_eqFunction_1104(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1104};
- data->localData[0]->realVars[485] /* points[5]._Gamma._sum2[2] variable */ = (0.1025641025641026) * ((data->localData[0]->realVars[573] /* points[5]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[255] /* points[5]._Gamma._G[1,2] variable */)) + (0.8974358974358975) * ((data->localData[0]->realVars[575] /* points[5]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[257] /* points[5]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1105
- type: SIMPLE_ASSIGN
- points[5]._Gamma._G[1,1] = exp((-points[5].BIP[1,1,2]) * points[5].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1105(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1105};
- data->localData[0]->realVars[254] /* points[5]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[357])) * (data->localData[0]->realVars[572] /* points[5]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1106
- type: SIMPLE_ASSIGN
- points[5]._Gamma._sum2[1] = 0.1025641025641026 * points[5].Gamma.tau[1,1] * points[5].Gamma.G[1,1] + 0.8974358974358975 * points[5].Gamma.tau[2,1] * points[5].Gamma.G[2,1]
- */
-void Graph_eqFunction_1106(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1106};
- data->localData[0]->realVars[484] /* points[5]._Gamma._sum2[1] variable */ = (0.1025641025641026) * ((data->localData[0]->realVars[572] /* points[5]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[254] /* points[5]._Gamma._G[1,1] variable */)) + (0.8974358974358975) * ((data->localData[0]->realVars[574] /* points[5]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[256] /* points[5]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1107
- type: SIMPLE_ASSIGN
- points[5]._Gamma._sum1[1] = 0.1025641025641026 * points[5].Gamma.G[1,1] + 0.8974358974358975 * points[5].Gamma.G[2,1]
- */
-void Graph_eqFunction_1107(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1107};
- data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */ = (0.1025641025641026) * (data->localData[0]->realVars[254] /* points[5]._Gamma._G[1,1] variable */) + (0.8974358974358975) * (data->localData[0]->realVars[256] /* points[5]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1108
- type: SIMPLE_ASSIGN
- points[5]._Gamma._sum1[2] = 0.1025641025641026 * points[5].Gamma.G[1,2] + 0.8974358974358975 * points[5].Gamma.G[2,2]
- */
-void Graph_eqFunction_1108(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1108};
- data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */ = (0.1025641025641026) * (data->localData[0]->realVars[255] /* points[5]._Gamma._G[1,2] variable */) + (0.8974358974358975) * (data->localData[0]->realVars[257] /* points[5]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1109
- type: SIMPLE_ASSIGN
- $cse18 = DIVISION(points[5].Gamma.sum2[2], points[5].Gamma.sum1[2]) + 0.1025641025641026 * points[5].Gamma.G[2,1] * DIVISION(points[5].Gamma.tau[2,1] - DIVISION(points[5].Gamma.sum2[1], points[5].Gamma.sum1[1]), points[5].Gamma.sum1[1]) + 0.8974358974358975 * points[5].Gamma.G[2,2] * DIVISION(points[5].Gamma.tau[2,2] - DIVISION(points[5].Gamma.sum2[2], points[5].Gamma.sum1[2]), points[5].Gamma.sum1[2])
- */
-void Graph_eqFunction_1109(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1109};
- data->localData[0]->realVars[70] /* $cse18 variable */ = DIVISION_SIM(data->localData[0]->realVars[485] /* points[5]._Gamma._sum2[2] variable */,data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes) + (0.1025641025641026) * ((data->localData[0]->realVars[256] /* points[5]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[574] /* points[5]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[484] /* points[5]._Gamma._sum2[1] variable */,data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes))) + (0.8974358974358975) * ((data->localData[0]->realVars[257] /* points[5]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[575] /* points[5]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[485] /* points[5]._Gamma._sum2[2] variable */,data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1110
- type: SIMPLE_ASSIGN
- $cse17 = DIVISION(points[5].Gamma.sum2[1], points[5].Gamma.sum1[1]) + 0.1025641025641026 * points[5].Gamma.G[1,1] * DIVISION(points[5].Gamma.tau[1,1] - DIVISION(points[5].Gamma.sum2[1], points[5].Gamma.sum1[1]), points[5].Gamma.sum1[1]) + 0.8974358974358975 * points[5].Gamma.G[1,2] * DIVISION(points[5].Gamma.tau[1,2] - DIVISION(points[5].Gamma.sum2[2], points[5].Gamma.sum1[2]), points[5].Gamma.sum1[2])
- */
-void Graph_eqFunction_1110(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1110};
- data->localData[0]->realVars[69] /* $cse17 variable */ = DIVISION_SIM(data->localData[0]->realVars[484] /* points[5]._Gamma._sum2[1] variable */,data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes) + (0.1025641025641026) * ((data->localData[0]->realVars[254] /* points[5]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[572] /* points[5]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[484] /* points[5]._Gamma._sum2[1] variable */,data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[404] /* points[5]._Gamma._sum1[1] variable */,"points[5].Gamma.sum1[1]",equationIndexes))) + (0.8974358974358975) * ((data->localData[0]->realVars[255] /* points[5]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[573] /* points[5]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[485] /* points[5]._Gamma._sum2[2] variable */,data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[405] /* points[5]._Gamma._sum1[2] variable */,"points[5].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1111
- type: SIMPLE_ASSIGN
- points[5]._gamma[1] = exp($cse17)
- */
-void Graph_eqFunction_1111(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1111};
- data->localData[0]->realVars[882] /* points[5]._gamma[1] variable */ = exp(data->localData[0]->realVars[69] /* $cse17 variable */);
- TRACE_POP
-}
-/*
- equation index: 1112
- type: SIMPLE_ASSIGN
- points[5]._K[1] = 0.0001 * points[5].gamma[1] * $cse19
- */
-void Graph_eqFunction_1112(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1112};
- data->localData[0]->realVars[723] /* points[5]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[882] /* points[5]._gamma[1] variable */) * (data->localData[0]->realVars[71] /* $cse19 variable */));
- TRACE_POP
-}
-/*
- equation index: 1113
- type: SIMPLE_ASSIGN
- points[5]._K[2] = -0.1142857142857143 * points[5].K[1] - -1.114285714285714
- */
-void Graph_eqFunction_1113(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1113};
- data->localData[0]->realVars[724] /* points[5]._K[2] variable */ = (-0.1142857142857143) * (data->localData[0]->realVars[723] /* points[5]._K[1] variable */) - (-1.114285714285714);
- TRACE_POP
-}
-/*
- equation index: 1114
- type: SIMPLE_ASSIGN
- points[5]._gamma[2] = exp($cse18)
- */
-void Graph_eqFunction_1114(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1114};
- data->localData[0]->realVars[883] /* points[5]._gamma[2] variable */ = exp(data->localData[0]->realVars[70] /* $cse18 variable */);
- TRACE_POP
-}
-
-void residualFunc1116(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1116};
- /* iteration variables */
- data->localData[0]->realVars[204] /* T[5] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1095(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1096(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1097(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1098(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1099(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1100(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1101(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1102(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1103(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1104(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1105(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1106(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1107(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1108(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1109(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1110(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1111(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1112(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1113(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1114(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[883] /* points[5]._gamma[2] variable */) * (data->localData[0]->realVars[73] /* $cse20 variable */)) - data->localData[0]->realVars[724] /* points[5]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1116(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1116(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[5] */
- sysData->nominal[i] = data->modelData->realVarsData[204].attribute /* T[5] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[204].attribute /* T[5] */.min;
- sysData->max[i++] = data->modelData->realVarsData[204].attribute /* T[5] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1116(sysData);
-}
-
-void getIterationVarsNLS1116(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[204] /* T[5] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1121
- type: SIMPLE_ASSIGN
- $cse24 = Simulator.Files.ThermodynamicFunctions.Psat({points[6].comp[2].VP[1], points[6].comp[2].VP[2], points[6].comp[2].VP[3], points[6].comp[2].VP[4], points[6].comp[2].VP[5], points[6].comp[2].VP[6]}, T[6])
- */
-void Graph_eqFunction_1121(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1121};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11350], (modelica_real)data->simulationInfo->realParameter[11351], (modelica_real)data->simulationInfo->realParameter[11352], (modelica_real)data->simulationInfo->realParameter[11353], (modelica_real)data->simulationInfo->realParameter[11354], (modelica_real)data->simulationInfo->realParameter[11355]);
- data->localData[0]->realVars[77] /* $cse24 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[205] /* T[6] variable */);
- TRACE_POP
-}
-/*
- equation index: 1122
- type: SIMPLE_ASSIGN
- $cse23 = Simulator.Files.ThermodynamicFunctions.Psat({points[6].comp[1].VP[1], points[6].comp[1].VP[2], points[6].comp[1].VP[3], points[6].comp[1].VP[4], points[6].comp[1].VP[5], points[6].comp[1].VP[6]}, T[6])
- */
-void Graph_eqFunction_1122(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1122};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11344], (modelica_real)data->simulationInfo->realParameter[11345], (modelica_real)data->simulationInfo->realParameter[11346], (modelica_real)data->simulationInfo->realParameter[11347], (modelica_real)data->simulationInfo->realParameter[11348], (modelica_real)data->simulationInfo->realParameter[11349]);
- data->localData[0]->realVars[76] /* $cse23 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[205] /* T[6] variable */);
- TRACE_POP
-}
-/*
- equation index: 1123
- type: SIMPLE_ASSIGN
- points[6]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[6].BIP[1,1,1], T[6])
- */
-void Graph_eqFunction_1123(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1123};
- data->localData[0]->realVars[576] /* points[6]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[364],data->localData[0]->realVars[205] /* T[6] variable */,"T[6]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1124
- type: SIMPLE_ASSIGN
- points[6]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[6].BIP[1,2,1], T[6])
- */
-void Graph_eqFunction_1124(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1124};
- data->localData[0]->realVars[577] /* points[6]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[366],data->localData[0]->realVars[205] /* T[6] variable */,"T[6]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1125
- type: SIMPLE_ASSIGN
- points[6]._Gamma._G[1,2] = exp((-points[6].BIP[1,2,2]) * points[6].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1125(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1125};
- data->localData[0]->realVars[259] /* points[6]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[367])) * (data->localData[0]->realVars[577] /* points[6]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1126
- type: SIMPLE_ASSIGN
- points[6]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[6].BIP[2,1,1], T[6])
- */
-void Graph_eqFunction_1126(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1126};
- data->localData[0]->realVars[578] /* points[6]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[368],data->localData[0]->realVars[205] /* T[6] variable */,"T[6]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1127
- type: SIMPLE_ASSIGN
- points[6]._Gamma._G[2,1] = exp((-points[6].BIP[2,1,2]) * points[6].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1127(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1127};
- data->localData[0]->realVars[260] /* points[6]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[369])) * (data->localData[0]->realVars[578] /* points[6]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1128
- type: SIMPLE_ASSIGN
- points[6]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[6].BIP[2,2,1], T[6])
- */
-void Graph_eqFunction_1128(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1128};
- data->localData[0]->realVars[579] /* points[6]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[370],data->localData[0]->realVars[205] /* T[6] variable */,"T[6]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1129
- type: SIMPLE_ASSIGN
- points[6]._Gamma._G[2,2] = exp((-points[6].BIP[2,2,2]) * points[6].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1129(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1129};
- data->localData[0]->realVars[261] /* points[6]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[371])) * (data->localData[0]->realVars[579] /* points[6]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1130
- type: SIMPLE_ASSIGN
- points[6]._Gamma._sum2[2] = 0.1282051282051282 * points[6].Gamma.tau[1,2] * points[6].Gamma.G[1,2] + 0.8717948717948718 * points[6].Gamma.tau[2,2] * points[6].Gamma.G[2,2]
- */
-void Graph_eqFunction_1130(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1130};
- data->localData[0]->realVars[487] /* points[6]._Gamma._sum2[2] variable */ = (0.1282051282051282) * ((data->localData[0]->realVars[577] /* points[6]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[259] /* points[6]._Gamma._G[1,2] variable */)) + (0.8717948717948718) * ((data->localData[0]->realVars[579] /* points[6]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[261] /* points[6]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1131
- type: SIMPLE_ASSIGN
- points[6]._Gamma._G[1,1] = exp((-points[6].BIP[1,1,2]) * points[6].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1131(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1131};
- data->localData[0]->realVars[258] /* points[6]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[365])) * (data->localData[0]->realVars[576] /* points[6]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1132
- type: SIMPLE_ASSIGN
- points[6]._Gamma._sum2[1] = 0.1282051282051282 * points[6].Gamma.tau[1,1] * points[6].Gamma.G[1,1] + 0.8717948717948718 * points[6].Gamma.tau[2,1] * points[6].Gamma.G[2,1]
- */
-void Graph_eqFunction_1132(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1132};
- data->localData[0]->realVars[486] /* points[6]._Gamma._sum2[1] variable */ = (0.1282051282051282) * ((data->localData[0]->realVars[576] /* points[6]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[258] /* points[6]._Gamma._G[1,1] variable */)) + (0.8717948717948718) * ((data->localData[0]->realVars[578] /* points[6]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[260] /* points[6]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1133
- type: SIMPLE_ASSIGN
- points[6]._Gamma._sum1[1] = 0.1282051282051282 * points[6].Gamma.G[1,1] + 0.8717948717948718 * points[6].Gamma.G[2,1]
- */
-void Graph_eqFunction_1133(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1133};
- data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */ = (0.1282051282051282) * (data->localData[0]->realVars[258] /* points[6]._Gamma._G[1,1] variable */) + (0.8717948717948718) * (data->localData[0]->realVars[260] /* points[6]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1134
- type: SIMPLE_ASSIGN
- points[6]._Gamma._sum1[2] = 0.1282051282051282 * points[6].Gamma.G[1,2] + 0.8717948717948718 * points[6].Gamma.G[2,2]
- */
-void Graph_eqFunction_1134(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1134};
- data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */ = (0.1282051282051282) * (data->localData[0]->realVars[259] /* points[6]._Gamma._G[1,2] variable */) + (0.8717948717948718) * (data->localData[0]->realVars[261] /* points[6]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1135
- type: SIMPLE_ASSIGN
- $cse22 = DIVISION(points[6].Gamma.sum2[2], points[6].Gamma.sum1[2]) + 0.1282051282051282 * points[6].Gamma.G[2,1] * DIVISION(points[6].Gamma.tau[2,1] - DIVISION(points[6].Gamma.sum2[1], points[6].Gamma.sum1[1]), points[6].Gamma.sum1[1]) + 0.8717948717948718 * points[6].Gamma.G[2,2] * DIVISION(points[6].Gamma.tau[2,2] - DIVISION(points[6].Gamma.sum2[2], points[6].Gamma.sum1[2]), points[6].Gamma.sum1[2])
- */
-void Graph_eqFunction_1135(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1135};
- data->localData[0]->realVars[75] /* $cse22 variable */ = DIVISION_SIM(data->localData[0]->realVars[487] /* points[6]._Gamma._sum2[2] variable */,data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes) + (0.1282051282051282) * ((data->localData[0]->realVars[260] /* points[6]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[578] /* points[6]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[486] /* points[6]._Gamma._sum2[1] variable */,data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes))) + (0.8717948717948718) * ((data->localData[0]->realVars[261] /* points[6]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[579] /* points[6]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[487] /* points[6]._Gamma._sum2[2] variable */,data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1136
- type: SIMPLE_ASSIGN
- $cse21 = DIVISION(points[6].Gamma.sum2[1], points[6].Gamma.sum1[1]) + 0.1282051282051282 * points[6].Gamma.G[1,1] * DIVISION(points[6].Gamma.tau[1,1] - DIVISION(points[6].Gamma.sum2[1], points[6].Gamma.sum1[1]), points[6].Gamma.sum1[1]) + 0.8717948717948718 * points[6].Gamma.G[1,2] * DIVISION(points[6].Gamma.tau[1,2] - DIVISION(points[6].Gamma.sum2[2], points[6].Gamma.sum1[2]), points[6].Gamma.sum1[2])
- */
-void Graph_eqFunction_1136(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1136};
- data->localData[0]->realVars[74] /* $cse21 variable */ = DIVISION_SIM(data->localData[0]->realVars[486] /* points[6]._Gamma._sum2[1] variable */,data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes) + (0.1282051282051282) * ((data->localData[0]->realVars[258] /* points[6]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[576] /* points[6]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[486] /* points[6]._Gamma._sum2[1] variable */,data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[406] /* points[6]._Gamma._sum1[1] variable */,"points[6].Gamma.sum1[1]",equationIndexes))) + (0.8717948717948718) * ((data->localData[0]->realVars[259] /* points[6]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[577] /* points[6]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[487] /* points[6]._Gamma._sum2[2] variable */,data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[407] /* points[6]._Gamma._sum1[2] variable */,"points[6].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1137
- type: SIMPLE_ASSIGN
- points[6]._gamma[2] = exp($cse22)
- */
-void Graph_eqFunction_1137(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1137};
- data->localData[0]->realVars[885] /* points[6]._gamma[2] variable */ = exp(data->localData[0]->realVars[75] /* $cse22 variable */);
- TRACE_POP
-}
-/*
- equation index: 1138
- type: SIMPLE_ASSIGN
- points[6]._K[2] = 0.0001 * points[6].gamma[2] * $cse24
- */
-void Graph_eqFunction_1138(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1138};
- data->localData[0]->realVars[726] /* points[6]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[885] /* points[6]._gamma[2] variable */) * (data->localData[0]->realVars[77] /* $cse24 variable */));
- TRACE_POP
-}
-/*
- equation index: 1139
- type: SIMPLE_ASSIGN
- points[6]._K[1] = -6.800000000000001 * points[6].K[2] - -7.800000000000001
- */
-void Graph_eqFunction_1139(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1139};
- data->localData[0]->realVars[725] /* points[6]._K[1] variable */ = (-6.800000000000001) * (data->localData[0]->realVars[726] /* points[6]._K[2] variable */) - (-7.800000000000001);
- TRACE_POP
-}
-/*
- equation index: 1140
- type: SIMPLE_ASSIGN
- points[6]._gamma[1] = exp($cse21)
- */
-void Graph_eqFunction_1140(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1140};
- data->localData[0]->realVars[884] /* points[6]._gamma[1] variable */ = exp(data->localData[0]->realVars[74] /* $cse21 variable */);
- TRACE_POP
-}
-
-void residualFunc1142(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1142};
- /* iteration variables */
- data->localData[0]->realVars[205] /* T[6] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1121(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1122(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1123(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1124(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1125(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1126(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1127(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1128(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1129(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1130(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1131(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1132(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1133(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1134(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1135(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1136(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1137(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1138(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1139(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1140(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[884] /* points[6]._gamma[1] variable */) * (data->localData[0]->realVars[76] /* $cse23 variable */)) - data->localData[0]->realVars[725] /* points[6]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1142(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1142(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[6] */
- sysData->nominal[i] = data->modelData->realVarsData[205].attribute /* T[6] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[205].attribute /* T[6] */.min;
- sysData->max[i++] = data->modelData->realVarsData[205].attribute /* T[6] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1142(sysData);
-}
-
-void getIterationVarsNLS1142(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[205] /* T[6] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1147
- type: SIMPLE_ASSIGN
- $cse28 = Simulator.Files.ThermodynamicFunctions.Psat({points[7].comp[2].VP[1], points[7].comp[2].VP[2], points[7].comp[2].VP[3], points[7].comp[2].VP[4], points[7].comp[2].VP[5], points[7].comp[2].VP[6]}, T[7])
- */
-void Graph_eqFunction_1147(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1147};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11362], (modelica_real)data->simulationInfo->realParameter[11363], (modelica_real)data->simulationInfo->realParameter[11364], (modelica_real)data->simulationInfo->realParameter[11365], (modelica_real)data->simulationInfo->realParameter[11366], (modelica_real)data->simulationInfo->realParameter[11367]);
- data->localData[0]->realVars[81] /* $cse28 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[206] /* T[7] variable */);
- TRACE_POP
-}
-/*
- equation index: 1148
- type: SIMPLE_ASSIGN
- $cse27 = Simulator.Files.ThermodynamicFunctions.Psat({points[7].comp[1].VP[1], points[7].comp[1].VP[2], points[7].comp[1].VP[3], points[7].comp[1].VP[4], points[7].comp[1].VP[5], points[7].comp[1].VP[6]}, T[7])
- */
-void Graph_eqFunction_1148(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1148};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11356], (modelica_real)data->simulationInfo->realParameter[11357], (modelica_real)data->simulationInfo->realParameter[11358], (modelica_real)data->simulationInfo->realParameter[11359], (modelica_real)data->simulationInfo->realParameter[11360], (modelica_real)data->simulationInfo->realParameter[11361]);
- data->localData[0]->realVars[80] /* $cse27 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[206] /* T[7] variable */);
- TRACE_POP
-}
-/*
- equation index: 1149
- type: SIMPLE_ASSIGN
- points[7]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[7].BIP[1,1,1], T[7])
- */
-void Graph_eqFunction_1149(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1149};
- data->localData[0]->realVars[580] /* points[7]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[372],data->localData[0]->realVars[206] /* T[7] variable */,"T[7]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1150
- type: SIMPLE_ASSIGN
- points[7]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[7].BIP[1,2,1], T[7])
- */
-void Graph_eqFunction_1150(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1150};
- data->localData[0]->realVars[581] /* points[7]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[374],data->localData[0]->realVars[206] /* T[7] variable */,"T[7]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1151
- type: SIMPLE_ASSIGN
- points[7]._Gamma._G[1,2] = exp((-points[7].BIP[1,2,2]) * points[7].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1151(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1151};
- data->localData[0]->realVars[263] /* points[7]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[375])) * (data->localData[0]->realVars[581] /* points[7]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1152
- type: SIMPLE_ASSIGN
- points[7]._Gamma._G[1,1] = exp((-points[7].BIP[1,1,2]) * points[7].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1152(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1152};
- data->localData[0]->realVars[262] /* points[7]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[373])) * (data->localData[0]->realVars[580] /* points[7]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1153
- type: SIMPLE_ASSIGN
- points[7]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[7].BIP[2,1,1], T[7])
- */
-void Graph_eqFunction_1153(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1153};
- data->localData[0]->realVars[582] /* points[7]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[376],data->localData[0]->realVars[206] /* T[7] variable */,"T[7]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1154
- type: SIMPLE_ASSIGN
- points[7]._Gamma._G[2,1] = exp((-points[7].BIP[2,1,2]) * points[7].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1154(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1154};
- data->localData[0]->realVars[264] /* points[7]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[377])) * (data->localData[0]->realVars[582] /* points[7]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1155
- type: SIMPLE_ASSIGN
- points[7]._Gamma._sum2[1] = 0.1538461538461539 * points[7].Gamma.tau[1,1] * points[7].Gamma.G[1,1] + 0.8461538461538462 * points[7].Gamma.tau[2,1] * points[7].Gamma.G[2,1]
- */
-void Graph_eqFunction_1155(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1155};
- data->localData[0]->realVars[488] /* points[7]._Gamma._sum2[1] variable */ = (0.1538461538461539) * ((data->localData[0]->realVars[580] /* points[7]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[262] /* points[7]._Gamma._G[1,1] variable */)) + (0.8461538461538462) * ((data->localData[0]->realVars[582] /* points[7]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[264] /* points[7]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1156
- type: SIMPLE_ASSIGN
- points[7]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[7].BIP[2,2,1], T[7])
- */
-void Graph_eqFunction_1156(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1156};
- data->localData[0]->realVars[583] /* points[7]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[378],data->localData[0]->realVars[206] /* T[7] variable */,"T[7]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1157
- type: SIMPLE_ASSIGN
- points[7]._Gamma._G[2,2] = exp((-points[7].BIP[2,2,2]) * points[7].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1157(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1157};
- data->localData[0]->realVars[265] /* points[7]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[379])) * (data->localData[0]->realVars[583] /* points[7]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1158
- type: SIMPLE_ASSIGN
- points[7]._Gamma._sum2[2] = 0.1538461538461539 * points[7].Gamma.tau[1,2] * points[7].Gamma.G[1,2] + 0.8461538461538462 * points[7].Gamma.tau[2,2] * points[7].Gamma.G[2,2]
- */
-void Graph_eqFunction_1158(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1158};
- data->localData[0]->realVars[489] /* points[7]._Gamma._sum2[2] variable */ = (0.1538461538461539) * ((data->localData[0]->realVars[581] /* points[7]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[263] /* points[7]._Gamma._G[1,2] variable */)) + (0.8461538461538462) * ((data->localData[0]->realVars[583] /* points[7]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[265] /* points[7]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1159
- type: SIMPLE_ASSIGN
- points[7]._Gamma._sum1[2] = 0.1538461538461539 * points[7].Gamma.G[1,2] + 0.8461538461538462 * points[7].Gamma.G[2,2]
- */
-void Graph_eqFunction_1159(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1159};
- data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */ = (0.1538461538461539) * (data->localData[0]->realVars[263] /* points[7]._Gamma._G[1,2] variable */) + (0.8461538461538462) * (data->localData[0]->realVars[265] /* points[7]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1160
- type: SIMPLE_ASSIGN
- points[7]._Gamma._sum1[1] = 0.1538461538461539 * points[7].Gamma.G[1,1] + 0.8461538461538462 * points[7].Gamma.G[2,1]
- */
-void Graph_eqFunction_1160(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1160};
- data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */ = (0.1538461538461539) * (data->localData[0]->realVars[262] /* points[7]._Gamma._G[1,1] variable */) + (0.8461538461538462) * (data->localData[0]->realVars[264] /* points[7]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1161
- type: SIMPLE_ASSIGN
- $cse25 = DIVISION(points[7].Gamma.sum2[1], points[7].Gamma.sum1[1]) + 0.1538461538461539 * points[7].Gamma.G[1,1] * DIVISION(points[7].Gamma.tau[1,1] - DIVISION(points[7].Gamma.sum2[1], points[7].Gamma.sum1[1]), points[7].Gamma.sum1[1]) + 0.8461538461538462 * points[7].Gamma.G[1,2] * DIVISION(points[7].Gamma.tau[1,2] - DIVISION(points[7].Gamma.sum2[2], points[7].Gamma.sum1[2]), points[7].Gamma.sum1[2])
- */
-void Graph_eqFunction_1161(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1161};
- data->localData[0]->realVars[78] /* $cse25 variable */ = DIVISION_SIM(data->localData[0]->realVars[488] /* points[7]._Gamma._sum2[1] variable */,data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes) + (0.1538461538461539) * ((data->localData[0]->realVars[262] /* points[7]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[580] /* points[7]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[488] /* points[7]._Gamma._sum2[1] variable */,data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes))) + (0.8461538461538462) * ((data->localData[0]->realVars[263] /* points[7]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[581] /* points[7]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[489] /* points[7]._Gamma._sum2[2] variable */,data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1162
- type: SIMPLE_ASSIGN
- $cse26 = DIVISION(points[7].Gamma.sum2[2], points[7].Gamma.sum1[2]) + 0.1538461538461539 * points[7].Gamma.G[2,1] * DIVISION(points[7].Gamma.tau[2,1] - DIVISION(points[7].Gamma.sum2[1], points[7].Gamma.sum1[1]), points[7].Gamma.sum1[1]) + 0.8461538461538462 * points[7].Gamma.G[2,2] * DIVISION(points[7].Gamma.tau[2,2] - DIVISION(points[7].Gamma.sum2[2], points[7].Gamma.sum1[2]), points[7].Gamma.sum1[2])
- */
-void Graph_eqFunction_1162(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1162};
- data->localData[0]->realVars[79] /* $cse26 variable */ = DIVISION_SIM(data->localData[0]->realVars[489] /* points[7]._Gamma._sum2[2] variable */,data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes) + (0.1538461538461539) * ((data->localData[0]->realVars[264] /* points[7]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[582] /* points[7]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[488] /* points[7]._Gamma._sum2[1] variable */,data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[408] /* points[7]._Gamma._sum1[1] variable */,"points[7].Gamma.sum1[1]",equationIndexes))) + (0.8461538461538462) * ((data->localData[0]->realVars[265] /* points[7]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[583] /* points[7]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[489] /* points[7]._Gamma._sum2[2] variable */,data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[409] /* points[7]._Gamma._sum1[2] variable */,"points[7].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1163
- type: SIMPLE_ASSIGN
- points[7]._gamma[2] = exp($cse26)
- */
-void Graph_eqFunction_1163(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1163};
- data->localData[0]->realVars[887] /* points[7]._gamma[2] variable */ = exp(data->localData[0]->realVars[79] /* $cse26 variable */);
- TRACE_POP
-}
-/*
- equation index: 1164
- type: SIMPLE_ASSIGN
- points[7]._K[2] = 0.0001 * points[7].gamma[2] * $cse28
- */
-void Graph_eqFunction_1164(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1164};
- data->localData[0]->realVars[728] /* points[7]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[887] /* points[7]._gamma[2] variable */) * (data->localData[0]->realVars[81] /* $cse28 variable */));
- TRACE_POP
-}
-/*
- equation index: 1165
- type: SIMPLE_ASSIGN
- points[7]._K[1] = -5.5 * points[7].K[2] - -6.5
- */
-void Graph_eqFunction_1165(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1165};
- data->localData[0]->realVars[727] /* points[7]._K[1] variable */ = (-5.5) * (data->localData[0]->realVars[728] /* points[7]._K[2] variable */) - (-6.5);
- TRACE_POP
-}
-/*
- equation index: 1166
- type: SIMPLE_ASSIGN
- points[7]._gamma[1] = exp($cse25)
- */
-void Graph_eqFunction_1166(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1166};
- data->localData[0]->realVars[886] /* points[7]._gamma[1] variable */ = exp(data->localData[0]->realVars[78] /* $cse25 variable */);
- TRACE_POP
-}
-
-void residualFunc1168(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1168};
- /* iteration variables */
- data->localData[0]->realVars[206] /* T[7] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1147(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1148(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1149(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1150(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1151(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1152(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1153(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1154(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1155(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1156(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1157(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1158(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1159(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1160(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1161(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1162(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1163(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1164(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1165(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1166(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[886] /* points[7]._gamma[1] variable */) * (data->localData[0]->realVars[80] /* $cse27 variable */)) - data->localData[0]->realVars[727] /* points[7]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1168(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1168(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[7] */
- sysData->nominal[i] = data->modelData->realVarsData[206].attribute /* T[7] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[206].attribute /* T[7] */.min;
- sysData->max[i++] = data->modelData->realVarsData[206].attribute /* T[7] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1168(sysData);
-}
-
-void getIterationVarsNLS1168(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[206] /* T[7] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1173
- type: SIMPLE_ASSIGN
- $cse32 = Simulator.Files.ThermodynamicFunctions.Psat({points[8].comp[2].VP[1], points[8].comp[2].VP[2], points[8].comp[2].VP[3], points[8].comp[2].VP[4], points[8].comp[2].VP[5], points[8].comp[2].VP[6]}, T[8])
- */
-void Graph_eqFunction_1173(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1173};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11374], (modelica_real)data->simulationInfo->realParameter[11375], (modelica_real)data->simulationInfo->realParameter[11376], (modelica_real)data->simulationInfo->realParameter[11377], (modelica_real)data->simulationInfo->realParameter[11378], (modelica_real)data->simulationInfo->realParameter[11379]);
- data->localData[0]->realVars[86] /* $cse32 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[207] /* T[8] variable */);
- TRACE_POP
-}
-/*
- equation index: 1174
- type: SIMPLE_ASSIGN
- $cse31 = Simulator.Files.ThermodynamicFunctions.Psat({points[8].comp[1].VP[1], points[8].comp[1].VP[2], points[8].comp[1].VP[3], points[8].comp[1].VP[4], points[8].comp[1].VP[5], points[8].comp[1].VP[6]}, T[8])
- */
-void Graph_eqFunction_1174(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1174};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11368], (modelica_real)data->simulationInfo->realParameter[11369], (modelica_real)data->simulationInfo->realParameter[11370], (modelica_real)data->simulationInfo->realParameter[11371], (modelica_real)data->simulationInfo->realParameter[11372], (modelica_real)data->simulationInfo->realParameter[11373]);
- data->localData[0]->realVars[85] /* $cse31 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[207] /* T[8] variable */);
- TRACE_POP
-}
-/*
- equation index: 1175
- type: SIMPLE_ASSIGN
- points[8]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[8].BIP[1,1,1], T[8])
- */
-void Graph_eqFunction_1175(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1175};
- data->localData[0]->realVars[584] /* points[8]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[380],data->localData[0]->realVars[207] /* T[8] variable */,"T[8]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1176
- type: SIMPLE_ASSIGN
- points[8]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[8].BIP[2,2,1], T[8])
- */
-void Graph_eqFunction_1176(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1176};
- data->localData[0]->realVars[587] /* points[8]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[386],data->localData[0]->realVars[207] /* T[8] variable */,"T[8]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1177
- type: SIMPLE_ASSIGN
- points[8]._Gamma._G[2,2] = exp((-points[8].BIP[2,2,2]) * points[8].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1177(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1177};
- data->localData[0]->realVars[269] /* points[8]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[387])) * (data->localData[0]->realVars[587] /* points[8]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1178
- type: SIMPLE_ASSIGN
- points[8]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[8].BIP[1,2,1], T[8])
- */
-void Graph_eqFunction_1178(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1178};
- data->localData[0]->realVars[585] /* points[8]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[382],data->localData[0]->realVars[207] /* T[8] variable */,"T[8]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1179
- type: SIMPLE_ASSIGN
- points[8]._Gamma._G[1,2] = exp((-points[8].BIP[1,2,2]) * points[8].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1179(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1179};
- data->localData[0]->realVars[267] /* points[8]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[383])) * (data->localData[0]->realVars[585] /* points[8]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1180
- type: SIMPLE_ASSIGN
- points[8]._Gamma._sum2[2] = 0.1794871794871795 * points[8].Gamma.tau[1,2] * points[8].Gamma.G[1,2] + 0.8205128205128205 * points[8].Gamma.tau[2,2] * points[8].Gamma.G[2,2]
- */
-void Graph_eqFunction_1180(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1180};
- data->localData[0]->realVars[491] /* points[8]._Gamma._sum2[2] variable */ = (0.1794871794871795) * ((data->localData[0]->realVars[585] /* points[8]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[267] /* points[8]._Gamma._G[1,2] variable */)) + (0.8205128205128205) * ((data->localData[0]->realVars[587] /* points[8]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[269] /* points[8]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1181
- type: SIMPLE_ASSIGN
- points[8]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[8].BIP[2,1,1], T[8])
- */
-void Graph_eqFunction_1181(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1181};
- data->localData[0]->realVars[586] /* points[8]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[384],data->localData[0]->realVars[207] /* T[8] variable */,"T[8]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1182
- type: SIMPLE_ASSIGN
- points[8]._Gamma._G[2,1] = exp((-points[8].BIP[2,1,2]) * points[8].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1182(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1182};
- data->localData[0]->realVars[268] /* points[8]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[385])) * (data->localData[0]->realVars[586] /* points[8]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1183
- type: SIMPLE_ASSIGN
- points[8]._Gamma._G[1,1] = exp((-points[8].BIP[1,1,2]) * points[8].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1183(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1183};
- data->localData[0]->realVars[266] /* points[8]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[381])) * (data->localData[0]->realVars[584] /* points[8]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1184
- type: SIMPLE_ASSIGN
- points[8]._Gamma._sum2[1] = 0.1794871794871795 * points[8].Gamma.tau[1,1] * points[8].Gamma.G[1,1] + 0.8205128205128205 * points[8].Gamma.tau[2,1] * points[8].Gamma.G[2,1]
- */
-void Graph_eqFunction_1184(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1184};
- data->localData[0]->realVars[490] /* points[8]._Gamma._sum2[1] variable */ = (0.1794871794871795) * ((data->localData[0]->realVars[584] /* points[8]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[266] /* points[8]._Gamma._G[1,1] variable */)) + (0.8205128205128205) * ((data->localData[0]->realVars[586] /* points[8]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[268] /* points[8]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1185
- type: SIMPLE_ASSIGN
- points[8]._Gamma._sum1[2] = 0.1794871794871795 * points[8].Gamma.G[1,2] + 0.8205128205128205 * points[8].Gamma.G[2,2]
- */
-void Graph_eqFunction_1185(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1185};
- data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */ = (0.1794871794871795) * (data->localData[0]->realVars[267] /* points[8]._Gamma._G[1,2] variable */) + (0.8205128205128205) * (data->localData[0]->realVars[269] /* points[8]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1186
- type: SIMPLE_ASSIGN
- points[8]._Gamma._sum1[1] = 0.1794871794871795 * points[8].Gamma.G[1,1] + 0.8205128205128205 * points[8].Gamma.G[2,1]
- */
-void Graph_eqFunction_1186(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1186};
- data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */ = (0.1794871794871795) * (data->localData[0]->realVars[266] /* points[8]._Gamma._G[1,1] variable */) + (0.8205128205128205) * (data->localData[0]->realVars[268] /* points[8]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1187
- type: SIMPLE_ASSIGN
- $cse30 = DIVISION(points[8].Gamma.sum2[2], points[8].Gamma.sum1[2]) + 0.1794871794871795 * points[8].Gamma.G[2,1] * DIVISION(points[8].Gamma.tau[2,1] - DIVISION(points[8].Gamma.sum2[1], points[8].Gamma.sum1[1]), points[8].Gamma.sum1[1]) + 0.8205128205128205 * points[8].Gamma.G[2,2] * DIVISION(points[8].Gamma.tau[2,2] - DIVISION(points[8].Gamma.sum2[2], points[8].Gamma.sum1[2]), points[8].Gamma.sum1[2])
- */
-void Graph_eqFunction_1187(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1187};
- data->localData[0]->realVars[84] /* $cse30 variable */ = DIVISION_SIM(data->localData[0]->realVars[491] /* points[8]._Gamma._sum2[2] variable */,data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes) + (0.1794871794871795) * ((data->localData[0]->realVars[268] /* points[8]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[586] /* points[8]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[490] /* points[8]._Gamma._sum2[1] variable */,data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes))) + (0.8205128205128205) * ((data->localData[0]->realVars[269] /* points[8]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[587] /* points[8]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[491] /* points[8]._Gamma._sum2[2] variable */,data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1188
- type: SIMPLE_ASSIGN
- $cse29 = DIVISION(points[8].Gamma.sum2[1], points[8].Gamma.sum1[1]) + 0.1794871794871795 * points[8].Gamma.G[1,1] * DIVISION(points[8].Gamma.tau[1,1] - DIVISION(points[8].Gamma.sum2[1], points[8].Gamma.sum1[1]), points[8].Gamma.sum1[1]) + 0.8205128205128205 * points[8].Gamma.G[1,2] * DIVISION(points[8].Gamma.tau[1,2] - DIVISION(points[8].Gamma.sum2[2], points[8].Gamma.sum1[2]), points[8].Gamma.sum1[2])
- */
-void Graph_eqFunction_1188(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1188};
- data->localData[0]->realVars[82] /* $cse29 variable */ = DIVISION_SIM(data->localData[0]->realVars[490] /* points[8]._Gamma._sum2[1] variable */,data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes) + (0.1794871794871795) * ((data->localData[0]->realVars[266] /* points[8]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[584] /* points[8]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[490] /* points[8]._Gamma._sum2[1] variable */,data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[410] /* points[8]._Gamma._sum1[1] variable */,"points[8].Gamma.sum1[1]",equationIndexes))) + (0.8205128205128205) * ((data->localData[0]->realVars[267] /* points[8]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[585] /* points[8]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[491] /* points[8]._Gamma._sum2[2] variable */,data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[411] /* points[8]._Gamma._sum1[2] variable */,"points[8].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1189
- type: SIMPLE_ASSIGN
- points[8]._gamma[1] = exp($cse29)
- */
-void Graph_eqFunction_1189(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1189};
- data->localData[0]->realVars[888] /* points[8]._gamma[1] variable */ = exp(data->localData[0]->realVars[82] /* $cse29 variable */);
- TRACE_POP
-}
-/*
- equation index: 1190
- type: SIMPLE_ASSIGN
- points[8]._K[1] = 0.0001 * points[8].gamma[1] * $cse31
- */
-void Graph_eqFunction_1190(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1190};
- data->localData[0]->realVars[729] /* points[8]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[888] /* points[8]._gamma[1] variable */) * (data->localData[0]->realVars[85] /* $cse31 variable */));
- TRACE_POP
-}
-/*
- equation index: 1191
- type: SIMPLE_ASSIGN
- points[8]._K[2] = -0.21875 * points[8].K[1] - -1.21875
- */
-void Graph_eqFunction_1191(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1191};
- data->localData[0]->realVars[730] /* points[8]._K[2] variable */ = (-0.21875) * (data->localData[0]->realVars[729] /* points[8]._K[1] variable */) - (-1.21875);
- TRACE_POP
-}
-/*
- equation index: 1192
- type: SIMPLE_ASSIGN
- points[8]._gamma[2] = exp($cse30)
- */
-void Graph_eqFunction_1192(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1192};
- data->localData[0]->realVars[889] /* points[8]._gamma[2] variable */ = exp(data->localData[0]->realVars[84] /* $cse30 variable */);
- TRACE_POP
-}
-
-void residualFunc1194(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1194};
- /* iteration variables */
- data->localData[0]->realVars[207] /* T[8] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1173(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1174(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1175(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1176(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1177(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1178(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1179(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1180(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1181(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1182(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1183(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1184(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1185(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1186(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1187(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1188(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1189(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1190(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1191(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1192(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[889] /* points[8]._gamma[2] variable */) * (data->localData[0]->realVars[86] /* $cse32 variable */)) - data->localData[0]->realVars[730] /* points[8]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1194(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1194(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[8] */
- sysData->nominal[i] = data->modelData->realVarsData[207].attribute /* T[8] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[207].attribute /* T[8] */.min;
- sysData->max[i++] = data->modelData->realVarsData[207].attribute /* T[8] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1194(sysData);
-}
-
-void getIterationVarsNLS1194(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[207] /* T[8] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1199
- type: SIMPLE_ASSIGN
- $cse36 = Simulator.Files.ThermodynamicFunctions.Psat({points[9].comp[2].VP[1], points[9].comp[2].VP[2], points[9].comp[2].VP[3], points[9].comp[2].VP[4], points[9].comp[2].VP[5], points[9].comp[2].VP[6]}, T[9])
- */
-void Graph_eqFunction_1199(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1199};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11386], (modelica_real)data->simulationInfo->realParameter[11387], (modelica_real)data->simulationInfo->realParameter[11388], (modelica_real)data->simulationInfo->realParameter[11389], (modelica_real)data->simulationInfo->realParameter[11390], (modelica_real)data->simulationInfo->realParameter[11391]);
- data->localData[0]->realVars[90] /* $cse36 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[208] /* T[9] variable */);
- TRACE_POP
-}
-/*
- equation index: 1200
- type: SIMPLE_ASSIGN
- $cse35 = Simulator.Files.ThermodynamicFunctions.Psat({points[9].comp[1].VP[1], points[9].comp[1].VP[2], points[9].comp[1].VP[3], points[9].comp[1].VP[4], points[9].comp[1].VP[5], points[9].comp[1].VP[6]}, T[9])
- */
-void Graph_eqFunction_1200(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1200};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11380], (modelica_real)data->simulationInfo->realParameter[11381], (modelica_real)data->simulationInfo->realParameter[11382], (modelica_real)data->simulationInfo->realParameter[11383], (modelica_real)data->simulationInfo->realParameter[11384], (modelica_real)data->simulationInfo->realParameter[11385]);
- data->localData[0]->realVars[89] /* $cse35 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[208] /* T[9] variable */);
- TRACE_POP
-}
-/*
- equation index: 1201
- type: SIMPLE_ASSIGN
- points[9]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[9].BIP[1,1,1], T[9])
- */
-void Graph_eqFunction_1201(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1201};
- data->localData[0]->realVars[588] /* points[9]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[388],data->localData[0]->realVars[208] /* T[9] variable */,"T[9]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1202
- type: SIMPLE_ASSIGN
- points[9]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[9].BIP[2,1,1], T[9])
- */
-void Graph_eqFunction_1202(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1202};
- data->localData[0]->realVars[590] /* points[9]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[392],data->localData[0]->realVars[208] /* T[9] variable */,"T[9]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1203
- type: SIMPLE_ASSIGN
- points[9]._Gamma._G[2,1] = exp((-points[9].BIP[2,1,2]) * points[9].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1203(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1203};
- data->localData[0]->realVars[272] /* points[9]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[393])) * (data->localData[0]->realVars[590] /* points[9]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1204
- type: SIMPLE_ASSIGN
- points[9]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[9].BIP[1,2,1], T[9])
- */
-void Graph_eqFunction_1204(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1204};
- data->localData[0]->realVars[589] /* points[9]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[390],data->localData[0]->realVars[208] /* T[9] variable */,"T[9]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1205
- type: SIMPLE_ASSIGN
- points[9]._Gamma._G[1,2] = exp((-points[9].BIP[1,2,2]) * points[9].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1205(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1205};
- data->localData[0]->realVars[271] /* points[9]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[391])) * (data->localData[0]->realVars[589] /* points[9]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1206
- type: SIMPLE_ASSIGN
- points[9]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[9].BIP[2,2,1], T[9])
- */
-void Graph_eqFunction_1206(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1206};
- data->localData[0]->realVars[591] /* points[9]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[394],data->localData[0]->realVars[208] /* T[9] variable */,"T[9]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1207
- type: SIMPLE_ASSIGN
- points[9]._Gamma._G[2,2] = exp((-points[9].BIP[2,2,2]) * points[9].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1207(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1207};
- data->localData[0]->realVars[273] /* points[9]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[395])) * (data->localData[0]->realVars[591] /* points[9]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1208
- type: SIMPLE_ASSIGN
- points[9]._Gamma._sum2[2] = 0.2051282051282051 * points[9].Gamma.tau[1,2] * points[9].Gamma.G[1,2] + 0.7948717948717949 * points[9].Gamma.tau[2,2] * points[9].Gamma.G[2,2]
- */
-void Graph_eqFunction_1208(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1208};
- data->localData[0]->realVars[493] /* points[9]._Gamma._sum2[2] variable */ = (0.2051282051282051) * ((data->localData[0]->realVars[589] /* points[9]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[271] /* points[9]._Gamma._G[1,2] variable */)) + (0.7948717948717949) * ((data->localData[0]->realVars[591] /* points[9]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[273] /* points[9]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1209
- type: SIMPLE_ASSIGN
- points[9]._Gamma._G[1,1] = exp((-points[9].BIP[1,1,2]) * points[9].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1209(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1209};
- data->localData[0]->realVars[270] /* points[9]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[389])) * (data->localData[0]->realVars[588] /* points[9]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1210
- type: SIMPLE_ASSIGN
- points[9]._Gamma._sum2[1] = 0.2051282051282051 * points[9].Gamma.tau[1,1] * points[9].Gamma.G[1,1] + 0.7948717948717949 * points[9].Gamma.tau[2,1] * points[9].Gamma.G[2,1]
- */
-void Graph_eqFunction_1210(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1210};
- data->localData[0]->realVars[492] /* points[9]._Gamma._sum2[1] variable */ = (0.2051282051282051) * ((data->localData[0]->realVars[588] /* points[9]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[270] /* points[9]._Gamma._G[1,1] variable */)) + (0.7948717948717949) * ((data->localData[0]->realVars[590] /* points[9]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[272] /* points[9]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1211
- type: SIMPLE_ASSIGN
- points[9]._Gamma._sum1[2] = 0.2051282051282051 * points[9].Gamma.G[1,2] + 0.7948717948717949 * points[9].Gamma.G[2,2]
- */
-void Graph_eqFunction_1211(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1211};
- data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */ = (0.2051282051282051) * (data->localData[0]->realVars[271] /* points[9]._Gamma._G[1,2] variable */) + (0.7948717948717949) * (data->localData[0]->realVars[273] /* points[9]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1212
- type: SIMPLE_ASSIGN
- points[9]._Gamma._sum1[1] = 0.2051282051282051 * points[9].Gamma.G[1,1] + 0.7948717948717949 * points[9].Gamma.G[2,1]
- */
-void Graph_eqFunction_1212(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1212};
- data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */ = (0.2051282051282051) * (data->localData[0]->realVars[270] /* points[9]._Gamma._G[1,1] variable */) + (0.7948717948717949) * (data->localData[0]->realVars[272] /* points[9]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1213
- type: SIMPLE_ASSIGN
- $cse34 = DIVISION(points[9].Gamma.sum2[2], points[9].Gamma.sum1[2]) + 0.2051282051282051 * points[9].Gamma.G[2,1] * DIVISION(points[9].Gamma.tau[2,1] - DIVISION(points[9].Gamma.sum2[1], points[9].Gamma.sum1[1]), points[9].Gamma.sum1[1]) + 0.7948717948717949 * points[9].Gamma.G[2,2] * DIVISION(points[9].Gamma.tau[2,2] - DIVISION(points[9].Gamma.sum2[2], points[9].Gamma.sum1[2]), points[9].Gamma.sum1[2])
- */
-void Graph_eqFunction_1213(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1213};
- data->localData[0]->realVars[88] /* $cse34 variable */ = DIVISION_SIM(data->localData[0]->realVars[493] /* points[9]._Gamma._sum2[2] variable */,data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes) + (0.2051282051282051) * ((data->localData[0]->realVars[272] /* points[9]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[590] /* points[9]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[492] /* points[9]._Gamma._sum2[1] variable */,data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes))) + (0.7948717948717949) * ((data->localData[0]->realVars[273] /* points[9]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[591] /* points[9]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[493] /* points[9]._Gamma._sum2[2] variable */,data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1214
- type: SIMPLE_ASSIGN
- $cse33 = DIVISION(points[9].Gamma.sum2[1], points[9].Gamma.sum1[1]) + 0.2051282051282051 * points[9].Gamma.G[1,1] * DIVISION(points[9].Gamma.tau[1,1] - DIVISION(points[9].Gamma.sum2[1], points[9].Gamma.sum1[1]), points[9].Gamma.sum1[1]) + 0.7948717948717949 * points[9].Gamma.G[1,2] * DIVISION(points[9].Gamma.tau[1,2] - DIVISION(points[9].Gamma.sum2[2], points[9].Gamma.sum1[2]), points[9].Gamma.sum1[2])
- */
-void Graph_eqFunction_1214(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1214};
- data->localData[0]->realVars[87] /* $cse33 variable */ = DIVISION_SIM(data->localData[0]->realVars[492] /* points[9]._Gamma._sum2[1] variable */,data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes) + (0.2051282051282051) * ((data->localData[0]->realVars[270] /* points[9]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[588] /* points[9]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[492] /* points[9]._Gamma._sum2[1] variable */,data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[412] /* points[9]._Gamma._sum1[1] variable */,"points[9].Gamma.sum1[1]",equationIndexes))) + (0.7948717948717949) * ((data->localData[0]->realVars[271] /* points[9]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[589] /* points[9]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[493] /* points[9]._Gamma._sum2[2] variable */,data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[413] /* points[9]._Gamma._sum1[2] variable */,"points[9].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1215
- type: SIMPLE_ASSIGN
- points[9]._gamma[1] = exp($cse33)
- */
-void Graph_eqFunction_1215(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1215};
- data->localData[0]->realVars[890] /* points[9]._gamma[1] variable */ = exp(data->localData[0]->realVars[87] /* $cse33 variable */);
- TRACE_POP
-}
-/*
- equation index: 1216
- type: SIMPLE_ASSIGN
- points[9]._K[1] = 0.0001 * points[9].gamma[1] * $cse35
- */
-void Graph_eqFunction_1216(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1216};
- data->localData[0]->realVars[731] /* points[9]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[890] /* points[9]._gamma[1] variable */) * (data->localData[0]->realVars[89] /* $cse35 variable */));
- TRACE_POP
-}
-/*
- equation index: 1217
- type: SIMPLE_ASSIGN
- points[9]._K[2] = -0.2580645161290323 * points[9].K[1] - -1.258064516129032
- */
-void Graph_eqFunction_1217(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1217};
- data->localData[0]->realVars[732] /* points[9]._K[2] variable */ = (-0.2580645161290323) * (data->localData[0]->realVars[731] /* points[9]._K[1] variable */) - (-1.258064516129032);
- TRACE_POP
-}
-/*
- equation index: 1218
- type: SIMPLE_ASSIGN
- points[9]._gamma[2] = exp($cse34)
- */
-void Graph_eqFunction_1218(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1218};
- data->localData[0]->realVars[891] /* points[9]._gamma[2] variable */ = exp(data->localData[0]->realVars[88] /* $cse34 variable */);
- TRACE_POP
-}
-
-void residualFunc1220(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1220};
- /* iteration variables */
- data->localData[0]->realVars[208] /* T[9] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1199(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1200(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1201(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1202(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1203(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1204(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1205(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1206(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1207(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1208(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1209(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1210(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1211(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1212(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1213(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1214(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1215(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1216(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1217(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1218(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[891] /* points[9]._gamma[2] variable */) * (data->localData[0]->realVars[90] /* $cse36 variable */)) - data->localData[0]->realVars[732] /* points[9]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1220(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1220(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[9] */
- sysData->nominal[i] = data->modelData->realVarsData[208].attribute /* T[9] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[208].attribute /* T[9] */.min;
- sysData->max[i++] = data->modelData->realVarsData[208].attribute /* T[9] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1220(sysData);
-}
-
-void getIterationVarsNLS1220(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[208] /* T[9] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1225
- type: SIMPLE_ASSIGN
- $cse39 = Simulator.Files.ThermodynamicFunctions.Psat({points[10].comp[1].VP[1], points[10].comp[1].VP[2], points[10].comp[1].VP[3], points[10].comp[1].VP[4], points[10].comp[1].VP[5], points[10].comp[1].VP[6]}, T[10])
- */
-void Graph_eqFunction_1225(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1225};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11392], (modelica_real)data->simulationInfo->realParameter[11393], (modelica_real)data->simulationInfo->realParameter[11394], (modelica_real)data->simulationInfo->realParameter[11395], (modelica_real)data->simulationInfo->realParameter[11396], (modelica_real)data->simulationInfo->realParameter[11397]);
- data->localData[0]->realVars[93] /* $cse39 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[209] /* T[10] variable */);
- TRACE_POP
-}
-/*
- equation index: 1226
- type: SIMPLE_ASSIGN
- $cse40 = Simulator.Files.ThermodynamicFunctions.Psat({points[10].comp[2].VP[1], points[10].comp[2].VP[2], points[10].comp[2].VP[3], points[10].comp[2].VP[4], points[10].comp[2].VP[5], points[10].comp[2].VP[6]}, T[10])
- */
-void Graph_eqFunction_1226(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1226};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11398], (modelica_real)data->simulationInfo->realParameter[11399], (modelica_real)data->simulationInfo->realParameter[11400], (modelica_real)data->simulationInfo->realParameter[11401], (modelica_real)data->simulationInfo->realParameter[11402], (modelica_real)data->simulationInfo->realParameter[11403]);
- data->localData[0]->realVars[95] /* $cse40 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[209] /* T[10] variable */);
- TRACE_POP
-}
-/*
- equation index: 1227
- type: SIMPLE_ASSIGN
- points[10]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[10].BIP[1,1,1], T[10])
- */
-void Graph_eqFunction_1227(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1227};
- data->localData[0]->realVars[592] /* points[10]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[396],data->localData[0]->realVars[209] /* T[10] variable */,"T[10]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1228
- type: SIMPLE_ASSIGN
- points[10]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[10].BIP[2,2,1], T[10])
- */
-void Graph_eqFunction_1228(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1228};
- data->localData[0]->realVars[595] /* points[10]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[402],data->localData[0]->realVars[209] /* T[10] variable */,"T[10]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1229
- type: SIMPLE_ASSIGN
- points[10]._Gamma._G[2,2] = exp((-points[10].BIP[2,2,2]) * points[10].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1229(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1229};
- data->localData[0]->realVars[277] /* points[10]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[403])) * (data->localData[0]->realVars[595] /* points[10]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1230
- type: SIMPLE_ASSIGN
- points[10]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[10].BIP[1,2,1], T[10])
- */
-void Graph_eqFunction_1230(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1230};
- data->localData[0]->realVars[593] /* points[10]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[398],data->localData[0]->realVars[209] /* T[10] variable */,"T[10]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1231
- type: SIMPLE_ASSIGN
- points[10]._Gamma._G[1,2] = exp((-points[10].BIP[1,2,2]) * points[10].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1231(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1231};
- data->localData[0]->realVars[275] /* points[10]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[399])) * (data->localData[0]->realVars[593] /* points[10]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1232
- type: SIMPLE_ASSIGN
- points[10]._Gamma._sum2[2] = 0.2307692307692308 * points[10].Gamma.tau[1,2] * points[10].Gamma.G[1,2] + 0.7692307692307692 * points[10].Gamma.tau[2,2] * points[10].Gamma.G[2,2]
- */
-void Graph_eqFunction_1232(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1232};
- data->localData[0]->realVars[495] /* points[10]._Gamma._sum2[2] variable */ = (0.2307692307692308) * ((data->localData[0]->realVars[593] /* points[10]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[275] /* points[10]._Gamma._G[1,2] variable */)) + (0.7692307692307692) * ((data->localData[0]->realVars[595] /* points[10]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[277] /* points[10]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1233
- type: SIMPLE_ASSIGN
- points[10]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[10].BIP[2,1,1], T[10])
- */
-void Graph_eqFunction_1233(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1233};
- data->localData[0]->realVars[594] /* points[10]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[400],data->localData[0]->realVars[209] /* T[10] variable */,"T[10]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1234
- type: SIMPLE_ASSIGN
- points[10]._Gamma._G[2,1] = exp((-points[10].BIP[2,1,2]) * points[10].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1234(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1234};
- data->localData[0]->realVars[276] /* points[10]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[401])) * (data->localData[0]->realVars[594] /* points[10]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1235
- type: SIMPLE_ASSIGN
- points[10]._Gamma._G[1,1] = exp((-points[10].BIP[1,1,2]) * points[10].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1235(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1235};
- data->localData[0]->realVars[274] /* points[10]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[397])) * (data->localData[0]->realVars[592] /* points[10]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1236
- type: SIMPLE_ASSIGN
- points[10]._Gamma._sum2[1] = 0.2307692307692308 * points[10].Gamma.tau[1,1] * points[10].Gamma.G[1,1] + 0.7692307692307692 * points[10].Gamma.tau[2,1] * points[10].Gamma.G[2,1]
- */
-void Graph_eqFunction_1236(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1236};
- data->localData[0]->realVars[494] /* points[10]._Gamma._sum2[1] variable */ = (0.2307692307692308) * ((data->localData[0]->realVars[592] /* points[10]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[274] /* points[10]._Gamma._G[1,1] variable */)) + (0.7692307692307692) * ((data->localData[0]->realVars[594] /* points[10]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[276] /* points[10]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1237
- type: SIMPLE_ASSIGN
- points[10]._Gamma._sum1[2] = 0.2307692307692308 * points[10].Gamma.G[1,2] + 0.7692307692307692 * points[10].Gamma.G[2,2]
- */
-void Graph_eqFunction_1237(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1237};
- data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */ = (0.2307692307692308) * (data->localData[0]->realVars[275] /* points[10]._Gamma._G[1,2] variable */) + (0.7692307692307692) * (data->localData[0]->realVars[277] /* points[10]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1238
- type: SIMPLE_ASSIGN
- points[10]._Gamma._sum1[1] = 0.2307692307692308 * points[10].Gamma.G[1,1] + 0.7692307692307692 * points[10].Gamma.G[2,1]
- */
-void Graph_eqFunction_1238(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1238};
- data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */ = (0.2307692307692308) * (data->localData[0]->realVars[274] /* points[10]._Gamma._G[1,1] variable */) + (0.7692307692307692) * (data->localData[0]->realVars[276] /* points[10]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1239
- type: SIMPLE_ASSIGN
- $cse38 = DIVISION(points[10].Gamma.sum2[2], points[10].Gamma.sum1[2]) + 0.2307692307692308 * points[10].Gamma.G[2,1] * DIVISION(points[10].Gamma.tau[2,1] - DIVISION(points[10].Gamma.sum2[1], points[10].Gamma.sum1[1]), points[10].Gamma.sum1[1]) + 0.7692307692307692 * points[10].Gamma.G[2,2] * DIVISION(points[10].Gamma.tau[2,2] - DIVISION(points[10].Gamma.sum2[2], points[10].Gamma.sum1[2]), points[10].Gamma.sum1[2])
- */
-void Graph_eqFunction_1239(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1239};
- data->localData[0]->realVars[92] /* $cse38 variable */ = DIVISION_SIM(data->localData[0]->realVars[495] /* points[10]._Gamma._sum2[2] variable */,data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes) + (0.2307692307692308) * ((data->localData[0]->realVars[276] /* points[10]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[594] /* points[10]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[494] /* points[10]._Gamma._sum2[1] variable */,data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes))) + (0.7692307692307692) * ((data->localData[0]->realVars[277] /* points[10]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[595] /* points[10]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[495] /* points[10]._Gamma._sum2[2] variable */,data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1240
- type: SIMPLE_ASSIGN
- $cse37 = DIVISION(points[10].Gamma.sum2[1], points[10].Gamma.sum1[1]) + 0.2307692307692308 * points[10].Gamma.G[1,1] * DIVISION(points[10].Gamma.tau[1,1] - DIVISION(points[10].Gamma.sum2[1], points[10].Gamma.sum1[1]), points[10].Gamma.sum1[1]) + 0.7692307692307692 * points[10].Gamma.G[1,2] * DIVISION(points[10].Gamma.tau[1,2] - DIVISION(points[10].Gamma.sum2[2], points[10].Gamma.sum1[2]), points[10].Gamma.sum1[2])
- */
-void Graph_eqFunction_1240(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1240};
- data->localData[0]->realVars[91] /* $cse37 variable */ = DIVISION_SIM(data->localData[0]->realVars[494] /* points[10]._Gamma._sum2[1] variable */,data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes) + (0.2307692307692308) * ((data->localData[0]->realVars[274] /* points[10]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[592] /* points[10]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[494] /* points[10]._Gamma._sum2[1] variable */,data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[414] /* points[10]._Gamma._sum1[1] variable */,"points[10].Gamma.sum1[1]",equationIndexes))) + (0.7692307692307692) * ((data->localData[0]->realVars[275] /* points[10]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[593] /* points[10]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[495] /* points[10]._Gamma._sum2[2] variable */,data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[415] /* points[10]._Gamma._sum1[2] variable */,"points[10].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1241
- type: SIMPLE_ASSIGN
- points[10]._gamma[1] = exp($cse37)
- */
-void Graph_eqFunction_1241(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1241};
- data->localData[0]->realVars[892] /* points[10]._gamma[1] variable */ = exp(data->localData[0]->realVars[91] /* $cse37 variable */);
- TRACE_POP
-}
-/*
- equation index: 1242
- type: SIMPLE_ASSIGN
- points[10]._K[1] = 0.0001 * points[10].gamma[1] * $cse39
- */
-void Graph_eqFunction_1242(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1242};
- data->localData[0]->realVars[733] /* points[10]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[892] /* points[10]._gamma[1] variable */) * (data->localData[0]->realVars[93] /* $cse39 variable */));
- TRACE_POP
-}
-/*
- equation index: 1243
- type: SIMPLE_ASSIGN
- points[10]._K[2] = -0.3 * points[10].K[1] - -1.3
- */
-void Graph_eqFunction_1243(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1243};
- data->localData[0]->realVars[734] /* points[10]._K[2] variable */ = (-0.3) * (data->localData[0]->realVars[733] /* points[10]._K[1] variable */) - (-1.3);
- TRACE_POP
-}
-/*
- equation index: 1244
- type: SIMPLE_ASSIGN
- points[10]._gamma[2] = exp($cse38)
- */
-void Graph_eqFunction_1244(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1244};
- data->localData[0]->realVars[893] /* points[10]._gamma[2] variable */ = exp(data->localData[0]->realVars[92] /* $cse38 variable */);
- TRACE_POP
-}
-
-void residualFunc1246(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1246};
- /* iteration variables */
- data->localData[0]->realVars[209] /* T[10] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1225(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1226(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1227(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1228(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1229(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1230(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1231(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1232(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1233(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1234(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1235(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1236(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1237(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1238(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1239(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1240(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1241(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1242(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1243(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1244(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[893] /* points[10]._gamma[2] variable */) * (data->localData[0]->realVars[95] /* $cse40 variable */)) - data->localData[0]->realVars[734] /* points[10]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1246(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1246(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[10] */
- sysData->nominal[i] = data->modelData->realVarsData[209].attribute /* T[10] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[209].attribute /* T[10] */.min;
- sysData->max[i++] = data->modelData->realVarsData[209].attribute /* T[10] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1246(sysData);
-}
-
-void getIterationVarsNLS1246(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[209] /* T[10] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1251
- type: SIMPLE_ASSIGN
- $cse44 = Simulator.Files.ThermodynamicFunctions.Psat({points[11].comp[2].VP[1], points[11].comp[2].VP[2], points[11].comp[2].VP[3], points[11].comp[2].VP[4], points[11].comp[2].VP[5], points[11].comp[2].VP[6]}, T[11])
- */
-void Graph_eqFunction_1251(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1251};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11410], (modelica_real)data->simulationInfo->realParameter[11411], (modelica_real)data->simulationInfo->realParameter[11412], (modelica_real)data->simulationInfo->realParameter[11413], (modelica_real)data->simulationInfo->realParameter[11414], (modelica_real)data->simulationInfo->realParameter[11415]);
- data->localData[0]->realVars[99] /* $cse44 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[210] /* T[11] variable */);
- TRACE_POP
-}
-/*
- equation index: 1252
- type: SIMPLE_ASSIGN
- $cse43 = Simulator.Files.ThermodynamicFunctions.Psat({points[11].comp[1].VP[1], points[11].comp[1].VP[2], points[11].comp[1].VP[3], points[11].comp[1].VP[4], points[11].comp[1].VP[5], points[11].comp[1].VP[6]}, T[11])
- */
-void Graph_eqFunction_1252(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1252};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11404], (modelica_real)data->simulationInfo->realParameter[11405], (modelica_real)data->simulationInfo->realParameter[11406], (modelica_real)data->simulationInfo->realParameter[11407], (modelica_real)data->simulationInfo->realParameter[11408], (modelica_real)data->simulationInfo->realParameter[11409]);
- data->localData[0]->realVars[98] /* $cse43 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[210] /* T[11] variable */);
- TRACE_POP
-}
-/*
- equation index: 1253
- type: SIMPLE_ASSIGN
- points[11]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[11].BIP[1,1,1], T[11])
- */
-void Graph_eqFunction_1253(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1253};
- data->localData[0]->realVars[596] /* points[11]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[404],data->localData[0]->realVars[210] /* T[11] variable */,"T[11]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1254
- type: SIMPLE_ASSIGN
- points[11]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[11].BIP[1,2,1], T[11])
- */
-void Graph_eqFunction_1254(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1254};
- data->localData[0]->realVars[597] /* points[11]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[406],data->localData[0]->realVars[210] /* T[11] variable */,"T[11]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1255
- type: SIMPLE_ASSIGN
- points[11]._Gamma._G[1,2] = exp((-points[11].BIP[1,2,2]) * points[11].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1255(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1255};
- data->localData[0]->realVars[279] /* points[11]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[407])) * (data->localData[0]->realVars[597] /* points[11]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1256
- type: SIMPLE_ASSIGN
- points[11]._Gamma._G[1,1] = exp((-points[11].BIP[1,1,2]) * points[11].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1256(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1256};
- data->localData[0]->realVars[278] /* points[11]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[405])) * (data->localData[0]->realVars[596] /* points[11]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1257
- type: SIMPLE_ASSIGN
- points[11]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[11].BIP[2,1,1], T[11])
- */
-void Graph_eqFunction_1257(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1257};
- data->localData[0]->realVars[598] /* points[11]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[408],data->localData[0]->realVars[210] /* T[11] variable */,"T[11]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1258
- type: SIMPLE_ASSIGN
- points[11]._Gamma._G[2,1] = exp((-points[11].BIP[2,1,2]) * points[11].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1258(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1258};
- data->localData[0]->realVars[280] /* points[11]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[409])) * (data->localData[0]->realVars[598] /* points[11]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1259
- type: SIMPLE_ASSIGN
- points[11]._Gamma._sum2[1] = 0.2564102564102564 * points[11].Gamma.tau[1,1] * points[11].Gamma.G[1,1] + 0.7435897435897436 * points[11].Gamma.tau[2,1] * points[11].Gamma.G[2,1]
- */
-void Graph_eqFunction_1259(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1259};
- data->localData[0]->realVars[496] /* points[11]._Gamma._sum2[1] variable */ = (0.2564102564102564) * ((data->localData[0]->realVars[596] /* points[11]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[278] /* points[11]._Gamma._G[1,1] variable */)) + (0.7435897435897436) * ((data->localData[0]->realVars[598] /* points[11]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[280] /* points[11]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1260
- type: SIMPLE_ASSIGN
- points[11]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[11].BIP[2,2,1], T[11])
- */
-void Graph_eqFunction_1260(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1260};
- data->localData[0]->realVars[599] /* points[11]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[410],data->localData[0]->realVars[210] /* T[11] variable */,"T[11]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1261
- type: SIMPLE_ASSIGN
- points[11]._Gamma._G[2,2] = exp((-points[11].BIP[2,2,2]) * points[11].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1261(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1261};
- data->localData[0]->realVars[281] /* points[11]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[411])) * (data->localData[0]->realVars[599] /* points[11]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1262
- type: SIMPLE_ASSIGN
- points[11]._Gamma._sum2[2] = 0.2564102564102564 * points[11].Gamma.tau[1,2] * points[11].Gamma.G[1,2] + 0.7435897435897436 * points[11].Gamma.tau[2,2] * points[11].Gamma.G[2,2]
- */
-void Graph_eqFunction_1262(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1262};
- data->localData[0]->realVars[497] /* points[11]._Gamma._sum2[2] variable */ = (0.2564102564102564) * ((data->localData[0]->realVars[597] /* points[11]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[279] /* points[11]._Gamma._G[1,2] variable */)) + (0.7435897435897436) * ((data->localData[0]->realVars[599] /* points[11]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[281] /* points[11]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1263
- type: SIMPLE_ASSIGN
- points[11]._Gamma._sum1[2] = 0.2564102564102564 * points[11].Gamma.G[1,2] + 0.7435897435897436 * points[11].Gamma.G[2,2]
- */
-void Graph_eqFunction_1263(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1263};
- data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */ = (0.2564102564102564) * (data->localData[0]->realVars[279] /* points[11]._Gamma._G[1,2] variable */) + (0.7435897435897436) * (data->localData[0]->realVars[281] /* points[11]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1264
- type: SIMPLE_ASSIGN
- points[11]._Gamma._sum1[1] = 0.2564102564102564 * points[11].Gamma.G[1,1] + 0.7435897435897436 * points[11].Gamma.G[2,1]
- */
-void Graph_eqFunction_1264(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1264};
- data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */ = (0.2564102564102564) * (data->localData[0]->realVars[278] /* points[11]._Gamma._G[1,1] variable */) + (0.7435897435897436) * (data->localData[0]->realVars[280] /* points[11]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1265
- type: SIMPLE_ASSIGN
- $cse41 = DIVISION(points[11].Gamma.sum2[1], points[11].Gamma.sum1[1]) + 0.2564102564102564 * points[11].Gamma.G[1,1] * DIVISION(points[11].Gamma.tau[1,1] - DIVISION(points[11].Gamma.sum2[1], points[11].Gamma.sum1[1]), points[11].Gamma.sum1[1]) + 0.7435897435897436 * points[11].Gamma.G[1,2] * DIVISION(points[11].Gamma.tau[1,2] - DIVISION(points[11].Gamma.sum2[2], points[11].Gamma.sum1[2]), points[11].Gamma.sum1[2])
- */
-void Graph_eqFunction_1265(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1265};
- data->localData[0]->realVars[96] /* $cse41 variable */ = DIVISION_SIM(data->localData[0]->realVars[496] /* points[11]._Gamma._sum2[1] variable */,data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes) + (0.2564102564102564) * ((data->localData[0]->realVars[278] /* points[11]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[596] /* points[11]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[496] /* points[11]._Gamma._sum2[1] variable */,data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes))) + (0.7435897435897436) * ((data->localData[0]->realVars[279] /* points[11]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[597] /* points[11]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[497] /* points[11]._Gamma._sum2[2] variable */,data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1266
- type: SIMPLE_ASSIGN
- $cse42 = DIVISION(points[11].Gamma.sum2[2], points[11].Gamma.sum1[2]) + 0.2564102564102564 * points[11].Gamma.G[2,1] * DIVISION(points[11].Gamma.tau[2,1] - DIVISION(points[11].Gamma.sum2[1], points[11].Gamma.sum1[1]), points[11].Gamma.sum1[1]) + 0.7435897435897436 * points[11].Gamma.G[2,2] * DIVISION(points[11].Gamma.tau[2,2] - DIVISION(points[11].Gamma.sum2[2], points[11].Gamma.sum1[2]), points[11].Gamma.sum1[2])
- */
-void Graph_eqFunction_1266(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1266};
- data->localData[0]->realVars[97] /* $cse42 variable */ = DIVISION_SIM(data->localData[0]->realVars[497] /* points[11]._Gamma._sum2[2] variable */,data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes) + (0.2564102564102564) * ((data->localData[0]->realVars[280] /* points[11]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[598] /* points[11]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[496] /* points[11]._Gamma._sum2[1] variable */,data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[416] /* points[11]._Gamma._sum1[1] variable */,"points[11].Gamma.sum1[1]",equationIndexes))) + (0.7435897435897436) * ((data->localData[0]->realVars[281] /* points[11]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[599] /* points[11]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[497] /* points[11]._Gamma._sum2[2] variable */,data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[417] /* points[11]._Gamma._sum1[2] variable */,"points[11].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1267
- type: SIMPLE_ASSIGN
- points[11]._gamma[1] = exp($cse41)
- */
-void Graph_eqFunction_1267(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1267};
- data->localData[0]->realVars[894] /* points[11]._gamma[1] variable */ = exp(data->localData[0]->realVars[96] /* $cse41 variable */);
- TRACE_POP
-}
-/*
- equation index: 1268
- type: SIMPLE_ASSIGN
- points[11]._K[1] = 0.0001 * points[11].gamma[1] * $cse43
- */
-void Graph_eqFunction_1268(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1268};
- data->localData[0]->realVars[735] /* points[11]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[894] /* points[11]._gamma[1] variable */) * (data->localData[0]->realVars[98] /* $cse43 variable */));
- TRACE_POP
-}
-/*
- equation index: 1269
- type: SIMPLE_ASSIGN
- points[11]._K[2] = -0.3448275862068965 * points[11].K[1] - -1.344827586206897
- */
-void Graph_eqFunction_1269(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1269};
- data->localData[0]->realVars[736] /* points[11]._K[2] variable */ = (-0.3448275862068965) * (data->localData[0]->realVars[735] /* points[11]._K[1] variable */) - (-1.344827586206897);
- TRACE_POP
-}
-/*
- equation index: 1270
- type: SIMPLE_ASSIGN
- points[11]._gamma[2] = exp($cse42)
- */
-void Graph_eqFunction_1270(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1270};
- data->localData[0]->realVars[895] /* points[11]._gamma[2] variable */ = exp(data->localData[0]->realVars[97] /* $cse42 variable */);
- TRACE_POP
-}
-
-void residualFunc1272(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1272};
- /* iteration variables */
- data->localData[0]->realVars[210] /* T[11] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1251(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1252(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1253(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1254(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1255(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1256(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1257(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1258(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1259(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1260(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1261(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1262(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1263(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1264(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1265(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1266(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1267(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1268(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1269(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1270(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[895] /* points[11]._gamma[2] variable */) * (data->localData[0]->realVars[99] /* $cse44 variable */)) - data->localData[0]->realVars[736] /* points[11]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1272(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1272(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[11] */
- sysData->nominal[i] = data->modelData->realVarsData[210].attribute /* T[11] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[210].attribute /* T[11] */.min;
- sysData->max[i++] = data->modelData->realVarsData[210].attribute /* T[11] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1272(sysData);
-}
-
-void getIterationVarsNLS1272(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[210] /* T[11] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1277
- type: SIMPLE_ASSIGN
- $cse48 = Simulator.Files.ThermodynamicFunctions.Psat({points[12].comp[2].VP[1], points[12].comp[2].VP[2], points[12].comp[2].VP[3], points[12].comp[2].VP[4], points[12].comp[2].VP[5], points[12].comp[2].VP[6]}, T[12])
- */
-void Graph_eqFunction_1277(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1277};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11422], (modelica_real)data->simulationInfo->realParameter[11423], (modelica_real)data->simulationInfo->realParameter[11424], (modelica_real)data->simulationInfo->realParameter[11425], (modelica_real)data->simulationInfo->realParameter[11426], (modelica_real)data->simulationInfo->realParameter[11427]);
- data->localData[0]->realVars[103] /* $cse48 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[211] /* T[12] variable */);
- TRACE_POP
-}
-/*
- equation index: 1278
- type: SIMPLE_ASSIGN
- $cse47 = Simulator.Files.ThermodynamicFunctions.Psat({points[12].comp[1].VP[1], points[12].comp[1].VP[2], points[12].comp[1].VP[3], points[12].comp[1].VP[4], points[12].comp[1].VP[5], points[12].comp[1].VP[6]}, T[12])
- */
-void Graph_eqFunction_1278(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1278};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11416], (modelica_real)data->simulationInfo->realParameter[11417], (modelica_real)data->simulationInfo->realParameter[11418], (modelica_real)data->simulationInfo->realParameter[11419], (modelica_real)data->simulationInfo->realParameter[11420], (modelica_real)data->simulationInfo->realParameter[11421]);
- data->localData[0]->realVars[102] /* $cse47 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[211] /* T[12] variable */);
- TRACE_POP
-}
-/*
- equation index: 1279
- type: SIMPLE_ASSIGN
- points[12]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[12].BIP[1,1,1], T[12])
- */
-void Graph_eqFunction_1279(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1279};
- data->localData[0]->realVars[600] /* points[12]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[412],data->localData[0]->realVars[211] /* T[12] variable */,"T[12]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1280
- type: SIMPLE_ASSIGN
- points[12]._Gamma._G[1,1] = exp((-points[12].BIP[1,1,2]) * points[12].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1280(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1280};
- data->localData[0]->realVars[282] /* points[12]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[413])) * (data->localData[0]->realVars[600] /* points[12]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1281
- type: SIMPLE_ASSIGN
- points[12]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[12].BIP[2,2,1], T[12])
- */
-void Graph_eqFunction_1281(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1281};
- data->localData[0]->realVars[603] /* points[12]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[418],data->localData[0]->realVars[211] /* T[12] variable */,"T[12]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1282
- type: SIMPLE_ASSIGN
- points[12]._Gamma._G[2,2] = exp((-points[12].BIP[2,2,2]) * points[12].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1282(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1282};
- data->localData[0]->realVars[285] /* points[12]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[419])) * (data->localData[0]->realVars[603] /* points[12]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1283
- type: SIMPLE_ASSIGN
- points[12]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[12].BIP[1,2,1], T[12])
- */
-void Graph_eqFunction_1283(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1283};
- data->localData[0]->realVars[601] /* points[12]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[414],data->localData[0]->realVars[211] /* T[12] variable */,"T[12]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1284
- type: SIMPLE_ASSIGN
- points[12]._Gamma._G[1,2] = exp((-points[12].BIP[1,2,2]) * points[12].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1284(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1284};
- data->localData[0]->realVars[283] /* points[12]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[415])) * (data->localData[0]->realVars[601] /* points[12]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1285
- type: SIMPLE_ASSIGN
- points[12]._Gamma._sum2[2] = 0.2820512820512821 * points[12].Gamma.tau[1,2] * points[12].Gamma.G[1,2] + 0.717948717948718 * points[12].Gamma.tau[2,2] * points[12].Gamma.G[2,2]
- */
-void Graph_eqFunction_1285(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1285};
- data->localData[0]->realVars[499] /* points[12]._Gamma._sum2[2] variable */ = (0.2820512820512821) * ((data->localData[0]->realVars[601] /* points[12]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[283] /* points[12]._Gamma._G[1,2] variable */)) + (0.717948717948718) * ((data->localData[0]->realVars[603] /* points[12]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[285] /* points[12]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1286
- type: SIMPLE_ASSIGN
- points[12]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[12].BIP[2,1,1], T[12])
- */
-void Graph_eqFunction_1286(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1286};
- data->localData[0]->realVars[602] /* points[12]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[416],data->localData[0]->realVars[211] /* T[12] variable */,"T[12]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1287
- type: SIMPLE_ASSIGN
- points[12]._Gamma._G[2,1] = exp((-points[12].BIP[2,1,2]) * points[12].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1287(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1287};
- data->localData[0]->realVars[284] /* points[12]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[417])) * (data->localData[0]->realVars[602] /* points[12]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1288
- type: SIMPLE_ASSIGN
- points[12]._Gamma._sum2[1] = 0.2820512820512821 * points[12].Gamma.tau[1,1] * points[12].Gamma.G[1,1] + 0.717948717948718 * points[12].Gamma.tau[2,1] * points[12].Gamma.G[2,1]
- */
-void Graph_eqFunction_1288(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1288};
- data->localData[0]->realVars[498] /* points[12]._Gamma._sum2[1] variable */ = (0.2820512820512821) * ((data->localData[0]->realVars[600] /* points[12]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[282] /* points[12]._Gamma._G[1,1] variable */)) + (0.717948717948718) * ((data->localData[0]->realVars[602] /* points[12]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[284] /* points[12]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1289
- type: SIMPLE_ASSIGN
- points[12]._Gamma._sum1[1] = 0.2820512820512821 * points[12].Gamma.G[1,1] + 0.717948717948718 * points[12].Gamma.G[2,1]
- */
-void Graph_eqFunction_1289(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1289};
- data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */ = (0.2820512820512821) * (data->localData[0]->realVars[282] /* points[12]._Gamma._G[1,1] variable */) + (0.717948717948718) * (data->localData[0]->realVars[284] /* points[12]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1290
- type: SIMPLE_ASSIGN
- points[12]._Gamma._sum1[2] = 0.2820512820512821 * points[12].Gamma.G[1,2] + 0.717948717948718 * points[12].Gamma.G[2,2]
- */
-void Graph_eqFunction_1290(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1290};
- data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */ = (0.2820512820512821) * (data->localData[0]->realVars[283] /* points[12]._Gamma._G[1,2] variable */) + (0.717948717948718) * (data->localData[0]->realVars[285] /* points[12]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1291
- type: SIMPLE_ASSIGN
- $cse45 = DIVISION(points[12].Gamma.sum2[1], points[12].Gamma.sum1[1]) + 0.2820512820512821 * points[12].Gamma.G[1,1] * DIVISION(points[12].Gamma.tau[1,1] - DIVISION(points[12].Gamma.sum2[1], points[12].Gamma.sum1[1]), points[12].Gamma.sum1[1]) + 0.717948717948718 * points[12].Gamma.G[1,2] * DIVISION(points[12].Gamma.tau[1,2] - DIVISION(points[12].Gamma.sum2[2], points[12].Gamma.sum1[2]), points[12].Gamma.sum1[2])
- */
-void Graph_eqFunction_1291(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1291};
- data->localData[0]->realVars[100] /* $cse45 variable */ = DIVISION_SIM(data->localData[0]->realVars[498] /* points[12]._Gamma._sum2[1] variable */,data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes) + (0.2820512820512821) * ((data->localData[0]->realVars[282] /* points[12]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[600] /* points[12]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[498] /* points[12]._Gamma._sum2[1] variable */,data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes))) + (0.717948717948718) * ((data->localData[0]->realVars[283] /* points[12]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[601] /* points[12]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[499] /* points[12]._Gamma._sum2[2] variable */,data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1292
- type: SIMPLE_ASSIGN
- $cse46 = DIVISION(points[12].Gamma.sum2[2], points[12].Gamma.sum1[2]) + 0.2820512820512821 * points[12].Gamma.G[2,1] * DIVISION(points[12].Gamma.tau[2,1] - DIVISION(points[12].Gamma.sum2[1], points[12].Gamma.sum1[1]), points[12].Gamma.sum1[1]) + 0.717948717948718 * points[12].Gamma.G[2,2] * DIVISION(points[12].Gamma.tau[2,2] - DIVISION(points[12].Gamma.sum2[2], points[12].Gamma.sum1[2]), points[12].Gamma.sum1[2])
- */
-void Graph_eqFunction_1292(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1292};
- data->localData[0]->realVars[101] /* $cse46 variable */ = DIVISION_SIM(data->localData[0]->realVars[499] /* points[12]._Gamma._sum2[2] variable */,data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes) + (0.2820512820512821) * ((data->localData[0]->realVars[284] /* points[12]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[602] /* points[12]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[498] /* points[12]._Gamma._sum2[1] variable */,data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[418] /* points[12]._Gamma._sum1[1] variable */,"points[12].Gamma.sum1[1]",equationIndexes))) + (0.717948717948718) * ((data->localData[0]->realVars[285] /* points[12]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[603] /* points[12]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[499] /* points[12]._Gamma._sum2[2] variable */,data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[419] /* points[12]._Gamma._sum1[2] variable */,"points[12].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1293
- type: SIMPLE_ASSIGN
- points[12]._gamma[2] = exp($cse46)
- */
-void Graph_eqFunction_1293(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1293};
- data->localData[0]->realVars[897] /* points[12]._gamma[2] variable */ = exp(data->localData[0]->realVars[101] /* $cse46 variable */);
- TRACE_POP
-}
-/*
- equation index: 1294
- type: SIMPLE_ASSIGN
- points[12]._K[2] = 0.0001 * points[12].gamma[2] * $cse48
- */
-void Graph_eqFunction_1294(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1294};
- data->localData[0]->realVars[738] /* points[12]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[897] /* points[12]._gamma[2] variable */) * (data->localData[0]->realVars[103] /* $cse48 variable */));
- TRACE_POP
-}
-/*
- equation index: 1295
- type: SIMPLE_ASSIGN
- points[12]._K[1] = -2.545454545454545 * points[12].K[2] - -3.545454545454545
- */
-void Graph_eqFunction_1295(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1295};
- data->localData[0]->realVars[737] /* points[12]._K[1] variable */ = (-2.545454545454545) * (data->localData[0]->realVars[738] /* points[12]._K[2] variable */) - (-3.545454545454545);
- TRACE_POP
-}
-/*
- equation index: 1296
- type: SIMPLE_ASSIGN
- points[12]._gamma[1] = exp($cse45)
- */
-void Graph_eqFunction_1296(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1296};
- data->localData[0]->realVars[896] /* points[12]._gamma[1] variable */ = exp(data->localData[0]->realVars[100] /* $cse45 variable */);
- TRACE_POP
-}
-
-void residualFunc1298(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1298};
- /* iteration variables */
- data->localData[0]->realVars[211] /* T[12] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1277(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1278(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1279(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1280(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1281(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1282(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1283(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1284(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1285(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1286(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1287(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1288(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1289(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1290(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1291(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1292(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1293(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1294(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1295(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1296(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[896] /* points[12]._gamma[1] variable */) * (data->localData[0]->realVars[102] /* $cse47 variable */)) - data->localData[0]->realVars[737] /* points[12]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1298(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1298(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[12] */
- sysData->nominal[i] = data->modelData->realVarsData[211].attribute /* T[12] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[211].attribute /* T[12] */.min;
- sysData->max[i++] = data->modelData->realVarsData[211].attribute /* T[12] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1298(sysData);
-}
-
-void getIterationVarsNLS1298(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[211] /* T[12] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1303
- type: SIMPLE_ASSIGN
- $cse52 = Simulator.Files.ThermodynamicFunctions.Psat({points[13].comp[2].VP[1], points[13].comp[2].VP[2], points[13].comp[2].VP[3], points[13].comp[2].VP[4], points[13].comp[2].VP[5], points[13].comp[2].VP[6]}, T[13])
- */
-void Graph_eqFunction_1303(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1303};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11434], (modelica_real)data->simulationInfo->realParameter[11435], (modelica_real)data->simulationInfo->realParameter[11436], (modelica_real)data->simulationInfo->realParameter[11437], (modelica_real)data->simulationInfo->realParameter[11438], (modelica_real)data->simulationInfo->realParameter[11439]);
- data->localData[0]->realVars[108] /* $cse52 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[212] /* T[13] variable */);
- TRACE_POP
-}
-/*
- equation index: 1304
- type: SIMPLE_ASSIGN
- $cse51 = Simulator.Files.ThermodynamicFunctions.Psat({points[13].comp[1].VP[1], points[13].comp[1].VP[2], points[13].comp[1].VP[3], points[13].comp[1].VP[4], points[13].comp[1].VP[5], points[13].comp[1].VP[6]}, T[13])
- */
-void Graph_eqFunction_1304(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1304};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11428], (modelica_real)data->simulationInfo->realParameter[11429], (modelica_real)data->simulationInfo->realParameter[11430], (modelica_real)data->simulationInfo->realParameter[11431], (modelica_real)data->simulationInfo->realParameter[11432], (modelica_real)data->simulationInfo->realParameter[11433]);
- data->localData[0]->realVars[107] /* $cse51 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[212] /* T[13] variable */);
- TRACE_POP
-}
-/*
- equation index: 1305
- type: SIMPLE_ASSIGN
- points[13]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[13].BIP[1,1,1], T[13])
- */
-void Graph_eqFunction_1305(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1305};
- data->localData[0]->realVars[604] /* points[13]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[420],data->localData[0]->realVars[212] /* T[13] variable */,"T[13]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1306
- type: SIMPLE_ASSIGN
- points[13]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[13].BIP[2,1,1], T[13])
- */
-void Graph_eqFunction_1306(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1306};
- data->localData[0]->realVars[606] /* points[13]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[424],data->localData[0]->realVars[212] /* T[13] variable */,"T[13]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1307
- type: SIMPLE_ASSIGN
- points[13]._Gamma._G[2,1] = exp((-points[13].BIP[2,1,2]) * points[13].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1307(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1307};
- data->localData[0]->realVars[288] /* points[13]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[425])) * (data->localData[0]->realVars[606] /* points[13]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1308
- type: SIMPLE_ASSIGN
- points[13]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[13].BIP[1,2,1], T[13])
- */
-void Graph_eqFunction_1308(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1308};
- data->localData[0]->realVars[605] /* points[13]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[422],data->localData[0]->realVars[212] /* T[13] variable */,"T[13]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1309
- type: SIMPLE_ASSIGN
- points[13]._Gamma._G[1,2] = exp((-points[13].BIP[1,2,2]) * points[13].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1309(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1309};
- data->localData[0]->realVars[287] /* points[13]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[423])) * (data->localData[0]->realVars[605] /* points[13]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1310
- type: SIMPLE_ASSIGN
- points[13]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[13].BIP[2,2,1], T[13])
- */
-void Graph_eqFunction_1310(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1310};
- data->localData[0]->realVars[607] /* points[13]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[426],data->localData[0]->realVars[212] /* T[13] variable */,"T[13]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1311
- type: SIMPLE_ASSIGN
- points[13]._Gamma._G[2,2] = exp((-points[13].BIP[2,2,2]) * points[13].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1311(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1311};
- data->localData[0]->realVars[289] /* points[13]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[427])) * (data->localData[0]->realVars[607] /* points[13]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1312
- type: SIMPLE_ASSIGN
- points[13]._Gamma._sum2[2] = 0.3076923076923077 * points[13].Gamma.tau[1,2] * points[13].Gamma.G[1,2] + 0.6923076923076923 * points[13].Gamma.tau[2,2] * points[13].Gamma.G[2,2]
- */
-void Graph_eqFunction_1312(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1312};
- data->localData[0]->realVars[501] /* points[13]._Gamma._sum2[2] variable */ = (0.3076923076923077) * ((data->localData[0]->realVars[605] /* points[13]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[287] /* points[13]._Gamma._G[1,2] variable */)) + (0.6923076923076923) * ((data->localData[0]->realVars[607] /* points[13]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[289] /* points[13]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1313
- type: SIMPLE_ASSIGN
- points[13]._Gamma._G[1,1] = exp((-points[13].BIP[1,1,2]) * points[13].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1313(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1313};
- data->localData[0]->realVars[286] /* points[13]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[421])) * (data->localData[0]->realVars[604] /* points[13]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1314
- type: SIMPLE_ASSIGN
- points[13]._Gamma._sum2[1] = 0.3076923076923077 * points[13].Gamma.tau[1,1] * points[13].Gamma.G[1,1] + 0.6923076923076923 * points[13].Gamma.tau[2,1] * points[13].Gamma.G[2,1]
- */
-void Graph_eqFunction_1314(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1314};
- data->localData[0]->realVars[500] /* points[13]._Gamma._sum2[1] variable */ = (0.3076923076923077) * ((data->localData[0]->realVars[604] /* points[13]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[286] /* points[13]._Gamma._G[1,1] variable */)) + (0.6923076923076923) * ((data->localData[0]->realVars[606] /* points[13]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[288] /* points[13]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1315
- type: SIMPLE_ASSIGN
- points[13]._Gamma._sum1[1] = 0.3076923076923077 * points[13].Gamma.G[1,1] + 0.6923076923076923 * points[13].Gamma.G[2,1]
- */
-void Graph_eqFunction_1315(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1315};
- data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */ = (0.3076923076923077) * (data->localData[0]->realVars[286] /* points[13]._Gamma._G[1,1] variable */) + (0.6923076923076923) * (data->localData[0]->realVars[288] /* points[13]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1316
- type: SIMPLE_ASSIGN
- points[13]._Gamma._sum1[2] = 0.3076923076923077 * points[13].Gamma.G[1,2] + 0.6923076923076923 * points[13].Gamma.G[2,2]
- */
-void Graph_eqFunction_1316(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1316};
- data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */ = (0.3076923076923077) * (data->localData[0]->realVars[287] /* points[13]._Gamma._G[1,2] variable */) + (0.6923076923076923) * (data->localData[0]->realVars[289] /* points[13]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1317
- type: SIMPLE_ASSIGN
- $cse50 = DIVISION(points[13].Gamma.sum2[2], points[13].Gamma.sum1[2]) + 0.3076923076923077 * points[13].Gamma.G[2,1] * DIVISION(points[13].Gamma.tau[2,1] - DIVISION(points[13].Gamma.sum2[1], points[13].Gamma.sum1[1]), points[13].Gamma.sum1[1]) + 0.6923076923076923 * points[13].Gamma.G[2,2] * DIVISION(points[13].Gamma.tau[2,2] - DIVISION(points[13].Gamma.sum2[2], points[13].Gamma.sum1[2]), points[13].Gamma.sum1[2])
- */
-void Graph_eqFunction_1317(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1317};
- data->localData[0]->realVars[106] /* $cse50 variable */ = DIVISION_SIM(data->localData[0]->realVars[501] /* points[13]._Gamma._sum2[2] variable */,data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes) + (0.3076923076923077) * ((data->localData[0]->realVars[288] /* points[13]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[606] /* points[13]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[500] /* points[13]._Gamma._sum2[1] variable */,data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes))) + (0.6923076923076923) * ((data->localData[0]->realVars[289] /* points[13]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[607] /* points[13]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[501] /* points[13]._Gamma._sum2[2] variable */,data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1318
- type: SIMPLE_ASSIGN
- $cse49 = DIVISION(points[13].Gamma.sum2[1], points[13].Gamma.sum1[1]) + 0.3076923076923077 * points[13].Gamma.G[1,1] * DIVISION(points[13].Gamma.tau[1,1] - DIVISION(points[13].Gamma.sum2[1], points[13].Gamma.sum1[1]), points[13].Gamma.sum1[1]) + 0.6923076923076923 * points[13].Gamma.G[1,2] * DIVISION(points[13].Gamma.tau[1,2] - DIVISION(points[13].Gamma.sum2[2], points[13].Gamma.sum1[2]), points[13].Gamma.sum1[2])
- */
-void Graph_eqFunction_1318(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1318};
- data->localData[0]->realVars[104] /* $cse49 variable */ = DIVISION_SIM(data->localData[0]->realVars[500] /* points[13]._Gamma._sum2[1] variable */,data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes) + (0.3076923076923077) * ((data->localData[0]->realVars[286] /* points[13]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[604] /* points[13]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[500] /* points[13]._Gamma._sum2[1] variable */,data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[420] /* points[13]._Gamma._sum1[1] variable */,"points[13].Gamma.sum1[1]",equationIndexes))) + (0.6923076923076923) * ((data->localData[0]->realVars[287] /* points[13]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[605] /* points[13]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[501] /* points[13]._Gamma._sum2[2] variable */,data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[421] /* points[13]._Gamma._sum1[2] variable */,"points[13].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1319
- type: SIMPLE_ASSIGN
- points[13]._gamma[1] = exp($cse49)
- */
-void Graph_eqFunction_1319(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1319};
- data->localData[0]->realVars[898] /* points[13]._gamma[1] variable */ = exp(data->localData[0]->realVars[104] /* $cse49 variable */);
- TRACE_POP
-}
-/*
- equation index: 1320
- type: SIMPLE_ASSIGN
- points[13]._K[1] = 0.0001 * points[13].gamma[1] * $cse51
- */
-void Graph_eqFunction_1320(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1320};
- data->localData[0]->realVars[739] /* points[13]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[898] /* points[13]._gamma[1] variable */) * (data->localData[0]->realVars[107] /* $cse51 variable */));
- TRACE_POP
-}
-/*
- equation index: 1321
- type: SIMPLE_ASSIGN
- points[13]._K[2] = -0.4444444444444445 * points[13].K[1] - -1.444444444444444
- */
-void Graph_eqFunction_1321(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1321};
- data->localData[0]->realVars[740] /* points[13]._K[2] variable */ = (-0.4444444444444445) * (data->localData[0]->realVars[739] /* points[13]._K[1] variable */) - (-1.444444444444444);
- TRACE_POP
-}
-/*
- equation index: 1322
- type: SIMPLE_ASSIGN
- points[13]._gamma[2] = exp($cse50)
- */
-void Graph_eqFunction_1322(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1322};
- data->localData[0]->realVars[899] /* points[13]._gamma[2] variable */ = exp(data->localData[0]->realVars[106] /* $cse50 variable */);
- TRACE_POP
-}
-
-void residualFunc1324(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1324};
- /* iteration variables */
- data->localData[0]->realVars[212] /* T[13] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1303(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1304(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1305(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1306(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1307(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1308(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1309(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1310(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1311(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1312(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1313(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1314(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1315(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1316(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1317(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1318(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1319(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1320(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1321(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1322(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[899] /* points[13]._gamma[2] variable */) * (data->localData[0]->realVars[108] /* $cse52 variable */)) - data->localData[0]->realVars[740] /* points[13]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1324(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1324(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[13] */
- sysData->nominal[i] = data->modelData->realVarsData[212].attribute /* T[13] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[212].attribute /* T[13] */.min;
- sysData->max[i++] = data->modelData->realVarsData[212].attribute /* T[13] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1324(sysData);
-}
-
-void getIterationVarsNLS1324(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[212] /* T[13] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1329
- type: SIMPLE_ASSIGN
- $cse56 = Simulator.Files.ThermodynamicFunctions.Psat({points[14].comp[2].VP[1], points[14].comp[2].VP[2], points[14].comp[2].VP[3], points[14].comp[2].VP[4], points[14].comp[2].VP[5], points[14].comp[2].VP[6]}, T[14])
- */
-void Graph_eqFunction_1329(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1329};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11446], (modelica_real)data->simulationInfo->realParameter[11447], (modelica_real)data->simulationInfo->realParameter[11448], (modelica_real)data->simulationInfo->realParameter[11449], (modelica_real)data->simulationInfo->realParameter[11450], (modelica_real)data->simulationInfo->realParameter[11451]);
- data->localData[0]->realVars[112] /* $cse56 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[213] /* T[14] variable */);
- TRACE_POP
-}
-/*
- equation index: 1330
- type: SIMPLE_ASSIGN
- $cse55 = Simulator.Files.ThermodynamicFunctions.Psat({points[14].comp[1].VP[1], points[14].comp[1].VP[2], points[14].comp[1].VP[3], points[14].comp[1].VP[4], points[14].comp[1].VP[5], points[14].comp[1].VP[6]}, T[14])
- */
-void Graph_eqFunction_1330(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1330};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11440], (modelica_real)data->simulationInfo->realParameter[11441], (modelica_real)data->simulationInfo->realParameter[11442], (modelica_real)data->simulationInfo->realParameter[11443], (modelica_real)data->simulationInfo->realParameter[11444], (modelica_real)data->simulationInfo->realParameter[11445]);
- data->localData[0]->realVars[111] /* $cse55 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[213] /* T[14] variable */);
- TRACE_POP
-}
-/*
- equation index: 1331
- type: SIMPLE_ASSIGN
- points[14]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[14].BIP[1,1,1], T[14])
- */
-void Graph_eqFunction_1331(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1331};
- data->localData[0]->realVars[608] /* points[14]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[428],data->localData[0]->realVars[213] /* T[14] variable */,"T[14]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1332
- type: SIMPLE_ASSIGN
- points[14]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[14].BIP[2,2,1], T[14])
- */
-void Graph_eqFunction_1332(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1332};
- data->localData[0]->realVars[611] /* points[14]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[434],data->localData[0]->realVars[213] /* T[14] variable */,"T[14]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1333
- type: SIMPLE_ASSIGN
- points[14]._Gamma._G[2,2] = exp((-points[14].BIP[2,2,2]) * points[14].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1333(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1333};
- data->localData[0]->realVars[293] /* points[14]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[435])) * (data->localData[0]->realVars[611] /* points[14]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1334
- type: SIMPLE_ASSIGN
- points[14]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[14].BIP[2,1,1], T[14])
- */
-void Graph_eqFunction_1334(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1334};
- data->localData[0]->realVars[610] /* points[14]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[432],data->localData[0]->realVars[213] /* T[14] variable */,"T[14]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1335
- type: SIMPLE_ASSIGN
- points[14]._Gamma._G[2,1] = exp((-points[14].BIP[2,1,2]) * points[14].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1335(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1335};
- data->localData[0]->realVars[292] /* points[14]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[433])) * (data->localData[0]->realVars[610] /* points[14]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1336
- type: SIMPLE_ASSIGN
- points[14]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[14].BIP[1,2,1], T[14])
- */
-void Graph_eqFunction_1336(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1336};
- data->localData[0]->realVars[609] /* points[14]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[430],data->localData[0]->realVars[213] /* T[14] variable */,"T[14]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1337
- type: SIMPLE_ASSIGN
- points[14]._Gamma._G[1,2] = exp((-points[14].BIP[1,2,2]) * points[14].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1337(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1337};
- data->localData[0]->realVars[291] /* points[14]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[431])) * (data->localData[0]->realVars[609] /* points[14]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1338
- type: SIMPLE_ASSIGN
- points[14]._Gamma._sum2[2] = 0.3333333333333333 * points[14].Gamma.tau[1,2] * points[14].Gamma.G[1,2] + 0.6666666666666667 * points[14].Gamma.tau[2,2] * points[14].Gamma.G[2,2]
- */
-void Graph_eqFunction_1338(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1338};
- data->localData[0]->realVars[503] /* points[14]._Gamma._sum2[2] variable */ = (0.3333333333333333) * ((data->localData[0]->realVars[609] /* points[14]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[291] /* points[14]._Gamma._G[1,2] variable */)) + (0.6666666666666667) * ((data->localData[0]->realVars[611] /* points[14]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[293] /* points[14]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1339
- type: SIMPLE_ASSIGN
- points[14]._Gamma._G[1,1] = exp((-points[14].BIP[1,1,2]) * points[14].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1339(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1339};
- data->localData[0]->realVars[290] /* points[14]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[429])) * (data->localData[0]->realVars[608] /* points[14]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1340
- type: SIMPLE_ASSIGN
- points[14]._Gamma._sum2[1] = 0.3333333333333333 * points[14].Gamma.tau[1,1] * points[14].Gamma.G[1,1] + 0.6666666666666667 * points[14].Gamma.tau[2,1] * points[14].Gamma.G[2,1]
- */
-void Graph_eqFunction_1340(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1340};
- data->localData[0]->realVars[502] /* points[14]._Gamma._sum2[1] variable */ = (0.3333333333333333) * ((data->localData[0]->realVars[608] /* points[14]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[290] /* points[14]._Gamma._G[1,1] variable */)) + (0.6666666666666667) * ((data->localData[0]->realVars[610] /* points[14]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[292] /* points[14]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1341
- type: SIMPLE_ASSIGN
- points[14]._Gamma._sum1[2] = 0.3333333333333333 * points[14].Gamma.G[1,2] + 0.6666666666666667 * points[14].Gamma.G[2,2]
- */
-void Graph_eqFunction_1341(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1341};
- data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */ = (0.3333333333333333) * (data->localData[0]->realVars[291] /* points[14]._Gamma._G[1,2] variable */) + (0.6666666666666667) * (data->localData[0]->realVars[293] /* points[14]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1342
- type: SIMPLE_ASSIGN
- points[14]._Gamma._sum1[1] = 0.3333333333333333 * points[14].Gamma.G[1,1] + 0.6666666666666667 * points[14].Gamma.G[2,1]
- */
-void Graph_eqFunction_1342(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1342};
- data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */ = (0.3333333333333333) * (data->localData[0]->realVars[290] /* points[14]._Gamma._G[1,1] variable */) + (0.6666666666666667) * (data->localData[0]->realVars[292] /* points[14]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1343
- type: SIMPLE_ASSIGN
- $cse54 = DIVISION(points[14].Gamma.sum2[2], points[14].Gamma.sum1[2]) + 0.3333333333333333 * points[14].Gamma.G[2,1] * DIVISION(points[14].Gamma.tau[2,1] - DIVISION(points[14].Gamma.sum2[1], points[14].Gamma.sum1[1]), points[14].Gamma.sum1[1]) + 0.6666666666666667 * points[14].Gamma.G[2,2] * DIVISION(points[14].Gamma.tau[2,2] - DIVISION(points[14].Gamma.sum2[2], points[14].Gamma.sum1[2]), points[14].Gamma.sum1[2])
- */
-void Graph_eqFunction_1343(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1343};
- data->localData[0]->realVars[110] /* $cse54 variable */ = DIVISION_SIM(data->localData[0]->realVars[503] /* points[14]._Gamma._sum2[2] variable */,data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes) + (0.3333333333333333) * ((data->localData[0]->realVars[292] /* points[14]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[610] /* points[14]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[502] /* points[14]._Gamma._sum2[1] variable */,data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes))) + (0.6666666666666667) * ((data->localData[0]->realVars[293] /* points[14]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[611] /* points[14]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[503] /* points[14]._Gamma._sum2[2] variable */,data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1344
- type: SIMPLE_ASSIGN
- $cse53 = DIVISION(points[14].Gamma.sum2[1], points[14].Gamma.sum1[1]) + 0.3333333333333333 * points[14].Gamma.G[1,1] * DIVISION(points[14].Gamma.tau[1,1] - DIVISION(points[14].Gamma.sum2[1], points[14].Gamma.sum1[1]), points[14].Gamma.sum1[1]) + 0.6666666666666667 * points[14].Gamma.G[1,2] * DIVISION(points[14].Gamma.tau[1,2] - DIVISION(points[14].Gamma.sum2[2], points[14].Gamma.sum1[2]), points[14].Gamma.sum1[2])
- */
-void Graph_eqFunction_1344(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1344};
- data->localData[0]->realVars[109] /* $cse53 variable */ = DIVISION_SIM(data->localData[0]->realVars[502] /* points[14]._Gamma._sum2[1] variable */,data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes) + (0.3333333333333333) * ((data->localData[0]->realVars[290] /* points[14]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[608] /* points[14]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[502] /* points[14]._Gamma._sum2[1] variable */,data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[422] /* points[14]._Gamma._sum1[1] variable */,"points[14].Gamma.sum1[1]",equationIndexes))) + (0.6666666666666667) * ((data->localData[0]->realVars[291] /* points[14]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[609] /* points[14]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[503] /* points[14]._Gamma._sum2[2] variable */,data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[423] /* points[14]._Gamma._sum1[2] variable */,"points[14].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1345
- type: SIMPLE_ASSIGN
- points[14]._gamma[1] = exp($cse53)
- */
-void Graph_eqFunction_1345(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1345};
- data->localData[0]->realVars[900] /* points[14]._gamma[1] variable */ = exp(data->localData[0]->realVars[109] /* $cse53 variable */);
- TRACE_POP
-}
-/*
- equation index: 1346
- type: SIMPLE_ASSIGN
- points[14]._K[1] = 0.0001 * points[14].gamma[1] * $cse55
- */
-void Graph_eqFunction_1346(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1346};
- data->localData[0]->realVars[741] /* points[14]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[900] /* points[14]._gamma[1] variable */) * (data->localData[0]->realVars[111] /* $cse55 variable */));
- TRACE_POP
-}
-/*
- equation index: 1347
- type: SIMPLE_ASSIGN
- points[14]._K[2] = -0.4999999999999999 * points[14].K[1] - -1.5
- */
-void Graph_eqFunction_1347(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1347};
- data->localData[0]->realVars[742] /* points[14]._K[2] variable */ = (-0.4999999999999999) * (data->localData[0]->realVars[741] /* points[14]._K[1] variable */) - (-1.5);
- TRACE_POP
-}
-/*
- equation index: 1348
- type: SIMPLE_ASSIGN
- points[14]._gamma[2] = exp($cse54)
- */
-void Graph_eqFunction_1348(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1348};
- data->localData[0]->realVars[901] /* points[14]._gamma[2] variable */ = exp(data->localData[0]->realVars[110] /* $cse54 variable */);
- TRACE_POP
-}
-
-void residualFunc1350(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1350};
- /* iteration variables */
- data->localData[0]->realVars[213] /* T[14] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1329(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1330(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1331(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1332(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1333(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1334(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1335(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1336(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1337(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1338(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1339(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1340(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1341(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1342(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1343(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1344(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1345(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1346(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1347(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1348(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[901] /* points[14]._gamma[2] variable */) * (data->localData[0]->realVars[112] /* $cse56 variable */)) - data->localData[0]->realVars[742] /* points[14]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1350(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1350(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[14] */
- sysData->nominal[i] = data->modelData->realVarsData[213].attribute /* T[14] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[213].attribute /* T[14] */.min;
- sysData->max[i++] = data->modelData->realVarsData[213].attribute /* T[14] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1350(sysData);
-}
-
-void getIterationVarsNLS1350(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[213] /* T[14] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1355
- type: SIMPLE_ASSIGN
- $cse60 = Simulator.Files.ThermodynamicFunctions.Psat({points[15].comp[2].VP[1], points[15].comp[2].VP[2], points[15].comp[2].VP[3], points[15].comp[2].VP[4], points[15].comp[2].VP[5], points[15].comp[2].VP[6]}, T[15])
- */
-void Graph_eqFunction_1355(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1355};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11458], (modelica_real)data->simulationInfo->realParameter[11459], (modelica_real)data->simulationInfo->realParameter[11460], (modelica_real)data->simulationInfo->realParameter[11461], (modelica_real)data->simulationInfo->realParameter[11462], (modelica_real)data->simulationInfo->realParameter[11463]);
- data->localData[0]->realVars[117] /* $cse60 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[214] /* T[15] variable */);
- TRACE_POP
-}
-/*
- equation index: 1356
- type: SIMPLE_ASSIGN
- $cse59 = Simulator.Files.ThermodynamicFunctions.Psat({points[15].comp[1].VP[1], points[15].comp[1].VP[2], points[15].comp[1].VP[3], points[15].comp[1].VP[4], points[15].comp[1].VP[5], points[15].comp[1].VP[6]}, T[15])
- */
-void Graph_eqFunction_1356(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1356};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11452], (modelica_real)data->simulationInfo->realParameter[11453], (modelica_real)data->simulationInfo->realParameter[11454], (modelica_real)data->simulationInfo->realParameter[11455], (modelica_real)data->simulationInfo->realParameter[11456], (modelica_real)data->simulationInfo->realParameter[11457]);
- data->localData[0]->realVars[115] /* $cse59 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[214] /* T[15] variable */);
- TRACE_POP
-}
-/*
- equation index: 1357
- type: SIMPLE_ASSIGN
- points[15]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[15].BIP[1,1,1], T[15])
- */
-void Graph_eqFunction_1357(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1357};
- data->localData[0]->realVars[612] /* points[15]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[436],data->localData[0]->realVars[214] /* T[15] variable */,"T[15]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1358
- type: SIMPLE_ASSIGN
- points[15]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[15].BIP[1,2,1], T[15])
- */
-void Graph_eqFunction_1358(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1358};
- data->localData[0]->realVars[613] /* points[15]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[438],data->localData[0]->realVars[214] /* T[15] variable */,"T[15]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1359
- type: SIMPLE_ASSIGN
- points[15]._Gamma._G[1,2] = exp((-points[15].BIP[1,2,2]) * points[15].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1359(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1359};
- data->localData[0]->realVars[295] /* points[15]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[439])) * (data->localData[0]->realVars[613] /* points[15]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1360
- type: SIMPLE_ASSIGN
- points[15]._Gamma._G[1,1] = exp((-points[15].BIP[1,1,2]) * points[15].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1360(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1360};
- data->localData[0]->realVars[294] /* points[15]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[437])) * (data->localData[0]->realVars[612] /* points[15]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1361
- type: SIMPLE_ASSIGN
- points[15]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[15].BIP[2,1,1], T[15])
- */
-void Graph_eqFunction_1361(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1361};
- data->localData[0]->realVars[614] /* points[15]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[440],data->localData[0]->realVars[214] /* T[15] variable */,"T[15]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1362
- type: SIMPLE_ASSIGN
- points[15]._Gamma._G[2,1] = exp((-points[15].BIP[2,1,2]) * points[15].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1362(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1362};
- data->localData[0]->realVars[296] /* points[15]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[441])) * (data->localData[0]->realVars[614] /* points[15]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1363
- type: SIMPLE_ASSIGN
- points[15]._Gamma._sum2[1] = 0.358974358974359 * points[15].Gamma.tau[1,1] * points[15].Gamma.G[1,1] + 0.641025641025641 * points[15].Gamma.tau[2,1] * points[15].Gamma.G[2,1]
- */
-void Graph_eqFunction_1363(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1363};
- data->localData[0]->realVars[504] /* points[15]._Gamma._sum2[1] variable */ = (0.358974358974359) * ((data->localData[0]->realVars[612] /* points[15]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[294] /* points[15]._Gamma._G[1,1] variable */)) + (0.641025641025641) * ((data->localData[0]->realVars[614] /* points[15]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[296] /* points[15]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1364
- type: SIMPLE_ASSIGN
- points[15]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[15].BIP[2,2,1], T[15])
- */
-void Graph_eqFunction_1364(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1364};
- data->localData[0]->realVars[615] /* points[15]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[442],data->localData[0]->realVars[214] /* T[15] variable */,"T[15]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1365
- type: SIMPLE_ASSIGN
- points[15]._Gamma._G[2,2] = exp((-points[15].BIP[2,2,2]) * points[15].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1365(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1365};
- data->localData[0]->realVars[297] /* points[15]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[443])) * (data->localData[0]->realVars[615] /* points[15]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1366
- type: SIMPLE_ASSIGN
- points[15]._Gamma._sum2[2] = 0.358974358974359 * points[15].Gamma.tau[1,2] * points[15].Gamma.G[1,2] + 0.641025641025641 * points[15].Gamma.tau[2,2] * points[15].Gamma.G[2,2]
- */
-void Graph_eqFunction_1366(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1366};
- data->localData[0]->realVars[505] /* points[15]._Gamma._sum2[2] variable */ = (0.358974358974359) * ((data->localData[0]->realVars[613] /* points[15]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[295] /* points[15]._Gamma._G[1,2] variable */)) + (0.641025641025641) * ((data->localData[0]->realVars[615] /* points[15]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[297] /* points[15]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1367
- type: SIMPLE_ASSIGN
- points[15]._Gamma._sum1[2] = 0.358974358974359 * points[15].Gamma.G[1,2] + 0.641025641025641 * points[15].Gamma.G[2,2]
- */
-void Graph_eqFunction_1367(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1367};
- data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */ = (0.358974358974359) * (data->localData[0]->realVars[295] /* points[15]._Gamma._G[1,2] variable */) + (0.641025641025641) * (data->localData[0]->realVars[297] /* points[15]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1368
- type: SIMPLE_ASSIGN
- points[15]._Gamma._sum1[1] = 0.358974358974359 * points[15].Gamma.G[1,1] + 0.641025641025641 * points[15].Gamma.G[2,1]
- */
-void Graph_eqFunction_1368(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1368};
- data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */ = (0.358974358974359) * (data->localData[0]->realVars[294] /* points[15]._Gamma._G[1,1] variable */) + (0.641025641025641) * (data->localData[0]->realVars[296] /* points[15]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1369
- type: SIMPLE_ASSIGN
- $cse58 = DIVISION(points[15].Gamma.sum2[2], points[15].Gamma.sum1[2]) + 0.358974358974359 * points[15].Gamma.G[2,1] * DIVISION(points[15].Gamma.tau[2,1] - DIVISION(points[15].Gamma.sum2[1], points[15].Gamma.sum1[1]), points[15].Gamma.sum1[1]) + 0.641025641025641 * points[15].Gamma.G[2,2] * DIVISION(points[15].Gamma.tau[2,2] - DIVISION(points[15].Gamma.sum2[2], points[15].Gamma.sum1[2]), points[15].Gamma.sum1[2])
- */
-void Graph_eqFunction_1369(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1369};
- data->localData[0]->realVars[114] /* $cse58 variable */ = DIVISION_SIM(data->localData[0]->realVars[505] /* points[15]._Gamma._sum2[2] variable */,data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes) + (0.358974358974359) * ((data->localData[0]->realVars[296] /* points[15]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[614] /* points[15]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[504] /* points[15]._Gamma._sum2[1] variable */,data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes))) + (0.641025641025641) * ((data->localData[0]->realVars[297] /* points[15]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[615] /* points[15]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[505] /* points[15]._Gamma._sum2[2] variable */,data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1370
- type: SIMPLE_ASSIGN
- $cse57 = DIVISION(points[15].Gamma.sum2[1], points[15].Gamma.sum1[1]) + 0.358974358974359 * points[15].Gamma.G[1,1] * DIVISION(points[15].Gamma.tau[1,1] - DIVISION(points[15].Gamma.sum2[1], points[15].Gamma.sum1[1]), points[15].Gamma.sum1[1]) + 0.641025641025641 * points[15].Gamma.G[1,2] * DIVISION(points[15].Gamma.tau[1,2] - DIVISION(points[15].Gamma.sum2[2], points[15].Gamma.sum1[2]), points[15].Gamma.sum1[2])
- */
-void Graph_eqFunction_1370(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1370};
- data->localData[0]->realVars[113] /* $cse57 variable */ = DIVISION_SIM(data->localData[0]->realVars[504] /* points[15]._Gamma._sum2[1] variable */,data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes) + (0.358974358974359) * ((data->localData[0]->realVars[294] /* points[15]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[612] /* points[15]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[504] /* points[15]._Gamma._sum2[1] variable */,data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[424] /* points[15]._Gamma._sum1[1] variable */,"points[15].Gamma.sum1[1]",equationIndexes))) + (0.641025641025641) * ((data->localData[0]->realVars[295] /* points[15]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[613] /* points[15]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[505] /* points[15]._Gamma._sum2[2] variable */,data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[425] /* points[15]._Gamma._sum1[2] variable */,"points[15].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1371
- type: SIMPLE_ASSIGN
- points[15]._gamma[1] = exp($cse57)
- */
-void Graph_eqFunction_1371(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1371};
- data->localData[0]->realVars[902] /* points[15]._gamma[1] variable */ = exp(data->localData[0]->realVars[113] /* $cse57 variable */);
- TRACE_POP
-}
-/*
- equation index: 1372
- type: SIMPLE_ASSIGN
- points[15]._K[1] = 0.0001 * points[15].gamma[1] * $cse59
- */
-void Graph_eqFunction_1372(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1372};
- data->localData[0]->realVars[743] /* points[15]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[902] /* points[15]._gamma[1] variable */) * (data->localData[0]->realVars[115] /* $cse59 variable */));
- TRACE_POP
-}
-/*
- equation index: 1373
- type: SIMPLE_ASSIGN
- points[15]._K[2] = -0.5600000000000001 * points[15].K[1] - -1.56
- */
-void Graph_eqFunction_1373(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1373};
- data->localData[0]->realVars[744] /* points[15]._K[2] variable */ = (-0.5600000000000001) * (data->localData[0]->realVars[743] /* points[15]._K[1] variable */) - (-1.56);
- TRACE_POP
-}
-/*
- equation index: 1374
- type: SIMPLE_ASSIGN
- points[15]._gamma[2] = exp($cse58)
- */
-void Graph_eqFunction_1374(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1374};
- data->localData[0]->realVars[903] /* points[15]._gamma[2] variable */ = exp(data->localData[0]->realVars[114] /* $cse58 variable */);
- TRACE_POP
-}
-
-void residualFunc1376(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1376};
- /* iteration variables */
- data->localData[0]->realVars[214] /* T[15] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1355(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1356(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1357(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1358(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1359(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1360(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1361(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1362(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1363(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1364(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1365(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1366(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1367(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1368(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1369(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1370(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1371(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1372(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1373(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1374(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[903] /* points[15]._gamma[2] variable */) * (data->localData[0]->realVars[117] /* $cse60 variable */)) - data->localData[0]->realVars[744] /* points[15]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1376(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1376(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[15] */
- sysData->nominal[i] = data->modelData->realVarsData[214].attribute /* T[15] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[214].attribute /* T[15] */.min;
- sysData->max[i++] = data->modelData->realVarsData[214].attribute /* T[15] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1376(sysData);
-}
-
-void getIterationVarsNLS1376(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[214] /* T[15] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1381
- type: SIMPLE_ASSIGN
- $cse63 = Simulator.Files.ThermodynamicFunctions.Psat({points[16].comp[1].VP[1], points[16].comp[1].VP[2], points[16].comp[1].VP[3], points[16].comp[1].VP[4], points[16].comp[1].VP[5], points[16].comp[1].VP[6]}, T[16])
- */
-void Graph_eqFunction_1381(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1381};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11464], (modelica_real)data->simulationInfo->realParameter[11465], (modelica_real)data->simulationInfo->realParameter[11466], (modelica_real)data->simulationInfo->realParameter[11467], (modelica_real)data->simulationInfo->realParameter[11468], (modelica_real)data->simulationInfo->realParameter[11469]);
- data->localData[0]->realVars[120] /* $cse63 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[215] /* T[16] variable */);
- TRACE_POP
-}
-/*
- equation index: 1382
- type: SIMPLE_ASSIGN
- $cse64 = Simulator.Files.ThermodynamicFunctions.Psat({points[16].comp[2].VP[1], points[16].comp[2].VP[2], points[16].comp[2].VP[3], points[16].comp[2].VP[4], points[16].comp[2].VP[5], points[16].comp[2].VP[6]}, T[16])
- */
-void Graph_eqFunction_1382(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1382};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11470], (modelica_real)data->simulationInfo->realParameter[11471], (modelica_real)data->simulationInfo->realParameter[11472], (modelica_real)data->simulationInfo->realParameter[11473], (modelica_real)data->simulationInfo->realParameter[11474], (modelica_real)data->simulationInfo->realParameter[11475]);
- data->localData[0]->realVars[121] /* $cse64 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[215] /* T[16] variable */);
- TRACE_POP
-}
-/*
- equation index: 1383
- type: SIMPLE_ASSIGN
- points[16]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[16].BIP[1,1,1], T[16])
- */
-void Graph_eqFunction_1383(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1383};
- data->localData[0]->realVars[616] /* points[16]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[444],data->localData[0]->realVars[215] /* T[16] variable */,"T[16]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1384
- type: SIMPLE_ASSIGN
- points[16]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[16].BIP[2,1,1], T[16])
- */
-void Graph_eqFunction_1384(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1384};
- data->localData[0]->realVars[618] /* points[16]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[448],data->localData[0]->realVars[215] /* T[16] variable */,"T[16]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1385
- type: SIMPLE_ASSIGN
- points[16]._Gamma._G[2,1] = exp((-points[16].BIP[2,1,2]) * points[16].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1385(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1385};
- data->localData[0]->realVars[300] /* points[16]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[449])) * (data->localData[0]->realVars[618] /* points[16]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1386
- type: SIMPLE_ASSIGN
- points[16]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[16].BIP[1,2,1], T[16])
- */
-void Graph_eqFunction_1386(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1386};
- data->localData[0]->realVars[617] /* points[16]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[446],data->localData[0]->realVars[215] /* T[16] variable */,"T[16]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1387
- type: SIMPLE_ASSIGN
- points[16]._Gamma._G[1,2] = exp((-points[16].BIP[1,2,2]) * points[16].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1387(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1387};
- data->localData[0]->realVars[299] /* points[16]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[447])) * (data->localData[0]->realVars[617] /* points[16]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1388
- type: SIMPLE_ASSIGN
- points[16]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[16].BIP[2,2,1], T[16])
- */
-void Graph_eqFunction_1388(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1388};
- data->localData[0]->realVars[619] /* points[16]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[450],data->localData[0]->realVars[215] /* T[16] variable */,"T[16]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1389
- type: SIMPLE_ASSIGN
- points[16]._Gamma._G[2,2] = exp((-points[16].BIP[2,2,2]) * points[16].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1389(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1389};
- data->localData[0]->realVars[301] /* points[16]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[451])) * (data->localData[0]->realVars[619] /* points[16]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1390
- type: SIMPLE_ASSIGN
- points[16]._Gamma._sum2[2] = 0.3846153846153846 * points[16].Gamma.tau[1,2] * points[16].Gamma.G[1,2] + 0.6153846153846154 * points[16].Gamma.tau[2,2] * points[16].Gamma.G[2,2]
- */
-void Graph_eqFunction_1390(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1390};
- data->localData[0]->realVars[507] /* points[16]._Gamma._sum2[2] variable */ = (0.3846153846153846) * ((data->localData[0]->realVars[617] /* points[16]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[299] /* points[16]._Gamma._G[1,2] variable */)) + (0.6153846153846154) * ((data->localData[0]->realVars[619] /* points[16]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[301] /* points[16]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1391
- type: SIMPLE_ASSIGN
- points[16]._Gamma._G[1,1] = exp((-points[16].BIP[1,1,2]) * points[16].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1391(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1391};
- data->localData[0]->realVars[298] /* points[16]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[445])) * (data->localData[0]->realVars[616] /* points[16]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1392
- type: SIMPLE_ASSIGN
- points[16]._Gamma._sum2[1] = 0.3846153846153846 * points[16].Gamma.tau[1,1] * points[16].Gamma.G[1,1] + 0.6153846153846154 * points[16].Gamma.tau[2,1] * points[16].Gamma.G[2,1]
- */
-void Graph_eqFunction_1392(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1392};
- data->localData[0]->realVars[506] /* points[16]._Gamma._sum2[1] variable */ = (0.3846153846153846) * ((data->localData[0]->realVars[616] /* points[16]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[298] /* points[16]._Gamma._G[1,1] variable */)) + (0.6153846153846154) * ((data->localData[0]->realVars[618] /* points[16]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[300] /* points[16]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1393
- type: SIMPLE_ASSIGN
- points[16]._Gamma._sum1[1] = 0.3846153846153846 * points[16].Gamma.G[1,1] + 0.6153846153846154 * points[16].Gamma.G[2,1]
- */
-void Graph_eqFunction_1393(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1393};
- data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */ = (0.3846153846153846) * (data->localData[0]->realVars[298] /* points[16]._Gamma._G[1,1] variable */) + (0.6153846153846154) * (data->localData[0]->realVars[300] /* points[16]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1394
- type: SIMPLE_ASSIGN
- points[16]._Gamma._sum1[2] = 0.3846153846153846 * points[16].Gamma.G[1,2] + 0.6153846153846154 * points[16].Gamma.G[2,2]
- */
-void Graph_eqFunction_1394(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1394};
- data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */ = (0.3846153846153846) * (data->localData[0]->realVars[299] /* points[16]._Gamma._G[1,2] variable */) + (0.6153846153846154) * (data->localData[0]->realVars[301] /* points[16]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1395
- type: SIMPLE_ASSIGN
- $cse62 = DIVISION(points[16].Gamma.sum2[2], points[16].Gamma.sum1[2]) + 0.3846153846153846 * points[16].Gamma.G[2,1] * DIVISION(points[16].Gamma.tau[2,1] - DIVISION(points[16].Gamma.sum2[1], points[16].Gamma.sum1[1]), points[16].Gamma.sum1[1]) + 0.6153846153846154 * points[16].Gamma.G[2,2] * DIVISION(points[16].Gamma.tau[2,2] - DIVISION(points[16].Gamma.sum2[2], points[16].Gamma.sum1[2]), points[16].Gamma.sum1[2])
- */
-void Graph_eqFunction_1395(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1395};
- data->localData[0]->realVars[119] /* $cse62 variable */ = DIVISION_SIM(data->localData[0]->realVars[507] /* points[16]._Gamma._sum2[2] variable */,data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes) + (0.3846153846153846) * ((data->localData[0]->realVars[300] /* points[16]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[618] /* points[16]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[506] /* points[16]._Gamma._sum2[1] variable */,data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes))) + (0.6153846153846154) * ((data->localData[0]->realVars[301] /* points[16]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[619] /* points[16]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[507] /* points[16]._Gamma._sum2[2] variable */,data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1396
- type: SIMPLE_ASSIGN
- $cse61 = DIVISION(points[16].Gamma.sum2[1], points[16].Gamma.sum1[1]) + 0.3846153846153846 * points[16].Gamma.G[1,1] * DIVISION(points[16].Gamma.tau[1,1] - DIVISION(points[16].Gamma.sum2[1], points[16].Gamma.sum1[1]), points[16].Gamma.sum1[1]) + 0.6153846153846154 * points[16].Gamma.G[1,2] * DIVISION(points[16].Gamma.tau[1,2] - DIVISION(points[16].Gamma.sum2[2], points[16].Gamma.sum1[2]), points[16].Gamma.sum1[2])
- */
-void Graph_eqFunction_1396(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1396};
- data->localData[0]->realVars[118] /* $cse61 variable */ = DIVISION_SIM(data->localData[0]->realVars[506] /* points[16]._Gamma._sum2[1] variable */,data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes) + (0.3846153846153846) * ((data->localData[0]->realVars[298] /* points[16]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[616] /* points[16]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[506] /* points[16]._Gamma._sum2[1] variable */,data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[426] /* points[16]._Gamma._sum1[1] variable */,"points[16].Gamma.sum1[1]",equationIndexes))) + (0.6153846153846154) * ((data->localData[0]->realVars[299] /* points[16]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[617] /* points[16]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[507] /* points[16]._Gamma._sum2[2] variable */,data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[427] /* points[16]._Gamma._sum1[2] variable */,"points[16].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1397
- type: SIMPLE_ASSIGN
- points[16]._gamma[1] = exp($cse61)
- */
-void Graph_eqFunction_1397(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1397};
- data->localData[0]->realVars[904] /* points[16]._gamma[1] variable */ = exp(data->localData[0]->realVars[118] /* $cse61 variable */);
- TRACE_POP
-}
-/*
- equation index: 1398
- type: SIMPLE_ASSIGN
- points[16]._K[1] = 0.0001 * points[16].gamma[1] * $cse63
- */
-void Graph_eqFunction_1398(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1398};
- data->localData[0]->realVars[745] /* points[16]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[904] /* points[16]._gamma[1] variable */) * (data->localData[0]->realVars[120] /* $cse63 variable */));
- TRACE_POP
-}
-/*
- equation index: 1399
- type: SIMPLE_ASSIGN
- points[16]._K[2] = -0.625 * points[16].K[1] - -1.625
- */
-void Graph_eqFunction_1399(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1399};
- data->localData[0]->realVars[746] /* points[16]._K[2] variable */ = (-0.625) * (data->localData[0]->realVars[745] /* points[16]._K[1] variable */) - (-1.625);
- TRACE_POP
-}
-/*
- equation index: 1400
- type: SIMPLE_ASSIGN
- points[16]._gamma[2] = exp($cse62)
- */
-void Graph_eqFunction_1400(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1400};
- data->localData[0]->realVars[905] /* points[16]._gamma[2] variable */ = exp(data->localData[0]->realVars[119] /* $cse62 variable */);
- TRACE_POP
-}
-
-void residualFunc1402(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1402};
- /* iteration variables */
- data->localData[0]->realVars[215] /* T[16] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1381(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1382(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1383(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1384(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1385(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1386(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1387(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1388(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1389(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1390(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1391(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1392(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1393(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1394(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1395(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1396(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1397(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1398(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1399(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1400(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[905] /* points[16]._gamma[2] variable */) * (data->localData[0]->realVars[121] /* $cse64 variable */)) - data->localData[0]->realVars[746] /* points[16]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1402(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1402(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[16] */
- sysData->nominal[i] = data->modelData->realVarsData[215].attribute /* T[16] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[215].attribute /* T[16] */.min;
- sysData->max[i++] = data->modelData->realVarsData[215].attribute /* T[16] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1402(sysData);
-}
-
-void getIterationVarsNLS1402(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[215] /* T[16] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1407
- type: SIMPLE_ASSIGN
- $cse68 = Simulator.Files.ThermodynamicFunctions.Psat({points[17].comp[2].VP[1], points[17].comp[2].VP[2], points[17].comp[2].VP[3], points[17].comp[2].VP[4], points[17].comp[2].VP[5], points[17].comp[2].VP[6]}, T[17])
- */
-void Graph_eqFunction_1407(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1407};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11482], (modelica_real)data->simulationInfo->realParameter[11483], (modelica_real)data->simulationInfo->realParameter[11484], (modelica_real)data->simulationInfo->realParameter[11485], (modelica_real)data->simulationInfo->realParameter[11486], (modelica_real)data->simulationInfo->realParameter[11487]);
- data->localData[0]->realVars[125] /* $cse68 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[216] /* T[17] variable */);
- TRACE_POP
-}
-/*
- equation index: 1408
- type: SIMPLE_ASSIGN
- $cse67 = Simulator.Files.ThermodynamicFunctions.Psat({points[17].comp[1].VP[1], points[17].comp[1].VP[2], points[17].comp[1].VP[3], points[17].comp[1].VP[4], points[17].comp[1].VP[5], points[17].comp[1].VP[6]}, T[17])
- */
-void Graph_eqFunction_1408(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1408};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11476], (modelica_real)data->simulationInfo->realParameter[11477], (modelica_real)data->simulationInfo->realParameter[11478], (modelica_real)data->simulationInfo->realParameter[11479], (modelica_real)data->simulationInfo->realParameter[11480], (modelica_real)data->simulationInfo->realParameter[11481]);
- data->localData[0]->realVars[124] /* $cse67 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[216] /* T[17] variable */);
- TRACE_POP
-}
-/*
- equation index: 1409
- type: SIMPLE_ASSIGN
- points[17]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[17].BIP[1,1,1], T[17])
- */
-void Graph_eqFunction_1409(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1409};
- data->localData[0]->realVars[620] /* points[17]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[452],data->localData[0]->realVars[216] /* T[17] variable */,"T[17]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1410
- type: SIMPLE_ASSIGN
- points[17]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[17].BIP[2,1,1], T[17])
- */
-void Graph_eqFunction_1410(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1410};
- data->localData[0]->realVars[622] /* points[17]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[456],data->localData[0]->realVars[216] /* T[17] variable */,"T[17]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1411
- type: SIMPLE_ASSIGN
- points[17]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[17].BIP[1,2,1], T[17])
- */
-void Graph_eqFunction_1411(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1411};
- data->localData[0]->realVars[621] /* points[17]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[454],data->localData[0]->realVars[216] /* T[17] variable */,"T[17]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1412
- type: SIMPLE_ASSIGN
- points[17]._Gamma._G[1,2] = exp((-points[17].BIP[1,2,2]) * points[17].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1412(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1412};
- data->localData[0]->realVars[303] /* points[17]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[455])) * (data->localData[0]->realVars[621] /* points[17]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1413
- type: SIMPLE_ASSIGN
- points[17]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[17].BIP[2,2,1], T[17])
- */
-void Graph_eqFunction_1413(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1413};
- data->localData[0]->realVars[623] /* points[17]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[458],data->localData[0]->realVars[216] /* T[17] variable */,"T[17]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1414
- type: SIMPLE_ASSIGN
- points[17]._Gamma._G[2,2] = exp((-points[17].BIP[2,2,2]) * points[17].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1414(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1414};
- data->localData[0]->realVars[305] /* points[17]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[459])) * (data->localData[0]->realVars[623] /* points[17]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1415
- type: SIMPLE_ASSIGN
- points[17]._Gamma._sum2[2] = 0.4102564102564102 * points[17].Gamma.tau[1,2] * points[17].Gamma.G[1,2] + 0.5897435897435898 * points[17].Gamma.tau[2,2] * points[17].Gamma.G[2,2]
- */
-void Graph_eqFunction_1415(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1415};
- data->localData[0]->realVars[509] /* points[17]._Gamma._sum2[2] variable */ = (0.4102564102564102) * ((data->localData[0]->realVars[621] /* points[17]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[303] /* points[17]._Gamma._G[1,2] variable */)) + (0.5897435897435898) * ((data->localData[0]->realVars[623] /* points[17]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[305] /* points[17]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1416
- type: SIMPLE_ASSIGN
- points[17]._Gamma._G[2,1] = exp((-points[17].BIP[2,1,2]) * points[17].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1416(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1416};
- data->localData[0]->realVars[304] /* points[17]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[457])) * (data->localData[0]->realVars[622] /* points[17]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1417
- type: SIMPLE_ASSIGN
- points[17]._Gamma._G[1,1] = exp((-points[17].BIP[1,1,2]) * points[17].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1417(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1417};
- data->localData[0]->realVars[302] /* points[17]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[453])) * (data->localData[0]->realVars[620] /* points[17]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1418
- type: SIMPLE_ASSIGN
- points[17]._Gamma._sum2[1] = 0.4102564102564102 * points[17].Gamma.tau[1,1] * points[17].Gamma.G[1,1] + 0.5897435897435898 * points[17].Gamma.tau[2,1] * points[17].Gamma.G[2,1]
- */
-void Graph_eqFunction_1418(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1418};
- data->localData[0]->realVars[508] /* points[17]._Gamma._sum2[1] variable */ = (0.4102564102564102) * ((data->localData[0]->realVars[620] /* points[17]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[302] /* points[17]._Gamma._G[1,1] variable */)) + (0.5897435897435898) * ((data->localData[0]->realVars[622] /* points[17]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[304] /* points[17]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1419
- type: SIMPLE_ASSIGN
- points[17]._Gamma._sum1[2] = 0.4102564102564102 * points[17].Gamma.G[1,2] + 0.5897435897435898 * points[17].Gamma.G[2,2]
- */
-void Graph_eqFunction_1419(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1419};
- data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */ = (0.4102564102564102) * (data->localData[0]->realVars[303] /* points[17]._Gamma._G[1,2] variable */) + (0.5897435897435898) * (data->localData[0]->realVars[305] /* points[17]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1420
- type: SIMPLE_ASSIGN
- points[17]._Gamma._sum1[1] = 0.4102564102564102 * points[17].Gamma.G[1,1] + 0.5897435897435898 * points[17].Gamma.G[2,1]
- */
-void Graph_eqFunction_1420(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1420};
- data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */ = (0.4102564102564102) * (data->localData[0]->realVars[302] /* points[17]._Gamma._G[1,1] variable */) + (0.5897435897435898) * (data->localData[0]->realVars[304] /* points[17]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1421
- type: SIMPLE_ASSIGN
- $cse66 = DIVISION(points[17].Gamma.sum2[2], points[17].Gamma.sum1[2]) + 0.4102564102564102 * points[17].Gamma.G[2,1] * DIVISION(points[17].Gamma.tau[2,1] - DIVISION(points[17].Gamma.sum2[1], points[17].Gamma.sum1[1]), points[17].Gamma.sum1[1]) + 0.5897435897435898 * points[17].Gamma.G[2,2] * DIVISION(points[17].Gamma.tau[2,2] - DIVISION(points[17].Gamma.sum2[2], points[17].Gamma.sum1[2]), points[17].Gamma.sum1[2])
- */
-void Graph_eqFunction_1421(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1421};
- data->localData[0]->realVars[123] /* $cse66 variable */ = DIVISION_SIM(data->localData[0]->realVars[509] /* points[17]._Gamma._sum2[2] variable */,data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes) + (0.4102564102564102) * ((data->localData[0]->realVars[304] /* points[17]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[622] /* points[17]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[508] /* points[17]._Gamma._sum2[1] variable */,data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes))) + (0.5897435897435898) * ((data->localData[0]->realVars[305] /* points[17]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[623] /* points[17]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[509] /* points[17]._Gamma._sum2[2] variable */,data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1422
- type: SIMPLE_ASSIGN
- $cse65 = DIVISION(points[17].Gamma.sum2[1], points[17].Gamma.sum1[1]) + 0.4102564102564102 * points[17].Gamma.G[1,1] * DIVISION(points[17].Gamma.tau[1,1] - DIVISION(points[17].Gamma.sum2[1], points[17].Gamma.sum1[1]), points[17].Gamma.sum1[1]) + 0.5897435897435898 * points[17].Gamma.G[1,2] * DIVISION(points[17].Gamma.tau[1,2] - DIVISION(points[17].Gamma.sum2[2], points[17].Gamma.sum1[2]), points[17].Gamma.sum1[2])
- */
-void Graph_eqFunction_1422(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1422};
- data->localData[0]->realVars[122] /* $cse65 variable */ = DIVISION_SIM(data->localData[0]->realVars[508] /* points[17]._Gamma._sum2[1] variable */,data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes) + (0.4102564102564102) * ((data->localData[0]->realVars[302] /* points[17]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[620] /* points[17]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[508] /* points[17]._Gamma._sum2[1] variable */,data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[428] /* points[17]._Gamma._sum1[1] variable */,"points[17].Gamma.sum1[1]",equationIndexes))) + (0.5897435897435898) * ((data->localData[0]->realVars[303] /* points[17]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[621] /* points[17]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[509] /* points[17]._Gamma._sum2[2] variable */,data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[429] /* points[17]._Gamma._sum1[2] variable */,"points[17].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1423
- type: SIMPLE_ASSIGN
- points[17]._gamma[2] = exp($cse66)
- */
-void Graph_eqFunction_1423(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1423};
- data->localData[0]->realVars[907] /* points[17]._gamma[2] variable */ = exp(data->localData[0]->realVars[123] /* $cse66 variable */);
- TRACE_POP
-}
-/*
- equation index: 1424
- type: SIMPLE_ASSIGN
- points[17]._K[2] = 0.0001 * points[17].gamma[2] * $cse68
- */
-void Graph_eqFunction_1424(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1424};
- data->localData[0]->realVars[748] /* points[17]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[907] /* points[17]._gamma[2] variable */) * (data->localData[0]->realVars[125] /* $cse68 variable */));
- TRACE_POP
-}
-/*
- equation index: 1425
- type: SIMPLE_ASSIGN
- points[17]._K[1] = -1.4375 * points[17].K[2] - -2.4375
- */
-void Graph_eqFunction_1425(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1425};
- data->localData[0]->realVars[747] /* points[17]._K[1] variable */ = (-1.4375) * (data->localData[0]->realVars[748] /* points[17]._K[2] variable */) - (-2.4375);
- TRACE_POP
-}
-/*
- equation index: 1426
- type: SIMPLE_ASSIGN
- points[17]._gamma[1] = exp($cse65)
- */
-void Graph_eqFunction_1426(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1426};
- data->localData[0]->realVars[906] /* points[17]._gamma[1] variable */ = exp(data->localData[0]->realVars[122] /* $cse65 variable */);
- TRACE_POP
-}
-
-void residualFunc1428(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1428};
- /* iteration variables */
- data->localData[0]->realVars[216] /* T[17] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1407(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1408(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1409(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1410(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1411(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1412(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1413(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1414(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1415(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1416(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1417(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1418(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1419(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1420(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1421(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1422(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1423(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1424(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1425(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1426(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[906] /* points[17]._gamma[1] variable */) * (data->localData[0]->realVars[124] /* $cse67 variable */)) - data->localData[0]->realVars[747] /* points[17]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1428(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1428(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[17] */
- sysData->nominal[i] = data->modelData->realVarsData[216].attribute /* T[17] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[216].attribute /* T[17] */.min;
- sysData->max[i++] = data->modelData->realVarsData[216].attribute /* T[17] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1428(sysData);
-}
-
-void getIterationVarsNLS1428(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[216] /* T[17] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1433
- type: SIMPLE_ASSIGN
- $cse71 = Simulator.Files.ThermodynamicFunctions.Psat({points[18].comp[1].VP[1], points[18].comp[1].VP[2], points[18].comp[1].VP[3], points[18].comp[1].VP[4], points[18].comp[1].VP[5], points[18].comp[1].VP[6]}, T[18])
- */
-void Graph_eqFunction_1433(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1433};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11488], (modelica_real)data->simulationInfo->realParameter[11489], (modelica_real)data->simulationInfo->realParameter[11490], (modelica_real)data->simulationInfo->realParameter[11491], (modelica_real)data->simulationInfo->realParameter[11492], (modelica_real)data->simulationInfo->realParameter[11493]);
- data->localData[0]->realVars[129] /* $cse71 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[217] /* T[18] variable */);
- TRACE_POP
-}
-/*
- equation index: 1434
- type: SIMPLE_ASSIGN
- $cse72 = Simulator.Files.ThermodynamicFunctions.Psat({points[18].comp[2].VP[1], points[18].comp[2].VP[2], points[18].comp[2].VP[3], points[18].comp[2].VP[4], points[18].comp[2].VP[5], points[18].comp[2].VP[6]}, T[18])
- */
-void Graph_eqFunction_1434(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1434};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11494], (modelica_real)data->simulationInfo->realParameter[11495], (modelica_real)data->simulationInfo->realParameter[11496], (modelica_real)data->simulationInfo->realParameter[11497], (modelica_real)data->simulationInfo->realParameter[11498], (modelica_real)data->simulationInfo->realParameter[11499]);
- data->localData[0]->realVars[130] /* $cse72 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[217] /* T[18] variable */);
- TRACE_POP
-}
-/*
- equation index: 1435
- type: SIMPLE_ASSIGN
- points[18]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[18].BIP[1,1,1], T[18])
- */
-void Graph_eqFunction_1435(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1435};
- data->localData[0]->realVars[624] /* points[18]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[460],data->localData[0]->realVars[217] /* T[18] variable */,"T[18]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1436
- type: SIMPLE_ASSIGN
- points[18]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[18].BIP[1,2,1], T[18])
- */
-void Graph_eqFunction_1436(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1436};
- data->localData[0]->realVars[625] /* points[18]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[462],data->localData[0]->realVars[217] /* T[18] variable */,"T[18]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1437
- type: SIMPLE_ASSIGN
- points[18]._Gamma._G[1,2] = exp((-points[18].BIP[1,2,2]) * points[18].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1437(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1437};
- data->localData[0]->realVars[307] /* points[18]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[463])) * (data->localData[0]->realVars[625] /* points[18]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1438
- type: SIMPLE_ASSIGN
- points[18]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[18].BIP[2,2,1], T[18])
- */
-void Graph_eqFunction_1438(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1438};
- data->localData[0]->realVars[627] /* points[18]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[466],data->localData[0]->realVars[217] /* T[18] variable */,"T[18]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1439
- type: SIMPLE_ASSIGN
- points[18]._Gamma._G[2,2] = exp((-points[18].BIP[2,2,2]) * points[18].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1439(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1439};
- data->localData[0]->realVars[309] /* points[18]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[467])) * (data->localData[0]->realVars[627] /* points[18]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1440
- type: SIMPLE_ASSIGN
- points[18]._Gamma._sum2[2] = 0.4358974358974359 * points[18].Gamma.tau[1,2] * points[18].Gamma.G[1,2] + 0.5641025641025641 * points[18].Gamma.tau[2,2] * points[18].Gamma.G[2,2]
- */
-void Graph_eqFunction_1440(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1440};
- data->localData[0]->realVars[511] /* points[18]._Gamma._sum2[2] variable */ = (0.4358974358974359) * ((data->localData[0]->realVars[625] /* points[18]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[307] /* points[18]._Gamma._G[1,2] variable */)) + (0.5641025641025641) * ((data->localData[0]->realVars[627] /* points[18]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[309] /* points[18]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1441
- type: SIMPLE_ASSIGN
- points[18]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[18].BIP[2,1,1], T[18])
- */
-void Graph_eqFunction_1441(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1441};
- data->localData[0]->realVars[626] /* points[18]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[464],data->localData[0]->realVars[217] /* T[18] variable */,"T[18]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1442
- type: SIMPLE_ASSIGN
- points[18]._Gamma._G[2,1] = exp((-points[18].BIP[2,1,2]) * points[18].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1442(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1442};
- data->localData[0]->realVars[308] /* points[18]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[465])) * (data->localData[0]->realVars[626] /* points[18]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1443
- type: SIMPLE_ASSIGN
- points[18]._Gamma._G[1,1] = exp((-points[18].BIP[1,1,2]) * points[18].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1443(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1443};
- data->localData[0]->realVars[306] /* points[18]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[461])) * (data->localData[0]->realVars[624] /* points[18]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1444
- type: SIMPLE_ASSIGN
- points[18]._Gamma._sum2[1] = 0.4358974358974359 * points[18].Gamma.tau[1,1] * points[18].Gamma.G[1,1] + 0.5641025641025641 * points[18].Gamma.tau[2,1] * points[18].Gamma.G[2,1]
- */
-void Graph_eqFunction_1444(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1444};
- data->localData[0]->realVars[510] /* points[18]._Gamma._sum2[1] variable */ = (0.4358974358974359) * ((data->localData[0]->realVars[624] /* points[18]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[306] /* points[18]._Gamma._G[1,1] variable */)) + (0.5641025641025641) * ((data->localData[0]->realVars[626] /* points[18]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[308] /* points[18]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1445
- type: SIMPLE_ASSIGN
- points[18]._Gamma._sum1[2] = 0.4358974358974359 * points[18].Gamma.G[1,2] + 0.5641025641025641 * points[18].Gamma.G[2,2]
- */
-void Graph_eqFunction_1445(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1445};
- data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */ = (0.4358974358974359) * (data->localData[0]->realVars[307] /* points[18]._Gamma._G[1,2] variable */) + (0.5641025641025641) * (data->localData[0]->realVars[309] /* points[18]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1446
- type: SIMPLE_ASSIGN
- points[18]._Gamma._sum1[1] = 0.4358974358974359 * points[18].Gamma.G[1,1] + 0.5641025641025641 * points[18].Gamma.G[2,1]
- */
-void Graph_eqFunction_1446(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1446};
- data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */ = (0.4358974358974359) * (data->localData[0]->realVars[306] /* points[18]._Gamma._G[1,1] variable */) + (0.5641025641025641) * (data->localData[0]->realVars[308] /* points[18]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1447
- type: SIMPLE_ASSIGN
- $cse70 = DIVISION(points[18].Gamma.sum2[2], points[18].Gamma.sum1[2]) + 0.4358974358974359 * points[18].Gamma.G[2,1] * DIVISION(points[18].Gamma.tau[2,1] - DIVISION(points[18].Gamma.sum2[1], points[18].Gamma.sum1[1]), points[18].Gamma.sum1[1]) + 0.5641025641025641 * points[18].Gamma.G[2,2] * DIVISION(points[18].Gamma.tau[2,2] - DIVISION(points[18].Gamma.sum2[2], points[18].Gamma.sum1[2]), points[18].Gamma.sum1[2])
- */
-void Graph_eqFunction_1447(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1447};
- data->localData[0]->realVars[128] /* $cse70 variable */ = DIVISION_SIM(data->localData[0]->realVars[511] /* points[18]._Gamma._sum2[2] variable */,data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes) + (0.4358974358974359) * ((data->localData[0]->realVars[308] /* points[18]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[626] /* points[18]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[510] /* points[18]._Gamma._sum2[1] variable */,data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes))) + (0.5641025641025641) * ((data->localData[0]->realVars[309] /* points[18]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[627] /* points[18]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[511] /* points[18]._Gamma._sum2[2] variable */,data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1448
- type: SIMPLE_ASSIGN
- $cse69 = DIVISION(points[18].Gamma.sum2[1], points[18].Gamma.sum1[1]) + 0.4358974358974359 * points[18].Gamma.G[1,1] * DIVISION(points[18].Gamma.tau[1,1] - DIVISION(points[18].Gamma.sum2[1], points[18].Gamma.sum1[1]), points[18].Gamma.sum1[1]) + 0.5641025641025641 * points[18].Gamma.G[1,2] * DIVISION(points[18].Gamma.tau[1,2] - DIVISION(points[18].Gamma.sum2[2], points[18].Gamma.sum1[2]), points[18].Gamma.sum1[2])
- */
-void Graph_eqFunction_1448(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1448};
- data->localData[0]->realVars[126] /* $cse69 variable */ = DIVISION_SIM(data->localData[0]->realVars[510] /* points[18]._Gamma._sum2[1] variable */,data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes) + (0.4358974358974359) * ((data->localData[0]->realVars[306] /* points[18]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[624] /* points[18]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[510] /* points[18]._Gamma._sum2[1] variable */,data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[430] /* points[18]._Gamma._sum1[1] variable */,"points[18].Gamma.sum1[1]",equationIndexes))) + (0.5641025641025641) * ((data->localData[0]->realVars[307] /* points[18]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[625] /* points[18]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[511] /* points[18]._Gamma._sum2[2] variable */,data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[431] /* points[18]._Gamma._sum1[2] variable */,"points[18].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1449
- type: SIMPLE_ASSIGN
- points[18]._gamma[2] = exp($cse70)
- */
-void Graph_eqFunction_1449(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1449};
- data->localData[0]->realVars[909] /* points[18]._gamma[2] variable */ = exp(data->localData[0]->realVars[128] /* $cse70 variable */);
- TRACE_POP
-}
-/*
- equation index: 1450
- type: SIMPLE_ASSIGN
- points[18]._K[2] = 0.0001 * points[18].gamma[2] * $cse72
- */
-void Graph_eqFunction_1450(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1450};
- data->localData[0]->realVars[750] /* points[18]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[909] /* points[18]._gamma[2] variable */) * (data->localData[0]->realVars[130] /* $cse72 variable */));
- TRACE_POP
-}
-/*
- equation index: 1451
- type: SIMPLE_ASSIGN
- points[18]._K[1] = -1.294117647058824 * points[18].K[2] - -2.294117647058823
- */
-void Graph_eqFunction_1451(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1451};
- data->localData[0]->realVars[749] /* points[18]._K[1] variable */ = (-1.294117647058824) * (data->localData[0]->realVars[750] /* points[18]._K[2] variable */) - (-2.294117647058823);
- TRACE_POP
-}
-/*
- equation index: 1452
- type: SIMPLE_ASSIGN
- points[18]._gamma[1] = exp($cse69)
- */
-void Graph_eqFunction_1452(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1452};
- data->localData[0]->realVars[908] /* points[18]._gamma[1] variable */ = exp(data->localData[0]->realVars[126] /* $cse69 variable */);
- TRACE_POP
-}
-
-void residualFunc1454(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1454};
- /* iteration variables */
- data->localData[0]->realVars[217] /* T[18] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1433(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1434(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1435(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1436(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1437(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1438(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1439(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1440(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1441(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1442(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1443(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1444(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1445(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1446(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1447(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1448(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1449(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1450(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1451(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1452(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[908] /* points[18]._gamma[1] variable */) * (data->localData[0]->realVars[129] /* $cse71 variable */)) - data->localData[0]->realVars[749] /* points[18]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1454(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1454(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[18] */
- sysData->nominal[i] = data->modelData->realVarsData[217].attribute /* T[18] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[217].attribute /* T[18] */.min;
- sysData->max[i++] = data->modelData->realVarsData[217].attribute /* T[18] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1454(sysData);
-}
-
-void getIterationVarsNLS1454(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[217] /* T[18] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1459
- type: SIMPLE_ASSIGN
- $cse76 = Simulator.Files.ThermodynamicFunctions.Psat({points[19].comp[2].VP[1], points[19].comp[2].VP[2], points[19].comp[2].VP[3], points[19].comp[2].VP[4], points[19].comp[2].VP[5], points[19].comp[2].VP[6]}, T[19])
- */
-void Graph_eqFunction_1459(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1459};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11506], (modelica_real)data->simulationInfo->realParameter[11507], (modelica_real)data->simulationInfo->realParameter[11508], (modelica_real)data->simulationInfo->realParameter[11509], (modelica_real)data->simulationInfo->realParameter[11510], (modelica_real)data->simulationInfo->realParameter[11511]);
- data->localData[0]->realVars[134] /* $cse76 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[218] /* T[19] variable */);
- TRACE_POP
-}
-/*
- equation index: 1460
- type: SIMPLE_ASSIGN
- $cse75 = Simulator.Files.ThermodynamicFunctions.Psat({points[19].comp[1].VP[1], points[19].comp[1].VP[2], points[19].comp[1].VP[3], points[19].comp[1].VP[4], points[19].comp[1].VP[5], points[19].comp[1].VP[6]}, T[19])
- */
-void Graph_eqFunction_1460(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1460};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11500], (modelica_real)data->simulationInfo->realParameter[11501], (modelica_real)data->simulationInfo->realParameter[11502], (modelica_real)data->simulationInfo->realParameter[11503], (modelica_real)data->simulationInfo->realParameter[11504], (modelica_real)data->simulationInfo->realParameter[11505]);
- data->localData[0]->realVars[133] /* $cse75 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[218] /* T[19] variable */);
- TRACE_POP
-}
-/*
- equation index: 1461
- type: SIMPLE_ASSIGN
- points[19]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[19].BIP[1,1,1], T[19])
- */
-void Graph_eqFunction_1461(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1461};
- data->localData[0]->realVars[628] /* points[19]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[468],data->localData[0]->realVars[218] /* T[19] variable */,"T[19]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1462
- type: SIMPLE_ASSIGN
- points[19]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[19].BIP[1,2,1], T[19])
- */
-void Graph_eqFunction_1462(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1462};
- data->localData[0]->realVars[629] /* points[19]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[470],data->localData[0]->realVars[218] /* T[19] variable */,"T[19]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1463
- type: SIMPLE_ASSIGN
- points[19]._Gamma._G[1,2] = exp((-points[19].BIP[1,2,2]) * points[19].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1463(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1463};
- data->localData[0]->realVars[311] /* points[19]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[471])) * (data->localData[0]->realVars[629] /* points[19]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1464
- type: SIMPLE_ASSIGN
- points[19]._Gamma._G[1,1] = exp((-points[19].BIP[1,1,2]) * points[19].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1464(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1464};
- data->localData[0]->realVars[310] /* points[19]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[469])) * (data->localData[0]->realVars[628] /* points[19]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1465
- type: SIMPLE_ASSIGN
- points[19]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[19].BIP[2,1,1], T[19])
- */
-void Graph_eqFunction_1465(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1465};
- data->localData[0]->realVars[630] /* points[19]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[472],data->localData[0]->realVars[218] /* T[19] variable */,"T[19]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1466
- type: SIMPLE_ASSIGN
- points[19]._Gamma._G[2,1] = exp((-points[19].BIP[2,1,2]) * points[19].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1466(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1466};
- data->localData[0]->realVars[312] /* points[19]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[473])) * (data->localData[0]->realVars[630] /* points[19]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1467
- type: SIMPLE_ASSIGN
- points[19]._Gamma._sum2[1] = 0.4615384615384616 * points[19].Gamma.tau[1,1] * points[19].Gamma.G[1,1] + 0.5384615384615384 * points[19].Gamma.tau[2,1] * points[19].Gamma.G[2,1]
- */
-void Graph_eqFunction_1467(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1467};
- data->localData[0]->realVars[512] /* points[19]._Gamma._sum2[1] variable */ = (0.4615384615384616) * ((data->localData[0]->realVars[628] /* points[19]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[310] /* points[19]._Gamma._G[1,1] variable */)) + (0.5384615384615384) * ((data->localData[0]->realVars[630] /* points[19]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[312] /* points[19]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1468
- type: SIMPLE_ASSIGN
- points[19]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[19].BIP[2,2,1], T[19])
- */
-void Graph_eqFunction_1468(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1468};
- data->localData[0]->realVars[631] /* points[19]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[474],data->localData[0]->realVars[218] /* T[19] variable */,"T[19]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1469
- type: SIMPLE_ASSIGN
- points[19]._Gamma._G[2,2] = exp((-points[19].BIP[2,2,2]) * points[19].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1469(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1469};
- data->localData[0]->realVars[313] /* points[19]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[475])) * (data->localData[0]->realVars[631] /* points[19]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1470
- type: SIMPLE_ASSIGN
- points[19]._Gamma._sum2[2] = 0.4615384615384616 * points[19].Gamma.tau[1,2] * points[19].Gamma.G[1,2] + 0.5384615384615384 * points[19].Gamma.tau[2,2] * points[19].Gamma.G[2,2]
- */
-void Graph_eqFunction_1470(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1470};
- data->localData[0]->realVars[513] /* points[19]._Gamma._sum2[2] variable */ = (0.4615384615384616) * ((data->localData[0]->realVars[629] /* points[19]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[311] /* points[19]._Gamma._G[1,2] variable */)) + (0.5384615384615384) * ((data->localData[0]->realVars[631] /* points[19]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[313] /* points[19]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1471
- type: SIMPLE_ASSIGN
- points[19]._Gamma._sum1[2] = 0.4615384615384616 * points[19].Gamma.G[1,2] + 0.5384615384615384 * points[19].Gamma.G[2,2]
- */
-void Graph_eqFunction_1471(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1471};
- data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */ = (0.4615384615384616) * (data->localData[0]->realVars[311] /* points[19]._Gamma._G[1,2] variable */) + (0.5384615384615384) * (data->localData[0]->realVars[313] /* points[19]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1472
- type: SIMPLE_ASSIGN
- points[19]._Gamma._sum1[1] = 0.4615384615384616 * points[19].Gamma.G[1,1] + 0.5384615384615384 * points[19].Gamma.G[2,1]
- */
-void Graph_eqFunction_1472(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1472};
- data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */ = (0.4615384615384616) * (data->localData[0]->realVars[310] /* points[19]._Gamma._G[1,1] variable */) + (0.5384615384615384) * (data->localData[0]->realVars[312] /* points[19]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1473
- type: SIMPLE_ASSIGN
- $cse74 = DIVISION(points[19].Gamma.sum2[2], points[19].Gamma.sum1[2]) + 0.4615384615384616 * points[19].Gamma.G[2,1] * DIVISION(points[19].Gamma.tau[2,1] - DIVISION(points[19].Gamma.sum2[1], points[19].Gamma.sum1[1]), points[19].Gamma.sum1[1]) + 0.5384615384615384 * points[19].Gamma.G[2,2] * DIVISION(points[19].Gamma.tau[2,2] - DIVISION(points[19].Gamma.sum2[2], points[19].Gamma.sum1[2]), points[19].Gamma.sum1[2])
- */
-void Graph_eqFunction_1473(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1473};
- data->localData[0]->realVars[132] /* $cse74 variable */ = DIVISION_SIM(data->localData[0]->realVars[513] /* points[19]._Gamma._sum2[2] variable */,data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes) + (0.4615384615384616) * ((data->localData[0]->realVars[312] /* points[19]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[630] /* points[19]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[512] /* points[19]._Gamma._sum2[1] variable */,data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes))) + (0.5384615384615384) * ((data->localData[0]->realVars[313] /* points[19]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[631] /* points[19]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[513] /* points[19]._Gamma._sum2[2] variable */,data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1474
- type: SIMPLE_ASSIGN
- $cse73 = DIVISION(points[19].Gamma.sum2[1], points[19].Gamma.sum1[1]) + 0.4615384615384616 * points[19].Gamma.G[1,1] * DIVISION(points[19].Gamma.tau[1,1] - DIVISION(points[19].Gamma.sum2[1], points[19].Gamma.sum1[1]), points[19].Gamma.sum1[1]) + 0.5384615384615384 * points[19].Gamma.G[1,2] * DIVISION(points[19].Gamma.tau[1,2] - DIVISION(points[19].Gamma.sum2[2], points[19].Gamma.sum1[2]), points[19].Gamma.sum1[2])
- */
-void Graph_eqFunction_1474(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1474};
- data->localData[0]->realVars[131] /* $cse73 variable */ = DIVISION_SIM(data->localData[0]->realVars[512] /* points[19]._Gamma._sum2[1] variable */,data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes) + (0.4615384615384616) * ((data->localData[0]->realVars[310] /* points[19]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[628] /* points[19]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[512] /* points[19]._Gamma._sum2[1] variable */,data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[432] /* points[19]._Gamma._sum1[1] variable */,"points[19].Gamma.sum1[1]",equationIndexes))) + (0.5384615384615384) * ((data->localData[0]->realVars[311] /* points[19]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[629] /* points[19]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[513] /* points[19]._Gamma._sum2[2] variable */,data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[433] /* points[19]._Gamma._sum1[2] variable */,"points[19].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1475
- type: SIMPLE_ASSIGN
- points[19]._gamma[1] = exp($cse73)
- */
-void Graph_eqFunction_1475(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1475};
- data->localData[0]->realVars[910] /* points[19]._gamma[1] variable */ = exp(data->localData[0]->realVars[131] /* $cse73 variable */);
- TRACE_POP
-}
-/*
- equation index: 1476
- type: SIMPLE_ASSIGN
- points[19]._K[1] = 0.0001 * points[19].gamma[1] * $cse75
- */
-void Graph_eqFunction_1476(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1476};
- data->localData[0]->realVars[751] /* points[19]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[910] /* points[19]._gamma[1] variable */) * (data->localData[0]->realVars[133] /* $cse75 variable */));
- TRACE_POP
-}
-/*
- equation index: 1477
- type: SIMPLE_ASSIGN
- points[19]._K[2] = -0.8571428571428572 * points[19].K[1] - -1.857142857142857
- */
-void Graph_eqFunction_1477(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1477};
- data->localData[0]->realVars[752] /* points[19]._K[2] variable */ = (-0.8571428571428572) * (data->localData[0]->realVars[751] /* points[19]._K[1] variable */) - (-1.857142857142857);
- TRACE_POP
-}
-/*
- equation index: 1478
- type: SIMPLE_ASSIGN
- points[19]._gamma[2] = exp($cse74)
- */
-void Graph_eqFunction_1478(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1478};
- data->localData[0]->realVars[911] /* points[19]._gamma[2] variable */ = exp(data->localData[0]->realVars[132] /* $cse74 variable */);
- TRACE_POP
-}
-
-void residualFunc1480(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1480};
- /* iteration variables */
- data->localData[0]->realVars[218] /* T[19] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1459(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1460(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1461(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1462(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1463(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1464(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1465(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1466(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1467(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1468(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1469(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1470(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1471(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1472(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1473(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1474(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1475(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1476(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1477(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1478(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[911] /* points[19]._gamma[2] variable */) * (data->localData[0]->realVars[134] /* $cse76 variable */)) - data->localData[0]->realVars[752] /* points[19]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1480(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1480(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[19] */
- sysData->nominal[i] = data->modelData->realVarsData[218].attribute /* T[19] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[218].attribute /* T[19] */.min;
- sysData->max[i++] = data->modelData->realVarsData[218].attribute /* T[19] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1480(sysData);
-}
-
-void getIterationVarsNLS1480(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[218] /* T[19] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1485
- type: SIMPLE_ASSIGN
- $cse80 = Simulator.Files.ThermodynamicFunctions.Psat({points[20].comp[2].VP[1], points[20].comp[2].VP[2], points[20].comp[2].VP[3], points[20].comp[2].VP[4], points[20].comp[2].VP[5], points[20].comp[2].VP[6]}, T[20])
- */
-void Graph_eqFunction_1485(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1485};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11518], (modelica_real)data->simulationInfo->realParameter[11519], (modelica_real)data->simulationInfo->realParameter[11520], (modelica_real)data->simulationInfo->realParameter[11521], (modelica_real)data->simulationInfo->realParameter[11522], (modelica_real)data->simulationInfo->realParameter[11523]);
- data->localData[0]->realVars[139] /* $cse80 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[219] /* T[20] variable */);
- TRACE_POP
-}
-/*
- equation index: 1486
- type: SIMPLE_ASSIGN
- $cse79 = Simulator.Files.ThermodynamicFunctions.Psat({points[20].comp[1].VP[1], points[20].comp[1].VP[2], points[20].comp[1].VP[3], points[20].comp[1].VP[4], points[20].comp[1].VP[5], points[20].comp[1].VP[6]}, T[20])
- */
-void Graph_eqFunction_1486(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1486};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11512], (modelica_real)data->simulationInfo->realParameter[11513], (modelica_real)data->simulationInfo->realParameter[11514], (modelica_real)data->simulationInfo->realParameter[11515], (modelica_real)data->simulationInfo->realParameter[11516], (modelica_real)data->simulationInfo->realParameter[11517]);
- data->localData[0]->realVars[137] /* $cse79 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[219] /* T[20] variable */);
- TRACE_POP
-}
-/*
- equation index: 1487
- type: SIMPLE_ASSIGN
- points[20]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[20].BIP[1,1,1], T[20])
- */
-void Graph_eqFunction_1487(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1487};
- data->localData[0]->realVars[632] /* points[20]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[476],data->localData[0]->realVars[219] /* T[20] variable */,"T[20]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1488
- type: SIMPLE_ASSIGN
- points[20]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[20].BIP[2,2,1], T[20])
- */
-void Graph_eqFunction_1488(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1488};
- data->localData[0]->realVars[635] /* points[20]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[482],data->localData[0]->realVars[219] /* T[20] variable */,"T[20]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1489
- type: SIMPLE_ASSIGN
- points[20]._Gamma._G[2,2] = exp((-points[20].BIP[2,2,2]) * points[20].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1489(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1489};
- data->localData[0]->realVars[317] /* points[20]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[483])) * (data->localData[0]->realVars[635] /* points[20]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1490
- type: SIMPLE_ASSIGN
- points[20]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[20].BIP[1,2,1], T[20])
- */
-void Graph_eqFunction_1490(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1490};
- data->localData[0]->realVars[633] /* points[20]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[478],data->localData[0]->realVars[219] /* T[20] variable */,"T[20]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1491
- type: SIMPLE_ASSIGN
- points[20]._Gamma._G[1,2] = exp((-points[20].BIP[1,2,2]) * points[20].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1491(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1491};
- data->localData[0]->realVars[315] /* points[20]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[479])) * (data->localData[0]->realVars[633] /* points[20]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1492
- type: SIMPLE_ASSIGN
- points[20]._Gamma._sum2[2] = 0.4871794871794872 * points[20].Gamma.tau[1,2] * points[20].Gamma.G[1,2] + 0.5128205128205128 * points[20].Gamma.tau[2,2] * points[20].Gamma.G[2,2]
- */
-void Graph_eqFunction_1492(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1492};
- data->localData[0]->realVars[515] /* points[20]._Gamma._sum2[2] variable */ = (0.4871794871794872) * ((data->localData[0]->realVars[633] /* points[20]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[315] /* points[20]._Gamma._G[1,2] variable */)) + (0.5128205128205128) * ((data->localData[0]->realVars[635] /* points[20]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[317] /* points[20]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1493
- type: SIMPLE_ASSIGN
- points[20]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[20].BIP[2,1,1], T[20])
- */
-void Graph_eqFunction_1493(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1493};
- data->localData[0]->realVars[634] /* points[20]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[480],data->localData[0]->realVars[219] /* T[20] variable */,"T[20]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1494
- type: SIMPLE_ASSIGN
- points[20]._Gamma._G[2,1] = exp((-points[20].BIP[2,1,2]) * points[20].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1494(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1494};
- data->localData[0]->realVars[316] /* points[20]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[481])) * (data->localData[0]->realVars[634] /* points[20]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1495
- type: SIMPLE_ASSIGN
- points[20]._Gamma._G[1,1] = exp((-points[20].BIP[1,1,2]) * points[20].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1495(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1495};
- data->localData[0]->realVars[314] /* points[20]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[477])) * (data->localData[0]->realVars[632] /* points[20]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1496
- type: SIMPLE_ASSIGN
- points[20]._Gamma._sum2[1] = 0.4871794871794872 * points[20].Gamma.tau[1,1] * points[20].Gamma.G[1,1] + 0.5128205128205128 * points[20].Gamma.tau[2,1] * points[20].Gamma.G[2,1]
- */
-void Graph_eqFunction_1496(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1496};
- data->localData[0]->realVars[514] /* points[20]._Gamma._sum2[1] variable */ = (0.4871794871794872) * ((data->localData[0]->realVars[632] /* points[20]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[314] /* points[20]._Gamma._G[1,1] variable */)) + (0.5128205128205128) * ((data->localData[0]->realVars[634] /* points[20]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[316] /* points[20]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1497
- type: SIMPLE_ASSIGN
- points[20]._Gamma._sum1[2] = 0.4871794871794872 * points[20].Gamma.G[1,2] + 0.5128205128205128 * points[20].Gamma.G[2,2]
- */
-void Graph_eqFunction_1497(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1497};
- data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */ = (0.4871794871794872) * (data->localData[0]->realVars[315] /* points[20]._Gamma._G[1,2] variable */) + (0.5128205128205128) * (data->localData[0]->realVars[317] /* points[20]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1498
- type: SIMPLE_ASSIGN
- points[20]._Gamma._sum1[1] = 0.4871794871794872 * points[20].Gamma.G[1,1] + 0.5128205128205128 * points[20].Gamma.G[2,1]
- */
-void Graph_eqFunction_1498(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1498};
- data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */ = (0.4871794871794872) * (data->localData[0]->realVars[314] /* points[20]._Gamma._G[1,1] variable */) + (0.5128205128205128) * (data->localData[0]->realVars[316] /* points[20]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1499
- type: SIMPLE_ASSIGN
- $cse78 = DIVISION(points[20].Gamma.sum2[2], points[20].Gamma.sum1[2]) + 0.4871794871794872 * points[20].Gamma.G[2,1] * DIVISION(points[20].Gamma.tau[2,1] - DIVISION(points[20].Gamma.sum2[1], points[20].Gamma.sum1[1]), points[20].Gamma.sum1[1]) + 0.5128205128205128 * points[20].Gamma.G[2,2] * DIVISION(points[20].Gamma.tau[2,2] - DIVISION(points[20].Gamma.sum2[2], points[20].Gamma.sum1[2]), points[20].Gamma.sum1[2])
- */
-void Graph_eqFunction_1499(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1499};
- data->localData[0]->realVars[136] /* $cse78 variable */ = DIVISION_SIM(data->localData[0]->realVars[515] /* points[20]._Gamma._sum2[2] variable */,data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes) + (0.4871794871794872) * ((data->localData[0]->realVars[316] /* points[20]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[634] /* points[20]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[514] /* points[20]._Gamma._sum2[1] variable */,data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes))) + (0.5128205128205128) * ((data->localData[0]->realVars[317] /* points[20]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[635] /* points[20]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[515] /* points[20]._Gamma._sum2[2] variable */,data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1500
- type: SIMPLE_ASSIGN
- $cse77 = DIVISION(points[20].Gamma.sum2[1], points[20].Gamma.sum1[1]) + 0.4871794871794872 * points[20].Gamma.G[1,1] * DIVISION(points[20].Gamma.tau[1,1] - DIVISION(points[20].Gamma.sum2[1], points[20].Gamma.sum1[1]), points[20].Gamma.sum1[1]) + 0.5128205128205128 * points[20].Gamma.G[1,2] * DIVISION(points[20].Gamma.tau[1,2] - DIVISION(points[20].Gamma.sum2[2], points[20].Gamma.sum1[2]), points[20].Gamma.sum1[2])
- */
-void Graph_eqFunction_1500(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1500};
- data->localData[0]->realVars[135] /* $cse77 variable */ = DIVISION_SIM(data->localData[0]->realVars[514] /* points[20]._Gamma._sum2[1] variable */,data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes) + (0.4871794871794872) * ((data->localData[0]->realVars[314] /* points[20]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[632] /* points[20]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[514] /* points[20]._Gamma._sum2[1] variable */,data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[434] /* points[20]._Gamma._sum1[1] variable */,"points[20].Gamma.sum1[1]",equationIndexes))) + (0.5128205128205128) * ((data->localData[0]->realVars[315] /* points[20]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[633] /* points[20]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[515] /* points[20]._Gamma._sum2[2] variable */,data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[435] /* points[20]._Gamma._sum1[2] variable */,"points[20].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1501
- type: SIMPLE_ASSIGN
- points[20]._gamma[1] = exp($cse77)
- */
-void Graph_eqFunction_1501(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1501};
- data->localData[0]->realVars[912] /* points[20]._gamma[1] variable */ = exp(data->localData[0]->realVars[135] /* $cse77 variable */);
- TRACE_POP
-}
-/*
- equation index: 1502
- type: SIMPLE_ASSIGN
- points[20]._K[1] = 0.0001 * points[20].gamma[1] * $cse79
- */
-void Graph_eqFunction_1502(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1502};
- data->localData[0]->realVars[753] /* points[20]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[912] /* points[20]._gamma[1] variable */) * (data->localData[0]->realVars[137] /* $cse79 variable */));
- TRACE_POP
-}
-/*
- equation index: 1503
- type: SIMPLE_ASSIGN
- points[20]._K[2] = -0.9500000000000001 * points[20].K[1] - -1.95
- */
-void Graph_eqFunction_1503(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1503};
- data->localData[0]->realVars[754] /* points[20]._K[2] variable */ = (-0.9500000000000001) * (data->localData[0]->realVars[753] /* points[20]._K[1] variable */) - (-1.95);
- TRACE_POP
-}
-/*
- equation index: 1504
- type: SIMPLE_ASSIGN
- points[20]._gamma[2] = exp($cse78)
- */
-void Graph_eqFunction_1504(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1504};
- data->localData[0]->realVars[913] /* points[20]._gamma[2] variable */ = exp(data->localData[0]->realVars[136] /* $cse78 variable */);
- TRACE_POP
-}
-
-void residualFunc1506(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1506};
- /* iteration variables */
- data->localData[0]->realVars[219] /* T[20] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1485(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1486(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1487(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1488(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1489(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1490(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1491(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1492(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1493(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1494(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1495(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1496(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1497(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1498(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1499(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1500(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1501(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1502(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1503(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1504(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[913] /* points[20]._gamma[2] variable */) * (data->localData[0]->realVars[139] /* $cse80 variable */)) - data->localData[0]->realVars[754] /* points[20]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1506(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1506(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[20] */
- sysData->nominal[i] = data->modelData->realVarsData[219].attribute /* T[20] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[219].attribute /* T[20] */.min;
- sysData->max[i++] = data->modelData->realVarsData[219].attribute /* T[20] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1506(sysData);
-}
-
-void getIterationVarsNLS1506(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[219] /* T[20] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1511
- type: SIMPLE_ASSIGN
- $cse83 = Simulator.Files.ThermodynamicFunctions.Psat({points[21].comp[1].VP[1], points[21].comp[1].VP[2], points[21].comp[1].VP[3], points[21].comp[1].VP[4], points[21].comp[1].VP[5], points[21].comp[1].VP[6]}, T[21])
- */
-void Graph_eqFunction_1511(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1511};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11524], (modelica_real)data->simulationInfo->realParameter[11525], (modelica_real)data->simulationInfo->realParameter[11526], (modelica_real)data->simulationInfo->realParameter[11527], (modelica_real)data->simulationInfo->realParameter[11528], (modelica_real)data->simulationInfo->realParameter[11529]);
- data->localData[0]->realVars[142] /* $cse83 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[220] /* T[21] variable */);
- TRACE_POP
-}
-/*
- equation index: 1512
- type: SIMPLE_ASSIGN
- $cse84 = Simulator.Files.ThermodynamicFunctions.Psat({points[21].comp[2].VP[1], points[21].comp[2].VP[2], points[21].comp[2].VP[3], points[21].comp[2].VP[4], points[21].comp[2].VP[5], points[21].comp[2].VP[6]}, T[21])
- */
-void Graph_eqFunction_1512(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1512};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11530], (modelica_real)data->simulationInfo->realParameter[11531], (modelica_real)data->simulationInfo->realParameter[11532], (modelica_real)data->simulationInfo->realParameter[11533], (modelica_real)data->simulationInfo->realParameter[11534], (modelica_real)data->simulationInfo->realParameter[11535]);
- data->localData[0]->realVars[143] /* $cse84 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[220] /* T[21] variable */);
- TRACE_POP
-}
-/*
- equation index: 1513
- type: SIMPLE_ASSIGN
- points[21]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[21].BIP[1,1,1], T[21])
- */
-void Graph_eqFunction_1513(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1513};
- data->localData[0]->realVars[636] /* points[21]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[484],data->localData[0]->realVars[220] /* T[21] variable */,"T[21]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1514
- type: SIMPLE_ASSIGN
- points[21]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[21].BIP[1,2,1], T[21])
- */
-void Graph_eqFunction_1514(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1514};
- data->localData[0]->realVars[637] /* points[21]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[486],data->localData[0]->realVars[220] /* T[21] variable */,"T[21]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1515
- type: SIMPLE_ASSIGN
- points[21]._Gamma._G[1,2] = exp((-points[21].BIP[1,2,2]) * points[21].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1515(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1515};
- data->localData[0]->realVars[319] /* points[21]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[487])) * (data->localData[0]->realVars[637] /* points[21]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1516
- type: SIMPLE_ASSIGN
- points[21]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[21].BIP[2,1,1], T[21])
- */
-void Graph_eqFunction_1516(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1516};
- data->localData[0]->realVars[638] /* points[21]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[488],data->localData[0]->realVars[220] /* T[21] variable */,"T[21]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1517
- type: SIMPLE_ASSIGN
- points[21]._Gamma._G[2,1] = exp((-points[21].BIP[2,1,2]) * points[21].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1517(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1517};
- data->localData[0]->realVars[320] /* points[21]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[489])) * (data->localData[0]->realVars[638] /* points[21]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1518
- type: SIMPLE_ASSIGN
- points[21]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[21].BIP[2,2,1], T[21])
- */
-void Graph_eqFunction_1518(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1518};
- data->localData[0]->realVars[639] /* points[21]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[490],data->localData[0]->realVars[220] /* T[21] variable */,"T[21]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1519
- type: SIMPLE_ASSIGN
- points[21]._Gamma._G[2,2] = exp((-points[21].BIP[2,2,2]) * points[21].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1519(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1519};
- data->localData[0]->realVars[321] /* points[21]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[491])) * (data->localData[0]->realVars[639] /* points[21]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1520
- type: SIMPLE_ASSIGN
- points[21]._Gamma._sum2[2] = 0.5128205128205128 * points[21].Gamma.tau[1,2] * points[21].Gamma.G[1,2] + 0.4871794871794872 * points[21].Gamma.tau[2,2] * points[21].Gamma.G[2,2]
- */
-void Graph_eqFunction_1520(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1520};
- data->localData[0]->realVars[517] /* points[21]._Gamma._sum2[2] variable */ = (0.5128205128205128) * ((data->localData[0]->realVars[637] /* points[21]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[319] /* points[21]._Gamma._G[1,2] variable */)) + (0.4871794871794872) * ((data->localData[0]->realVars[639] /* points[21]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[321] /* points[21]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1521
- type: SIMPLE_ASSIGN
- points[21]._Gamma._G[1,1] = exp((-points[21].BIP[1,1,2]) * points[21].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1521(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1521};
- data->localData[0]->realVars[318] /* points[21]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[485])) * (data->localData[0]->realVars[636] /* points[21]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1522
- type: SIMPLE_ASSIGN
- points[21]._Gamma._sum2[1] = 0.5128205128205128 * points[21].Gamma.tau[1,1] * points[21].Gamma.G[1,1] + 0.4871794871794872 * points[21].Gamma.tau[2,1] * points[21].Gamma.G[2,1]
- */
-void Graph_eqFunction_1522(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1522};
- data->localData[0]->realVars[516] /* points[21]._Gamma._sum2[1] variable */ = (0.5128205128205128) * ((data->localData[0]->realVars[636] /* points[21]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[318] /* points[21]._Gamma._G[1,1] variable */)) + (0.4871794871794872) * ((data->localData[0]->realVars[638] /* points[21]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[320] /* points[21]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1523
- type: SIMPLE_ASSIGN
- points[21]._Gamma._sum1[1] = 0.5128205128205128 * points[21].Gamma.G[1,1] + 0.4871794871794872 * points[21].Gamma.G[2,1]
- */
-void Graph_eqFunction_1523(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1523};
- data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */ = (0.5128205128205128) * (data->localData[0]->realVars[318] /* points[21]._Gamma._G[1,1] variable */) + (0.4871794871794872) * (data->localData[0]->realVars[320] /* points[21]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1524
- type: SIMPLE_ASSIGN
- points[21]._Gamma._sum1[2] = 0.5128205128205128 * points[21].Gamma.G[1,2] + 0.4871794871794872 * points[21].Gamma.G[2,2]
- */
-void Graph_eqFunction_1524(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1524};
- data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */ = (0.5128205128205128) * (data->localData[0]->realVars[319] /* points[21]._Gamma._G[1,2] variable */) + (0.4871794871794872) * (data->localData[0]->realVars[321] /* points[21]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1525
- type: SIMPLE_ASSIGN
- $cse82 = DIVISION(points[21].Gamma.sum2[2], points[21].Gamma.sum1[2]) + 0.5128205128205128 * points[21].Gamma.G[2,1] * DIVISION(points[21].Gamma.tau[2,1] - DIVISION(points[21].Gamma.sum2[1], points[21].Gamma.sum1[1]), points[21].Gamma.sum1[1]) + 0.4871794871794872 * points[21].Gamma.G[2,2] * DIVISION(points[21].Gamma.tau[2,2] - DIVISION(points[21].Gamma.sum2[2], points[21].Gamma.sum1[2]), points[21].Gamma.sum1[2])
- */
-void Graph_eqFunction_1525(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1525};
- data->localData[0]->realVars[141] /* $cse82 variable */ = DIVISION_SIM(data->localData[0]->realVars[517] /* points[21]._Gamma._sum2[2] variable */,data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes) + (0.5128205128205128) * ((data->localData[0]->realVars[320] /* points[21]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[638] /* points[21]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[516] /* points[21]._Gamma._sum2[1] variable */,data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes))) + (0.4871794871794872) * ((data->localData[0]->realVars[321] /* points[21]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[639] /* points[21]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[517] /* points[21]._Gamma._sum2[2] variable */,data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1526
- type: SIMPLE_ASSIGN
- $cse81 = DIVISION(points[21].Gamma.sum2[1], points[21].Gamma.sum1[1]) + 0.5128205128205128 * points[21].Gamma.G[1,1] * DIVISION(points[21].Gamma.tau[1,1] - DIVISION(points[21].Gamma.sum2[1], points[21].Gamma.sum1[1]), points[21].Gamma.sum1[1]) + 0.4871794871794872 * points[21].Gamma.G[1,2] * DIVISION(points[21].Gamma.tau[1,2] - DIVISION(points[21].Gamma.sum2[2], points[21].Gamma.sum1[2]), points[21].Gamma.sum1[2])
- */
-void Graph_eqFunction_1526(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1526};
- data->localData[0]->realVars[140] /* $cse81 variable */ = DIVISION_SIM(data->localData[0]->realVars[516] /* points[21]._Gamma._sum2[1] variable */,data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes) + (0.5128205128205128) * ((data->localData[0]->realVars[318] /* points[21]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[636] /* points[21]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[516] /* points[21]._Gamma._sum2[1] variable */,data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[436] /* points[21]._Gamma._sum1[1] variable */,"points[21].Gamma.sum1[1]",equationIndexes))) + (0.4871794871794872) * ((data->localData[0]->realVars[319] /* points[21]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[637] /* points[21]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[517] /* points[21]._Gamma._sum2[2] variable */,data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[437] /* points[21]._Gamma._sum1[2] variable */,"points[21].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1527
- type: SIMPLE_ASSIGN
- points[21]._gamma[2] = exp($cse82)
- */
-void Graph_eqFunction_1527(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1527};
- data->localData[0]->realVars[915] /* points[21]._gamma[2] variable */ = exp(data->localData[0]->realVars[141] /* $cse82 variable */);
- TRACE_POP
-}
-/*
- equation index: 1528
- type: SIMPLE_ASSIGN
- points[21]._K[2] = 0.0001 * points[21].gamma[2] * $cse84
- */
-void Graph_eqFunction_1528(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1528};
- data->localData[0]->realVars[756] /* points[21]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[915] /* points[21]._gamma[2] variable */) * (data->localData[0]->realVars[143] /* $cse84 variable */));
- TRACE_POP
-}
-/*
- equation index: 1529
- type: SIMPLE_ASSIGN
- points[21]._K[1] = -0.9500000000000002 * points[21].K[2] - -1.95
- */
-void Graph_eqFunction_1529(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1529};
- data->localData[0]->realVars[755] /* points[21]._K[1] variable */ = (-0.9500000000000002) * (data->localData[0]->realVars[756] /* points[21]._K[2] variable */) - (-1.95);
- TRACE_POP
-}
-/*
- equation index: 1530
- type: SIMPLE_ASSIGN
- points[21]._gamma[1] = exp($cse81)
- */
-void Graph_eqFunction_1530(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1530};
- data->localData[0]->realVars[914] /* points[21]._gamma[1] variable */ = exp(data->localData[0]->realVars[140] /* $cse81 variable */);
- TRACE_POP
-}
-
-void residualFunc1532(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1532};
- /* iteration variables */
- data->localData[0]->realVars[220] /* T[21] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1511(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1512(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1513(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1514(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1515(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1516(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1517(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1518(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1519(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1520(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1521(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1522(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1523(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1524(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1525(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1526(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1527(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1528(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1529(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1530(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[914] /* points[21]._gamma[1] variable */) * (data->localData[0]->realVars[142] /* $cse83 variable */)) - data->localData[0]->realVars[755] /* points[21]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1532(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1532(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[21] */
- sysData->nominal[i] = data->modelData->realVarsData[220].attribute /* T[21] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[220].attribute /* T[21] */.min;
- sysData->max[i++] = data->modelData->realVarsData[220].attribute /* T[21] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1532(sysData);
-}
-
-void getIterationVarsNLS1532(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[220] /* T[21] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1537
- type: SIMPLE_ASSIGN
- $cse87 = Simulator.Files.ThermodynamicFunctions.Psat({points[22].comp[1].VP[1], points[22].comp[1].VP[2], points[22].comp[1].VP[3], points[22].comp[1].VP[4], points[22].comp[1].VP[5], points[22].comp[1].VP[6]}, T[22])
- */
-void Graph_eqFunction_1537(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1537};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11536], (modelica_real)data->simulationInfo->realParameter[11537], (modelica_real)data->simulationInfo->realParameter[11538], (modelica_real)data->simulationInfo->realParameter[11539], (modelica_real)data->simulationInfo->realParameter[11540], (modelica_real)data->simulationInfo->realParameter[11541]);
- data->localData[0]->realVars[146] /* $cse87 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[221] /* T[22] variable */);
- TRACE_POP
-}
-/*
- equation index: 1538
- type: SIMPLE_ASSIGN
- $cse88 = Simulator.Files.ThermodynamicFunctions.Psat({points[22].comp[2].VP[1], points[22].comp[2].VP[2], points[22].comp[2].VP[3], points[22].comp[2].VP[4], points[22].comp[2].VP[5], points[22].comp[2].VP[6]}, T[22])
- */
-void Graph_eqFunction_1538(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1538};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11542], (modelica_real)data->simulationInfo->realParameter[11543], (modelica_real)data->simulationInfo->realParameter[11544], (modelica_real)data->simulationInfo->realParameter[11545], (modelica_real)data->simulationInfo->realParameter[11546], (modelica_real)data->simulationInfo->realParameter[11547]);
- data->localData[0]->realVars[147] /* $cse88 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[221] /* T[22] variable */);
- TRACE_POP
-}
-/*
- equation index: 1539
- type: SIMPLE_ASSIGN
- points[22]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[22].BIP[1,1,1], T[22])
- */
-void Graph_eqFunction_1539(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1539};
- data->localData[0]->realVars[640] /* points[22]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[492],data->localData[0]->realVars[221] /* T[22] variable */,"T[22]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1540
- type: SIMPLE_ASSIGN
- points[22]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[22].BIP[1,2,1], T[22])
- */
-void Graph_eqFunction_1540(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1540};
- data->localData[0]->realVars[641] /* points[22]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[494],data->localData[0]->realVars[221] /* T[22] variable */,"T[22]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1541
- type: SIMPLE_ASSIGN
- points[22]._Gamma._G[1,2] = exp((-points[22].BIP[1,2,2]) * points[22].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1541(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1541};
- data->localData[0]->realVars[323] /* points[22]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[495])) * (data->localData[0]->realVars[641] /* points[22]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1542
- type: SIMPLE_ASSIGN
- points[22]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[22].BIP[2,2,1], T[22])
- */
-void Graph_eqFunction_1542(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1542};
- data->localData[0]->realVars[643] /* points[22]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[498],data->localData[0]->realVars[221] /* T[22] variable */,"T[22]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1543
- type: SIMPLE_ASSIGN
- points[22]._Gamma._G[2,2] = exp((-points[22].BIP[2,2,2]) * points[22].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1543(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1543};
- data->localData[0]->realVars[325] /* points[22]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[499])) * (data->localData[0]->realVars[643] /* points[22]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1544
- type: SIMPLE_ASSIGN
- points[22]._Gamma._sum2[2] = 0.5384615384615384 * points[22].Gamma.tau[1,2] * points[22].Gamma.G[1,2] + 0.4615384615384616 * points[22].Gamma.tau[2,2] * points[22].Gamma.G[2,2]
- */
-void Graph_eqFunction_1544(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1544};
- data->localData[0]->realVars[519] /* points[22]._Gamma._sum2[2] variable */ = (0.5384615384615384) * ((data->localData[0]->realVars[641] /* points[22]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[323] /* points[22]._Gamma._G[1,2] variable */)) + (0.4615384615384616) * ((data->localData[0]->realVars[643] /* points[22]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[325] /* points[22]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1545
- type: SIMPLE_ASSIGN
- points[22]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[22].BIP[2,1,1], T[22])
- */
-void Graph_eqFunction_1545(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1545};
- data->localData[0]->realVars[642] /* points[22]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[496],data->localData[0]->realVars[221] /* T[22] variable */,"T[22]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1546
- type: SIMPLE_ASSIGN
- points[22]._Gamma._G[2,1] = exp((-points[22].BIP[2,1,2]) * points[22].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1546(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1546};
- data->localData[0]->realVars[324] /* points[22]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[497])) * (data->localData[0]->realVars[642] /* points[22]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1547
- type: SIMPLE_ASSIGN
- points[22]._Gamma._G[1,1] = exp((-points[22].BIP[1,1,2]) * points[22].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1547(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1547};
- data->localData[0]->realVars[322] /* points[22]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[493])) * (data->localData[0]->realVars[640] /* points[22]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1548
- type: SIMPLE_ASSIGN
- points[22]._Gamma._sum2[1] = 0.5384615384615384 * points[22].Gamma.tau[1,1] * points[22].Gamma.G[1,1] + 0.4615384615384616 * points[22].Gamma.tau[2,1] * points[22].Gamma.G[2,1]
- */
-void Graph_eqFunction_1548(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1548};
- data->localData[0]->realVars[518] /* points[22]._Gamma._sum2[1] variable */ = (0.5384615384615384) * ((data->localData[0]->realVars[640] /* points[22]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[322] /* points[22]._Gamma._G[1,1] variable */)) + (0.4615384615384616) * ((data->localData[0]->realVars[642] /* points[22]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[324] /* points[22]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1549
- type: SIMPLE_ASSIGN
- points[22]._Gamma._sum1[2] = 0.5384615384615384 * points[22].Gamma.G[1,2] + 0.4615384615384616 * points[22].Gamma.G[2,2]
- */
-void Graph_eqFunction_1549(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1549};
- data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */ = (0.5384615384615384) * (data->localData[0]->realVars[323] /* points[22]._Gamma._G[1,2] variable */) + (0.4615384615384616) * (data->localData[0]->realVars[325] /* points[22]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1550
- type: SIMPLE_ASSIGN
- points[22]._Gamma._sum1[1] = 0.5384615384615384 * points[22].Gamma.G[1,1] + 0.4615384615384616 * points[22].Gamma.G[2,1]
- */
-void Graph_eqFunction_1550(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1550};
- data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */ = (0.5384615384615384) * (data->localData[0]->realVars[322] /* points[22]._Gamma._G[1,1] variable */) + (0.4615384615384616) * (data->localData[0]->realVars[324] /* points[22]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1551
- type: SIMPLE_ASSIGN
- $cse86 = DIVISION(points[22].Gamma.sum2[2], points[22].Gamma.sum1[2]) + 0.5384615384615384 * points[22].Gamma.G[2,1] * DIVISION(points[22].Gamma.tau[2,1] - DIVISION(points[22].Gamma.sum2[1], points[22].Gamma.sum1[1]), points[22].Gamma.sum1[1]) + 0.4615384615384616 * points[22].Gamma.G[2,2] * DIVISION(points[22].Gamma.tau[2,2] - DIVISION(points[22].Gamma.sum2[2], points[22].Gamma.sum1[2]), points[22].Gamma.sum1[2])
- */
-void Graph_eqFunction_1551(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1551};
- data->localData[0]->realVars[145] /* $cse86 variable */ = DIVISION_SIM(data->localData[0]->realVars[519] /* points[22]._Gamma._sum2[2] variable */,data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes) + (0.5384615384615384) * ((data->localData[0]->realVars[324] /* points[22]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[642] /* points[22]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[518] /* points[22]._Gamma._sum2[1] variable */,data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes))) + (0.4615384615384616) * ((data->localData[0]->realVars[325] /* points[22]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[643] /* points[22]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[519] /* points[22]._Gamma._sum2[2] variable */,data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1552
- type: SIMPLE_ASSIGN
- $cse85 = DIVISION(points[22].Gamma.sum2[1], points[22].Gamma.sum1[1]) + 0.5384615384615384 * points[22].Gamma.G[1,1] * DIVISION(points[22].Gamma.tau[1,1] - DIVISION(points[22].Gamma.sum2[1], points[22].Gamma.sum1[1]), points[22].Gamma.sum1[1]) + 0.4615384615384616 * points[22].Gamma.G[1,2] * DIVISION(points[22].Gamma.tau[1,2] - DIVISION(points[22].Gamma.sum2[2], points[22].Gamma.sum1[2]), points[22].Gamma.sum1[2])
- */
-void Graph_eqFunction_1552(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1552};
- data->localData[0]->realVars[144] /* $cse85 variable */ = DIVISION_SIM(data->localData[0]->realVars[518] /* points[22]._Gamma._sum2[1] variable */,data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes) + (0.5384615384615384) * ((data->localData[0]->realVars[322] /* points[22]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[640] /* points[22]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[518] /* points[22]._Gamma._sum2[1] variable */,data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[438] /* points[22]._Gamma._sum1[1] variable */,"points[22].Gamma.sum1[1]",equationIndexes))) + (0.4615384615384616) * ((data->localData[0]->realVars[323] /* points[22]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[641] /* points[22]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[519] /* points[22]._Gamma._sum2[2] variable */,data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[439] /* points[22]._Gamma._sum1[2] variable */,"points[22].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1553
- type: SIMPLE_ASSIGN
- points[22]._gamma[2] = exp($cse86)
- */
-void Graph_eqFunction_1553(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1553};
- data->localData[0]->realVars[917] /* points[22]._gamma[2] variable */ = exp(data->localData[0]->realVars[145] /* $cse86 variable */);
- TRACE_POP
-}
-/*
- equation index: 1554
- type: SIMPLE_ASSIGN
- points[22]._K[2] = 0.0001 * points[22].gamma[2] * $cse88
- */
-void Graph_eqFunction_1554(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1554};
- data->localData[0]->realVars[758] /* points[22]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[917] /* points[22]._gamma[2] variable */) * (data->localData[0]->realVars[147] /* $cse88 variable */));
- TRACE_POP
-}
-/*
- equation index: 1555
- type: SIMPLE_ASSIGN
- points[22]._K[1] = -0.8571428571428572 * points[22].K[2] - -1.857142857142857
- */
-void Graph_eqFunction_1555(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1555};
- data->localData[0]->realVars[757] /* points[22]._K[1] variable */ = (-0.8571428571428572) * (data->localData[0]->realVars[758] /* points[22]._K[2] variable */) - (-1.857142857142857);
- TRACE_POP
-}
-/*
- equation index: 1556
- type: SIMPLE_ASSIGN
- points[22]._gamma[1] = exp($cse85)
- */
-void Graph_eqFunction_1556(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1556};
- data->localData[0]->realVars[916] /* points[22]._gamma[1] variable */ = exp(data->localData[0]->realVars[144] /* $cse85 variable */);
- TRACE_POP
-}
-
-void residualFunc1558(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1558};
- /* iteration variables */
- data->localData[0]->realVars[221] /* T[22] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1537(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1538(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1539(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1540(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1541(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1542(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1543(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1544(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1545(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1546(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1547(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1548(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1549(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1550(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1551(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1552(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1553(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1554(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1555(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1556(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[916] /* points[22]._gamma[1] variable */) * (data->localData[0]->realVars[146] /* $cse87 variable */)) - data->localData[0]->realVars[757] /* points[22]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1558(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1558(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[22] */
- sysData->nominal[i] = data->modelData->realVarsData[221].attribute /* T[22] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[221].attribute /* T[22] */.min;
- sysData->max[i++] = data->modelData->realVarsData[221].attribute /* T[22] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1558(sysData);
-}
-
-void getIterationVarsNLS1558(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[221] /* T[22] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1563
- type: SIMPLE_ASSIGN
- $cse92 = Simulator.Files.ThermodynamicFunctions.Psat({points[23].comp[2].VP[1], points[23].comp[2].VP[2], points[23].comp[2].VP[3], points[23].comp[2].VP[4], points[23].comp[2].VP[5], points[23].comp[2].VP[6]}, T[23])
- */
-void Graph_eqFunction_1563(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1563};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11554], (modelica_real)data->simulationInfo->realParameter[11555], (modelica_real)data->simulationInfo->realParameter[11556], (modelica_real)data->simulationInfo->realParameter[11557], (modelica_real)data->simulationInfo->realParameter[11558], (modelica_real)data->simulationInfo->realParameter[11559]);
- data->localData[0]->realVars[152] /* $cse92 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[222] /* T[23] variable */);
- TRACE_POP
-}
-/*
- equation index: 1564
- type: SIMPLE_ASSIGN
- $cse91 = Simulator.Files.ThermodynamicFunctions.Psat({points[23].comp[1].VP[1], points[23].comp[1].VP[2], points[23].comp[1].VP[3], points[23].comp[1].VP[4], points[23].comp[1].VP[5], points[23].comp[1].VP[6]}, T[23])
- */
-void Graph_eqFunction_1564(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1564};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11548], (modelica_real)data->simulationInfo->realParameter[11549], (modelica_real)data->simulationInfo->realParameter[11550], (modelica_real)data->simulationInfo->realParameter[11551], (modelica_real)data->simulationInfo->realParameter[11552], (modelica_real)data->simulationInfo->realParameter[11553]);
- data->localData[0]->realVars[151] /* $cse91 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[222] /* T[23] variable */);
- TRACE_POP
-}
-/*
- equation index: 1565
- type: SIMPLE_ASSIGN
- points[23]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[23].BIP[1,1,1], T[23])
- */
-void Graph_eqFunction_1565(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1565};
- data->localData[0]->realVars[644] /* points[23]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[500],data->localData[0]->realVars[222] /* T[23] variable */,"T[23]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1566
- type: SIMPLE_ASSIGN
- points[23]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[23].BIP[2,1,1], T[23])
- */
-void Graph_eqFunction_1566(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1566};
- data->localData[0]->realVars[646] /* points[23]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[504],data->localData[0]->realVars[222] /* T[23] variable */,"T[23]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1567
- type: SIMPLE_ASSIGN
- points[23]._Gamma._G[1,1] = exp((-points[23].BIP[1,1,2]) * points[23].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1567(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1567};
- data->localData[0]->realVars[326] /* points[23]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[501])) * (data->localData[0]->realVars[644] /* points[23]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1568
- type: SIMPLE_ASSIGN
- points[23]._Gamma._G[2,1] = exp((-points[23].BIP[2,1,2]) * points[23].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1568(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1568};
- data->localData[0]->realVars[328] /* points[23]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[505])) * (data->localData[0]->realVars[646] /* points[23]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1569
- type: SIMPLE_ASSIGN
- points[23]._Gamma._sum2[1] = 0.5641025641025641 * points[23].Gamma.tau[1,1] * points[23].Gamma.G[1,1] + 0.4358974358974359 * points[23].Gamma.tau[2,1] * points[23].Gamma.G[2,1]
- */
-void Graph_eqFunction_1569(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1569};
- data->localData[0]->realVars[520] /* points[23]._Gamma._sum2[1] variable */ = (0.5641025641025641) * ((data->localData[0]->realVars[644] /* points[23]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[326] /* points[23]._Gamma._G[1,1] variable */)) + (0.4358974358974359) * ((data->localData[0]->realVars[646] /* points[23]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[328] /* points[23]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1570
- type: SIMPLE_ASSIGN
- points[23]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[23].BIP[2,2,1], T[23])
- */
-void Graph_eqFunction_1570(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1570};
- data->localData[0]->realVars[647] /* points[23]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[506],data->localData[0]->realVars[222] /* T[23] variable */,"T[23]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1571
- type: SIMPLE_ASSIGN
- points[23]._Gamma._G[2,2] = exp((-points[23].BIP[2,2,2]) * points[23].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1571(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1571};
- data->localData[0]->realVars[329] /* points[23]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[507])) * (data->localData[0]->realVars[647] /* points[23]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1572
- type: SIMPLE_ASSIGN
- points[23]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[23].BIP[1,2,1], T[23])
- */
-void Graph_eqFunction_1572(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1572};
- data->localData[0]->realVars[645] /* points[23]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[502],data->localData[0]->realVars[222] /* T[23] variable */,"T[23]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1573
- type: SIMPLE_ASSIGN
- points[23]._Gamma._G[1,2] = exp((-points[23].BIP[1,2,2]) * points[23].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1573(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1573};
- data->localData[0]->realVars[327] /* points[23]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[503])) * (data->localData[0]->realVars[645] /* points[23]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1574
- type: SIMPLE_ASSIGN
- points[23]._Gamma._sum2[2] = 0.5641025641025641 * points[23].Gamma.tau[1,2] * points[23].Gamma.G[1,2] + 0.4358974358974359 * points[23].Gamma.tau[2,2] * points[23].Gamma.G[2,2]
- */
-void Graph_eqFunction_1574(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1574};
- data->localData[0]->realVars[521] /* points[23]._Gamma._sum2[2] variable */ = (0.5641025641025641) * ((data->localData[0]->realVars[645] /* points[23]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[327] /* points[23]._Gamma._G[1,2] variable */)) + (0.4358974358974359) * ((data->localData[0]->realVars[647] /* points[23]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[329] /* points[23]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1575
- type: SIMPLE_ASSIGN
- points[23]._Gamma._sum1[1] = 0.5641025641025641 * points[23].Gamma.G[1,1] + 0.4358974358974359 * points[23].Gamma.G[2,1]
- */
-void Graph_eqFunction_1575(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1575};
- data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */ = (0.5641025641025641) * (data->localData[0]->realVars[326] /* points[23]._Gamma._G[1,1] variable */) + (0.4358974358974359) * (data->localData[0]->realVars[328] /* points[23]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1576
- type: SIMPLE_ASSIGN
- points[23]._Gamma._sum1[2] = 0.5641025641025641 * points[23].Gamma.G[1,2] + 0.4358974358974359 * points[23].Gamma.G[2,2]
- */
-void Graph_eqFunction_1576(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1576};
- data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */ = (0.5641025641025641) * (data->localData[0]->realVars[327] /* points[23]._Gamma._G[1,2] variable */) + (0.4358974358974359) * (data->localData[0]->realVars[329] /* points[23]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1577
- type: SIMPLE_ASSIGN
- $cse89 = DIVISION(points[23].Gamma.sum2[1], points[23].Gamma.sum1[1]) + 0.5641025641025641 * points[23].Gamma.G[1,1] * DIVISION(points[23].Gamma.tau[1,1] - DIVISION(points[23].Gamma.sum2[1], points[23].Gamma.sum1[1]), points[23].Gamma.sum1[1]) + 0.4358974358974359 * points[23].Gamma.G[1,2] * DIVISION(points[23].Gamma.tau[1,2] - DIVISION(points[23].Gamma.sum2[2], points[23].Gamma.sum1[2]), points[23].Gamma.sum1[2])
- */
-void Graph_eqFunction_1577(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1577};
- data->localData[0]->realVars[148] /* $cse89 variable */ = DIVISION_SIM(data->localData[0]->realVars[520] /* points[23]._Gamma._sum2[1] variable */,data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes) + (0.5641025641025641) * ((data->localData[0]->realVars[326] /* points[23]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[644] /* points[23]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[520] /* points[23]._Gamma._sum2[1] variable */,data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes))) + (0.4358974358974359) * ((data->localData[0]->realVars[327] /* points[23]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[645] /* points[23]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[521] /* points[23]._Gamma._sum2[2] variable */,data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1578
- type: SIMPLE_ASSIGN
- $cse90 = DIVISION(points[23].Gamma.sum2[2], points[23].Gamma.sum1[2]) + 0.5641025641025641 * points[23].Gamma.G[2,1] * DIVISION(points[23].Gamma.tau[2,1] - DIVISION(points[23].Gamma.sum2[1], points[23].Gamma.sum1[1]), points[23].Gamma.sum1[1]) + 0.4358974358974359 * points[23].Gamma.G[2,2] * DIVISION(points[23].Gamma.tau[2,2] - DIVISION(points[23].Gamma.sum2[2], points[23].Gamma.sum1[2]), points[23].Gamma.sum1[2])
- */
-void Graph_eqFunction_1578(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1578};
- data->localData[0]->realVars[150] /* $cse90 variable */ = DIVISION_SIM(data->localData[0]->realVars[521] /* points[23]._Gamma._sum2[2] variable */,data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes) + (0.5641025641025641) * ((data->localData[0]->realVars[328] /* points[23]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[646] /* points[23]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[520] /* points[23]._Gamma._sum2[1] variable */,data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[440] /* points[23]._Gamma._sum1[1] variable */,"points[23].Gamma.sum1[1]",equationIndexes))) + (0.4358974358974359) * ((data->localData[0]->realVars[329] /* points[23]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[647] /* points[23]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[521] /* points[23]._Gamma._sum2[2] variable */,data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[441] /* points[23]._Gamma._sum1[2] variable */,"points[23].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1579
- type: SIMPLE_ASSIGN
- points[23]._gamma[1] = exp($cse89)
- */
-void Graph_eqFunction_1579(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1579};
- data->localData[0]->realVars[918] /* points[23]._gamma[1] variable */ = exp(data->localData[0]->realVars[148] /* $cse89 variable */);
- TRACE_POP
-}
-/*
- equation index: 1580
- type: SIMPLE_ASSIGN
- points[23]._K[1] = 0.0001 * points[23].gamma[1] * $cse91
- */
-void Graph_eqFunction_1580(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1580};
- data->localData[0]->realVars[759] /* points[23]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[918] /* points[23]._gamma[1] variable */) * (data->localData[0]->realVars[151] /* $cse91 variable */));
- TRACE_POP
-}
-/*
- equation index: 1581
- type: SIMPLE_ASSIGN
- points[23]._K[2] = -1.294117647058824 * points[23].K[1] - -2.294117647058823
- */
-void Graph_eqFunction_1581(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1581};
- data->localData[0]->realVars[760] /* points[23]._K[2] variable */ = (-1.294117647058824) * (data->localData[0]->realVars[759] /* points[23]._K[1] variable */) - (-2.294117647058823);
- TRACE_POP
-}
-/*
- equation index: 1582
- type: SIMPLE_ASSIGN
- points[23]._gamma[2] = exp($cse90)
- */
-void Graph_eqFunction_1582(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1582};
- data->localData[0]->realVars[919] /* points[23]._gamma[2] variable */ = exp(data->localData[0]->realVars[150] /* $cse90 variable */);
- TRACE_POP
-}
-
-void residualFunc1584(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1584};
- /* iteration variables */
- data->localData[0]->realVars[222] /* T[23] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1563(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1564(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1565(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1566(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1567(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1568(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1569(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1570(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1571(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1572(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1573(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1574(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1575(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1576(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1577(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1578(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1579(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1580(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1581(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1582(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[919] /* points[23]._gamma[2] variable */) * (data->localData[0]->realVars[152] /* $cse92 variable */)) - data->localData[0]->realVars[760] /* points[23]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1584(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1584(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[23] */
- sysData->nominal[i] = data->modelData->realVarsData[222].attribute /* T[23] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[222].attribute /* T[23] */.min;
- sysData->max[i++] = data->modelData->realVarsData[222].attribute /* T[23] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1584(sysData);
-}
-
-void getIterationVarsNLS1584(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[222] /* T[23] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1589
- type: SIMPLE_ASSIGN
- $cse96 = Simulator.Files.ThermodynamicFunctions.Psat({points[24].comp[2].VP[1], points[24].comp[2].VP[2], points[24].comp[2].VP[3], points[24].comp[2].VP[4], points[24].comp[2].VP[5], points[24].comp[2].VP[6]}, T[24])
- */
-void Graph_eqFunction_1589(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1589};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11566], (modelica_real)data->simulationInfo->realParameter[11567], (modelica_real)data->simulationInfo->realParameter[11568], (modelica_real)data->simulationInfo->realParameter[11569], (modelica_real)data->simulationInfo->realParameter[11570], (modelica_real)data->simulationInfo->realParameter[11571]);
- data->localData[0]->realVars[156] /* $cse96 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[223] /* T[24] variable */);
- TRACE_POP
-}
-/*
- equation index: 1590
- type: SIMPLE_ASSIGN
- $cse95 = Simulator.Files.ThermodynamicFunctions.Psat({points[24].comp[1].VP[1], points[24].comp[1].VP[2], points[24].comp[1].VP[3], points[24].comp[1].VP[4], points[24].comp[1].VP[5], points[24].comp[1].VP[6]}, T[24])
- */
-void Graph_eqFunction_1590(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1590};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11560], (modelica_real)data->simulationInfo->realParameter[11561], (modelica_real)data->simulationInfo->realParameter[11562], (modelica_real)data->simulationInfo->realParameter[11563], (modelica_real)data->simulationInfo->realParameter[11564], (modelica_real)data->simulationInfo->realParameter[11565]);
- data->localData[0]->realVars[155] /* $cse95 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[223] /* T[24] variable */);
- TRACE_POP
-}
-/*
- equation index: 1591
- type: SIMPLE_ASSIGN
- points[24]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[24].BIP[1,1,1], T[24])
- */
-void Graph_eqFunction_1591(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1591};
- data->localData[0]->realVars[648] /* points[24]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[508],data->localData[0]->realVars[223] /* T[24] variable */,"T[24]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1592
- type: SIMPLE_ASSIGN
- points[24]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[24].BIP[2,1,1], T[24])
- */
-void Graph_eqFunction_1592(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1592};
- data->localData[0]->realVars[650] /* points[24]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[512],data->localData[0]->realVars[223] /* T[24] variable */,"T[24]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1593
- type: SIMPLE_ASSIGN
- points[24]._Gamma._G[2,1] = exp((-points[24].BIP[2,1,2]) * points[24].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1593(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1593};
- data->localData[0]->realVars[332] /* points[24]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[513])) * (data->localData[0]->realVars[650] /* points[24]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1594
- type: SIMPLE_ASSIGN
- points[24]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[24].BIP[2,2,1], T[24])
- */
-void Graph_eqFunction_1594(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1594};
- data->localData[0]->realVars[651] /* points[24]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[514],data->localData[0]->realVars[223] /* T[24] variable */,"T[24]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1595
- type: SIMPLE_ASSIGN
- points[24]._Gamma._G[2,2] = exp((-points[24].BIP[2,2,2]) * points[24].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1595(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1595};
- data->localData[0]->realVars[333] /* points[24]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[515])) * (data->localData[0]->realVars[651] /* points[24]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1596
- type: SIMPLE_ASSIGN
- points[24]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[24].BIP[1,2,1], T[24])
- */
-void Graph_eqFunction_1596(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1596};
- data->localData[0]->realVars[649] /* points[24]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[510],data->localData[0]->realVars[223] /* T[24] variable */,"T[24]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1597
- type: SIMPLE_ASSIGN
- points[24]._Gamma._G[1,2] = exp((-points[24].BIP[1,2,2]) * points[24].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1597(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1597};
- data->localData[0]->realVars[331] /* points[24]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[511])) * (data->localData[0]->realVars[649] /* points[24]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1598
- type: SIMPLE_ASSIGN
- points[24]._Gamma._sum2[2] = 0.5897435897435898 * points[24].Gamma.tau[1,2] * points[24].Gamma.G[1,2] + 0.4102564102564102 * points[24].Gamma.tau[2,2] * points[24].Gamma.G[2,2]
- */
-void Graph_eqFunction_1598(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1598};
- data->localData[0]->realVars[523] /* points[24]._Gamma._sum2[2] variable */ = (0.5897435897435898) * ((data->localData[0]->realVars[649] /* points[24]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[331] /* points[24]._Gamma._G[1,2] variable */)) + (0.4102564102564102) * ((data->localData[0]->realVars[651] /* points[24]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[333] /* points[24]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1599
- type: SIMPLE_ASSIGN
- points[24]._Gamma._G[1,1] = exp((-points[24].BIP[1,1,2]) * points[24].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1599(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1599};
- data->localData[0]->realVars[330] /* points[24]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[509])) * (data->localData[0]->realVars[648] /* points[24]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1600
- type: SIMPLE_ASSIGN
- points[24]._Gamma._sum2[1] = 0.5897435897435898 * points[24].Gamma.tau[1,1] * points[24].Gamma.G[1,1] + 0.4102564102564102 * points[24].Gamma.tau[2,1] * points[24].Gamma.G[2,1]
- */
-void Graph_eqFunction_1600(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1600};
- data->localData[0]->realVars[522] /* points[24]._Gamma._sum2[1] variable */ = (0.5897435897435898) * ((data->localData[0]->realVars[648] /* points[24]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[330] /* points[24]._Gamma._G[1,1] variable */)) + (0.4102564102564102) * ((data->localData[0]->realVars[650] /* points[24]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[332] /* points[24]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1601
- type: SIMPLE_ASSIGN
- points[24]._Gamma._sum1[1] = 0.5897435897435898 * points[24].Gamma.G[1,1] + 0.4102564102564102 * points[24].Gamma.G[2,1]
- */
-void Graph_eqFunction_1601(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1601};
- data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */ = (0.5897435897435898) * (data->localData[0]->realVars[330] /* points[24]._Gamma._G[1,1] variable */) + (0.4102564102564102) * (data->localData[0]->realVars[332] /* points[24]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1602
- type: SIMPLE_ASSIGN
- points[24]._Gamma._sum1[2] = 0.5897435897435898 * points[24].Gamma.G[1,2] + 0.4102564102564102 * points[24].Gamma.G[2,2]
- */
-void Graph_eqFunction_1602(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1602};
- data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */ = (0.5897435897435898) * (data->localData[0]->realVars[331] /* points[24]._Gamma._G[1,2] variable */) + (0.4102564102564102) * (data->localData[0]->realVars[333] /* points[24]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1603
- type: SIMPLE_ASSIGN
- $cse94 = DIVISION(points[24].Gamma.sum2[2], points[24].Gamma.sum1[2]) + 0.5897435897435898 * points[24].Gamma.G[2,1] * DIVISION(points[24].Gamma.tau[2,1] - DIVISION(points[24].Gamma.sum2[1], points[24].Gamma.sum1[1]), points[24].Gamma.sum1[1]) + 0.4102564102564102 * points[24].Gamma.G[2,2] * DIVISION(points[24].Gamma.tau[2,2] - DIVISION(points[24].Gamma.sum2[2], points[24].Gamma.sum1[2]), points[24].Gamma.sum1[2])
- */
-void Graph_eqFunction_1603(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1603};
- data->localData[0]->realVars[154] /* $cse94 variable */ = DIVISION_SIM(data->localData[0]->realVars[523] /* points[24]._Gamma._sum2[2] variable */,data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes) + (0.5897435897435898) * ((data->localData[0]->realVars[332] /* points[24]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[650] /* points[24]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[522] /* points[24]._Gamma._sum2[1] variable */,data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes))) + (0.4102564102564102) * ((data->localData[0]->realVars[333] /* points[24]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[651] /* points[24]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[523] /* points[24]._Gamma._sum2[2] variable */,data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1604
- type: SIMPLE_ASSIGN
- $cse93 = DIVISION(points[24].Gamma.sum2[1], points[24].Gamma.sum1[1]) + 0.5897435897435898 * points[24].Gamma.G[1,1] * DIVISION(points[24].Gamma.tau[1,1] - DIVISION(points[24].Gamma.sum2[1], points[24].Gamma.sum1[1]), points[24].Gamma.sum1[1]) + 0.4102564102564102 * points[24].Gamma.G[1,2] * DIVISION(points[24].Gamma.tau[1,2] - DIVISION(points[24].Gamma.sum2[2], points[24].Gamma.sum1[2]), points[24].Gamma.sum1[2])
- */
-void Graph_eqFunction_1604(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1604};
- data->localData[0]->realVars[153] /* $cse93 variable */ = DIVISION_SIM(data->localData[0]->realVars[522] /* points[24]._Gamma._sum2[1] variable */,data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes) + (0.5897435897435898) * ((data->localData[0]->realVars[330] /* points[24]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[648] /* points[24]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[522] /* points[24]._Gamma._sum2[1] variable */,data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[442] /* points[24]._Gamma._sum1[1] variable */,"points[24].Gamma.sum1[1]",equationIndexes))) + (0.4102564102564102) * ((data->localData[0]->realVars[331] /* points[24]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[649] /* points[24]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[523] /* points[24]._Gamma._sum2[2] variable */,data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[443] /* points[24]._Gamma._sum1[2] variable */,"points[24].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1605
- type: SIMPLE_ASSIGN
- points[24]._gamma[2] = exp($cse94)
- */
-void Graph_eqFunction_1605(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1605};
- data->localData[0]->realVars[921] /* points[24]._gamma[2] variable */ = exp(data->localData[0]->realVars[154] /* $cse94 variable */);
- TRACE_POP
-}
-/*
- equation index: 1606
- type: SIMPLE_ASSIGN
- points[24]._K[2] = 0.0001 * points[24].gamma[2] * $cse96
- */
-void Graph_eqFunction_1606(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1606};
- data->localData[0]->realVars[762] /* points[24]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[921] /* points[24]._gamma[2] variable */) * (data->localData[0]->realVars[156] /* $cse96 variable */));
- TRACE_POP
-}
-/*
- equation index: 1607
- type: SIMPLE_ASSIGN
- points[24]._K[1] = -0.6956521739130435 * points[24].K[2] - -1.695652173913044
- */
-void Graph_eqFunction_1607(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1607};
- data->localData[0]->realVars[761] /* points[24]._K[1] variable */ = (-0.6956521739130435) * (data->localData[0]->realVars[762] /* points[24]._K[2] variable */) - (-1.695652173913044);
- TRACE_POP
-}
-/*
- equation index: 1608
- type: SIMPLE_ASSIGN
- points[24]._gamma[1] = exp($cse93)
- */
-void Graph_eqFunction_1608(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1608};
- data->localData[0]->realVars[920] /* points[24]._gamma[1] variable */ = exp(data->localData[0]->realVars[153] /* $cse93 variable */);
- TRACE_POP
-}
-
-void residualFunc1610(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1610};
- /* iteration variables */
- data->localData[0]->realVars[223] /* T[24] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1589(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1590(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1591(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1592(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1593(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1594(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1595(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1596(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1597(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1598(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1599(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1600(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1601(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1602(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1603(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1604(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1605(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1606(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1607(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1608(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[920] /* points[24]._gamma[1] variable */) * (data->localData[0]->realVars[155] /* $cse95 variable */)) - data->localData[0]->realVars[761] /* points[24]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1610(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1610(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[24] */
- sysData->nominal[i] = data->modelData->realVarsData[223].attribute /* T[24] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[223].attribute /* T[24] */.min;
- sysData->max[i++] = data->modelData->realVarsData[223].attribute /* T[24] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1610(sysData);
-}
-
-void getIterationVarsNLS1610(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[223] /* T[24] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1615
- type: SIMPLE_ASSIGN
- $cse100 = Simulator.Files.ThermodynamicFunctions.Psat({points[25].comp[2].VP[1], points[25].comp[2].VP[2], points[25].comp[2].VP[3], points[25].comp[2].VP[4], points[25].comp[2].VP[5], points[25].comp[2].VP[6]}, T[25])
- */
-void Graph_eqFunction_1615(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1615};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11578], (modelica_real)data->simulationInfo->realParameter[11579], (modelica_real)data->simulationInfo->realParameter[11580], (modelica_real)data->simulationInfo->realParameter[11581], (modelica_real)data->simulationInfo->realParameter[11582], (modelica_real)data->simulationInfo->realParameter[11583]);
- data->localData[0]->realVars[2] /* $cse100 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[224] /* T[25] variable */);
- TRACE_POP
-}
-/*
- equation index: 1616
- type: SIMPLE_ASSIGN
- $cse99 = Simulator.Files.ThermodynamicFunctions.Psat({points[25].comp[1].VP[1], points[25].comp[1].VP[2], points[25].comp[1].VP[3], points[25].comp[1].VP[4], points[25].comp[1].VP[5], points[25].comp[1].VP[6]}, T[25])
- */
-void Graph_eqFunction_1616(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1616};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11572], (modelica_real)data->simulationInfo->realParameter[11573], (modelica_real)data->simulationInfo->realParameter[11574], (modelica_real)data->simulationInfo->realParameter[11575], (modelica_real)data->simulationInfo->realParameter[11576], (modelica_real)data->simulationInfo->realParameter[11577]);
- data->localData[0]->realVars[159] /* $cse99 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[224] /* T[25] variable */);
- TRACE_POP
-}
-/*
- equation index: 1617
- type: SIMPLE_ASSIGN
- points[25]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[25].BIP[1,1,1], T[25])
- */
-void Graph_eqFunction_1617(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1617};
- data->localData[0]->realVars[652] /* points[25]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[516],data->localData[0]->realVars[224] /* T[25] variable */,"T[25]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1618
- type: SIMPLE_ASSIGN
- points[25]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[25].BIP[2,1,1], T[25])
- */
-void Graph_eqFunction_1618(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1618};
- data->localData[0]->realVars[654] /* points[25]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[520],data->localData[0]->realVars[224] /* T[25] variable */,"T[25]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1619
- type: SIMPLE_ASSIGN
- points[25]._Gamma._G[2,1] = exp((-points[25].BIP[2,1,2]) * points[25].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1619(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1619};
- data->localData[0]->realVars[336] /* points[25]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[521])) * (data->localData[0]->realVars[654] /* points[25]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1620
- type: SIMPLE_ASSIGN
- points[25]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[25].BIP[1,2,1], T[25])
- */
-void Graph_eqFunction_1620(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1620};
- data->localData[0]->realVars[653] /* points[25]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[518],data->localData[0]->realVars[224] /* T[25] variable */,"T[25]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1621
- type: SIMPLE_ASSIGN
- points[25]._Gamma._G[1,2] = exp((-points[25].BIP[1,2,2]) * points[25].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1621(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1621};
- data->localData[0]->realVars[335] /* points[25]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[519])) * (data->localData[0]->realVars[653] /* points[25]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1622
- type: SIMPLE_ASSIGN
- points[25]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[25].BIP[2,2,1], T[25])
- */
-void Graph_eqFunction_1622(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1622};
- data->localData[0]->realVars[655] /* points[25]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[522],data->localData[0]->realVars[224] /* T[25] variable */,"T[25]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1623
- type: SIMPLE_ASSIGN
- points[25]._Gamma._G[2,2] = exp((-points[25].BIP[2,2,2]) * points[25].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1623(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1623};
- data->localData[0]->realVars[337] /* points[25]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[523])) * (data->localData[0]->realVars[655] /* points[25]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1624
- type: SIMPLE_ASSIGN
- points[25]._Gamma._sum2[2] = 0.6153846153846154 * points[25].Gamma.tau[1,2] * points[25].Gamma.G[1,2] + 0.3846153846153846 * points[25].Gamma.tau[2,2] * points[25].Gamma.G[2,2]
- */
-void Graph_eqFunction_1624(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1624};
- data->localData[0]->realVars[525] /* points[25]._Gamma._sum2[2] variable */ = (0.6153846153846154) * ((data->localData[0]->realVars[653] /* points[25]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[335] /* points[25]._Gamma._G[1,2] variable */)) + (0.3846153846153846) * ((data->localData[0]->realVars[655] /* points[25]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[337] /* points[25]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1625
- type: SIMPLE_ASSIGN
- points[25]._Gamma._G[1,1] = exp((-points[25].BIP[1,1,2]) * points[25].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1625(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1625};
- data->localData[0]->realVars[334] /* points[25]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[517])) * (data->localData[0]->realVars[652] /* points[25]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1626
- type: SIMPLE_ASSIGN
- points[25]._Gamma._sum2[1] = 0.6153846153846154 * points[25].Gamma.tau[1,1] * points[25].Gamma.G[1,1] + 0.3846153846153846 * points[25].Gamma.tau[2,1] * points[25].Gamma.G[2,1]
- */
-void Graph_eqFunction_1626(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1626};
- data->localData[0]->realVars[524] /* points[25]._Gamma._sum2[1] variable */ = (0.6153846153846154) * ((data->localData[0]->realVars[652] /* points[25]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[334] /* points[25]._Gamma._G[1,1] variable */)) + (0.3846153846153846) * ((data->localData[0]->realVars[654] /* points[25]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[336] /* points[25]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1627
- type: SIMPLE_ASSIGN
- points[25]._Gamma._sum1[1] = 0.6153846153846154 * points[25].Gamma.G[1,1] + 0.3846153846153846 * points[25].Gamma.G[2,1]
- */
-void Graph_eqFunction_1627(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1627};
- data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */ = (0.6153846153846154) * (data->localData[0]->realVars[334] /* points[25]._Gamma._G[1,1] variable */) + (0.3846153846153846) * (data->localData[0]->realVars[336] /* points[25]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1628
- type: SIMPLE_ASSIGN
- points[25]._Gamma._sum1[2] = 0.6153846153846154 * points[25].Gamma.G[1,2] + 0.3846153846153846 * points[25].Gamma.G[2,2]
- */
-void Graph_eqFunction_1628(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1628};
- data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */ = (0.6153846153846154) * (data->localData[0]->realVars[335] /* points[25]._Gamma._G[1,2] variable */) + (0.3846153846153846) * (data->localData[0]->realVars[337] /* points[25]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1629
- type: SIMPLE_ASSIGN
- $cse98 = DIVISION(points[25].Gamma.sum2[2], points[25].Gamma.sum1[2]) + 0.6153846153846154 * points[25].Gamma.G[2,1] * DIVISION(points[25].Gamma.tau[2,1] - DIVISION(points[25].Gamma.sum2[1], points[25].Gamma.sum1[1]), points[25].Gamma.sum1[1]) + 0.3846153846153846 * points[25].Gamma.G[2,2] * DIVISION(points[25].Gamma.tau[2,2] - DIVISION(points[25].Gamma.sum2[2], points[25].Gamma.sum1[2]), points[25].Gamma.sum1[2])
- */
-void Graph_eqFunction_1629(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1629};
- data->localData[0]->realVars[158] /* $cse98 variable */ = DIVISION_SIM(data->localData[0]->realVars[525] /* points[25]._Gamma._sum2[2] variable */,data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes) + (0.6153846153846154) * ((data->localData[0]->realVars[336] /* points[25]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[654] /* points[25]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[524] /* points[25]._Gamma._sum2[1] variable */,data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes))) + (0.3846153846153846) * ((data->localData[0]->realVars[337] /* points[25]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[655] /* points[25]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[525] /* points[25]._Gamma._sum2[2] variable */,data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1630
- type: SIMPLE_ASSIGN
- $cse97 = DIVISION(points[25].Gamma.sum2[1], points[25].Gamma.sum1[1]) + 0.6153846153846154 * points[25].Gamma.G[1,1] * DIVISION(points[25].Gamma.tau[1,1] - DIVISION(points[25].Gamma.sum2[1], points[25].Gamma.sum1[1]), points[25].Gamma.sum1[1]) + 0.3846153846153846 * points[25].Gamma.G[1,2] * DIVISION(points[25].Gamma.tau[1,2] - DIVISION(points[25].Gamma.sum2[2], points[25].Gamma.sum1[2]), points[25].Gamma.sum1[2])
- */
-void Graph_eqFunction_1630(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1630};
- data->localData[0]->realVars[157] /* $cse97 variable */ = DIVISION_SIM(data->localData[0]->realVars[524] /* points[25]._Gamma._sum2[1] variable */,data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes) + (0.6153846153846154) * ((data->localData[0]->realVars[334] /* points[25]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[652] /* points[25]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[524] /* points[25]._Gamma._sum2[1] variable */,data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[444] /* points[25]._Gamma._sum1[1] variable */,"points[25].Gamma.sum1[1]",equationIndexes))) + (0.3846153846153846) * ((data->localData[0]->realVars[335] /* points[25]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[653] /* points[25]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[525] /* points[25]._Gamma._sum2[2] variable */,data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[445] /* points[25]._Gamma._sum1[2] variable */,"points[25].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1631
- type: SIMPLE_ASSIGN
- points[25]._gamma[2] = exp($cse98)
- */
-void Graph_eqFunction_1631(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1631};
- data->localData[0]->realVars[923] /* points[25]._gamma[2] variable */ = exp(data->localData[0]->realVars[158] /* $cse98 variable */);
- TRACE_POP
-}
-/*
- equation index: 1632
- type: SIMPLE_ASSIGN
- points[25]._K[2] = 0.0001 * points[25].gamma[2] * $cse100
- */
-void Graph_eqFunction_1632(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1632};
- data->localData[0]->realVars[764] /* points[25]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[923] /* points[25]._gamma[2] variable */) * (data->localData[0]->realVars[2] /* $cse100 variable */));
- TRACE_POP
-}
-/*
- equation index: 1633
- type: SIMPLE_ASSIGN
- points[25]._K[1] = -0.625 * points[25].K[2] - -1.625
- */
-void Graph_eqFunction_1633(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1633};
- data->localData[0]->realVars[763] /* points[25]._K[1] variable */ = (-0.625) * (data->localData[0]->realVars[764] /* points[25]._K[2] variable */) - (-1.625);
- TRACE_POP
-}
-/*
- equation index: 1634
- type: SIMPLE_ASSIGN
- points[25]._gamma[1] = exp($cse97)
- */
-void Graph_eqFunction_1634(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1634};
- data->localData[0]->realVars[922] /* points[25]._gamma[1] variable */ = exp(data->localData[0]->realVars[157] /* $cse97 variable */);
- TRACE_POP
-}
-
-void residualFunc1636(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1636};
- /* iteration variables */
- data->localData[0]->realVars[224] /* T[25] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1615(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1616(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1617(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1618(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1619(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1620(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1621(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1622(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1623(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1624(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1625(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1626(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1627(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1628(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1629(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1630(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1631(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1632(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1633(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1634(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[922] /* points[25]._gamma[1] variable */) * (data->localData[0]->realVars[159] /* $cse99 variable */)) - data->localData[0]->realVars[763] /* points[25]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1636(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1636(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[25] */
- sysData->nominal[i] = data->modelData->realVarsData[224].attribute /* T[25] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[224].attribute /* T[25] */.min;
- sysData->max[i++] = data->modelData->realVarsData[224].attribute /* T[25] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1636(sysData);
-}
-
-void getIterationVarsNLS1636(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[224] /* T[25] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1641
- type: SIMPLE_ASSIGN
- $cse103 = Simulator.Files.ThermodynamicFunctions.Psat({points[26].comp[1].VP[1], points[26].comp[1].VP[2], points[26].comp[1].VP[3], points[26].comp[1].VP[4], points[26].comp[1].VP[5], points[26].comp[1].VP[6]}, T[26])
- */
-void Graph_eqFunction_1641(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1641};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11584], (modelica_real)data->simulationInfo->realParameter[11585], (modelica_real)data->simulationInfo->realParameter[11586], (modelica_real)data->simulationInfo->realParameter[11587], (modelica_real)data->simulationInfo->realParameter[11588], (modelica_real)data->simulationInfo->realParameter[11589]);
- data->localData[0]->realVars[5] /* $cse103 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[225] /* T[26] variable */);
- TRACE_POP
-}
-/*
- equation index: 1642
- type: SIMPLE_ASSIGN
- $cse104 = Simulator.Files.ThermodynamicFunctions.Psat({points[26].comp[2].VP[1], points[26].comp[2].VP[2], points[26].comp[2].VP[3], points[26].comp[2].VP[4], points[26].comp[2].VP[5], points[26].comp[2].VP[6]}, T[26])
- */
-void Graph_eqFunction_1642(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1642};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11590], (modelica_real)data->simulationInfo->realParameter[11591], (modelica_real)data->simulationInfo->realParameter[11592], (modelica_real)data->simulationInfo->realParameter[11593], (modelica_real)data->simulationInfo->realParameter[11594], (modelica_real)data->simulationInfo->realParameter[11595]);
- data->localData[0]->realVars[6] /* $cse104 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[225] /* T[26] variable */);
- TRACE_POP
-}
-/*
- equation index: 1643
- type: SIMPLE_ASSIGN
- points[26]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[26].BIP[1,1,1], T[26])
- */
-void Graph_eqFunction_1643(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1643};
- data->localData[0]->realVars[656] /* points[26]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[524],data->localData[0]->realVars[225] /* T[26] variable */,"T[26]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1644
- type: SIMPLE_ASSIGN
- points[26]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[26].BIP[1,2,1], T[26])
- */
-void Graph_eqFunction_1644(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1644};
- data->localData[0]->realVars[657] /* points[26]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[526],data->localData[0]->realVars[225] /* T[26] variable */,"T[26]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1645
- type: SIMPLE_ASSIGN
- points[26]._Gamma._G[1,2] = exp((-points[26].BIP[1,2,2]) * points[26].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1645(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1645};
- data->localData[0]->realVars[339] /* points[26]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[527])) * (data->localData[0]->realVars[657] /* points[26]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1646
- type: SIMPLE_ASSIGN
- points[26]._Gamma._G[1,1] = exp((-points[26].BIP[1,1,2]) * points[26].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1646(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1646};
- data->localData[0]->realVars[338] /* points[26]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[525])) * (data->localData[0]->realVars[656] /* points[26]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1647
- type: SIMPLE_ASSIGN
- points[26]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[26].BIP[2,1,1], T[26])
- */
-void Graph_eqFunction_1647(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1647};
- data->localData[0]->realVars[658] /* points[26]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[528],data->localData[0]->realVars[225] /* T[26] variable */,"T[26]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1648
- type: SIMPLE_ASSIGN
- points[26]._Gamma._G[2,1] = exp((-points[26].BIP[2,1,2]) * points[26].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1648(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1648};
- data->localData[0]->realVars[340] /* points[26]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[529])) * (data->localData[0]->realVars[658] /* points[26]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1649
- type: SIMPLE_ASSIGN
- points[26]._Gamma._sum2[1] = 0.6410256410256411 * points[26].Gamma.tau[1,1] * points[26].Gamma.G[1,1] + 0.3589743589743589 * points[26].Gamma.tau[2,1] * points[26].Gamma.G[2,1]
- */
-void Graph_eqFunction_1649(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1649};
- data->localData[0]->realVars[526] /* points[26]._Gamma._sum2[1] variable */ = (0.6410256410256411) * ((data->localData[0]->realVars[656] /* points[26]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[338] /* points[26]._Gamma._G[1,1] variable */)) + (0.3589743589743589) * ((data->localData[0]->realVars[658] /* points[26]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[340] /* points[26]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1650
- type: SIMPLE_ASSIGN
- points[26]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[26].BIP[2,2,1], T[26])
- */
-void Graph_eqFunction_1650(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1650};
- data->localData[0]->realVars[659] /* points[26]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[530],data->localData[0]->realVars[225] /* T[26] variable */,"T[26]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1651
- type: SIMPLE_ASSIGN
- points[26]._Gamma._G[2,2] = exp((-points[26].BIP[2,2,2]) * points[26].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1651(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1651};
- data->localData[0]->realVars[341] /* points[26]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[531])) * (data->localData[0]->realVars[659] /* points[26]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1652
- type: SIMPLE_ASSIGN
- points[26]._Gamma._sum2[2] = 0.6410256410256411 * points[26].Gamma.tau[1,2] * points[26].Gamma.G[1,2] + 0.3589743589743589 * points[26].Gamma.tau[2,2] * points[26].Gamma.G[2,2]
- */
-void Graph_eqFunction_1652(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1652};
- data->localData[0]->realVars[527] /* points[26]._Gamma._sum2[2] variable */ = (0.6410256410256411) * ((data->localData[0]->realVars[657] /* points[26]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[339] /* points[26]._Gamma._G[1,2] variable */)) + (0.3589743589743589) * ((data->localData[0]->realVars[659] /* points[26]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[341] /* points[26]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1653
- type: SIMPLE_ASSIGN
- points[26]._Gamma._sum1[2] = 0.6410256410256411 * points[26].Gamma.G[1,2] + 0.3589743589743589 * points[26].Gamma.G[2,2]
- */
-void Graph_eqFunction_1653(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1653};
- data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */ = (0.6410256410256411) * (data->localData[0]->realVars[339] /* points[26]._Gamma._G[1,2] variable */) + (0.3589743589743589) * (data->localData[0]->realVars[341] /* points[26]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1654
- type: SIMPLE_ASSIGN
- points[26]._Gamma._sum1[1] = 0.6410256410256411 * points[26].Gamma.G[1,1] + 0.3589743589743589 * points[26].Gamma.G[2,1]
- */
-void Graph_eqFunction_1654(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1654};
- data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */ = (0.6410256410256411) * (data->localData[0]->realVars[338] /* points[26]._Gamma._G[1,1] variable */) + (0.3589743589743589) * (data->localData[0]->realVars[340] /* points[26]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1655
- type: SIMPLE_ASSIGN
- $cse102 = DIVISION(points[26].Gamma.sum2[2], points[26].Gamma.sum1[2]) + 0.6410256410256411 * points[26].Gamma.G[2,1] * DIVISION(points[26].Gamma.tau[2,1] - DIVISION(points[26].Gamma.sum2[1], points[26].Gamma.sum1[1]), points[26].Gamma.sum1[1]) + 0.3589743589743589 * points[26].Gamma.G[2,2] * DIVISION(points[26].Gamma.tau[2,2] - DIVISION(points[26].Gamma.sum2[2], points[26].Gamma.sum1[2]), points[26].Gamma.sum1[2])
- */
-void Graph_eqFunction_1655(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1655};
- data->localData[0]->realVars[4] /* $cse102 variable */ = DIVISION_SIM(data->localData[0]->realVars[527] /* points[26]._Gamma._sum2[2] variable */,data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes) + (0.6410256410256411) * ((data->localData[0]->realVars[340] /* points[26]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[658] /* points[26]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[526] /* points[26]._Gamma._sum2[1] variable */,data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes))) + (0.3589743589743589) * ((data->localData[0]->realVars[341] /* points[26]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[659] /* points[26]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[527] /* points[26]._Gamma._sum2[2] variable */,data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1656
- type: SIMPLE_ASSIGN
- $cse101 = DIVISION(points[26].Gamma.sum2[1], points[26].Gamma.sum1[1]) + 0.6410256410256411 * points[26].Gamma.G[1,1] * DIVISION(points[26].Gamma.tau[1,1] - DIVISION(points[26].Gamma.sum2[1], points[26].Gamma.sum1[1]), points[26].Gamma.sum1[1]) + 0.3589743589743589 * points[26].Gamma.G[1,2] * DIVISION(points[26].Gamma.tau[1,2] - DIVISION(points[26].Gamma.sum2[2], points[26].Gamma.sum1[2]), points[26].Gamma.sum1[2])
- */
-void Graph_eqFunction_1656(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1656};
- data->localData[0]->realVars[3] /* $cse101 variable */ = DIVISION_SIM(data->localData[0]->realVars[526] /* points[26]._Gamma._sum2[1] variable */,data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes) + (0.6410256410256411) * ((data->localData[0]->realVars[338] /* points[26]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[656] /* points[26]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[526] /* points[26]._Gamma._sum2[1] variable */,data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[446] /* points[26]._Gamma._sum1[1] variable */,"points[26].Gamma.sum1[1]",equationIndexes))) + (0.3589743589743589) * ((data->localData[0]->realVars[339] /* points[26]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[657] /* points[26]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[527] /* points[26]._Gamma._sum2[2] variable */,data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[447] /* points[26]._Gamma._sum1[2] variable */,"points[26].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1657
- type: SIMPLE_ASSIGN
- points[26]._gamma[2] = exp($cse102)
- */
-void Graph_eqFunction_1657(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1657};
- data->localData[0]->realVars[925] /* points[26]._gamma[2] variable */ = exp(data->localData[0]->realVars[4] /* $cse102 variable */);
- TRACE_POP
-}
-/*
- equation index: 1658
- type: SIMPLE_ASSIGN
- points[26]._K[2] = 0.0001 * points[26].gamma[2] * $cse104
- */
-void Graph_eqFunction_1658(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1658};
- data->localData[0]->realVars[766] /* points[26]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[925] /* points[26]._gamma[2] variable */) * (data->localData[0]->realVars[6] /* $cse104 variable */));
- TRACE_POP
-}
-/*
- equation index: 1659
- type: SIMPLE_ASSIGN
- points[26]._K[1] = -0.5599999999999998 * points[26].K[2] - -1.56
- */
-void Graph_eqFunction_1659(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1659};
- data->localData[0]->realVars[765] /* points[26]._K[1] variable */ = (-0.5599999999999998) * (data->localData[0]->realVars[766] /* points[26]._K[2] variable */) - (-1.56);
- TRACE_POP
-}
-/*
- equation index: 1660
- type: SIMPLE_ASSIGN
- points[26]._gamma[1] = exp($cse101)
- */
-void Graph_eqFunction_1660(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1660};
- data->localData[0]->realVars[924] /* points[26]._gamma[1] variable */ = exp(data->localData[0]->realVars[3] /* $cse101 variable */);
- TRACE_POP
-}
-
-void residualFunc1662(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1662};
- /* iteration variables */
- data->localData[0]->realVars[225] /* T[26] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1641(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1642(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1643(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1644(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1645(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1646(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1647(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1648(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1649(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1650(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1651(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1652(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1653(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1654(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1655(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1656(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1657(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1658(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1659(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1660(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[924] /* points[26]._gamma[1] variable */) * (data->localData[0]->realVars[5] /* $cse103 variable */)) - data->localData[0]->realVars[765] /* points[26]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1662(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1662(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[26] */
- sysData->nominal[i] = data->modelData->realVarsData[225].attribute /* T[26] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[225].attribute /* T[26] */.min;
- sysData->max[i++] = data->modelData->realVarsData[225].attribute /* T[26] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1662(sysData);
-}
-
-void getIterationVarsNLS1662(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[225] /* T[26] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1667
- type: SIMPLE_ASSIGN
- $cse108 = Simulator.Files.ThermodynamicFunctions.Psat({points[27].comp[2].VP[1], points[27].comp[2].VP[2], points[27].comp[2].VP[3], points[27].comp[2].VP[4], points[27].comp[2].VP[5], points[27].comp[2].VP[6]}, T[27])
- */
-void Graph_eqFunction_1667(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1667};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11602], (modelica_real)data->simulationInfo->realParameter[11603], (modelica_real)data->simulationInfo->realParameter[11604], (modelica_real)data->simulationInfo->realParameter[11605], (modelica_real)data->simulationInfo->realParameter[11606], (modelica_real)data->simulationInfo->realParameter[11607]);
- data->localData[0]->realVars[10] /* $cse108 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[226] /* T[27] variable */);
- TRACE_POP
-}
-/*
- equation index: 1668
- type: SIMPLE_ASSIGN
- $cse107 = Simulator.Files.ThermodynamicFunctions.Psat({points[27].comp[1].VP[1], points[27].comp[1].VP[2], points[27].comp[1].VP[3], points[27].comp[1].VP[4], points[27].comp[1].VP[5], points[27].comp[1].VP[6]}, T[27])
- */
-void Graph_eqFunction_1668(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1668};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11596], (modelica_real)data->simulationInfo->realParameter[11597], (modelica_real)data->simulationInfo->realParameter[11598], (modelica_real)data->simulationInfo->realParameter[11599], (modelica_real)data->simulationInfo->realParameter[11600], (modelica_real)data->simulationInfo->realParameter[11601]);
- data->localData[0]->realVars[9] /* $cse107 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[226] /* T[27] variable */);
- TRACE_POP
-}
-/*
- equation index: 1669
- type: SIMPLE_ASSIGN
- points[27]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[27].BIP[1,1,1], T[27])
- */
-void Graph_eqFunction_1669(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1669};
- data->localData[0]->realVars[660] /* points[27]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[532],data->localData[0]->realVars[226] /* T[27] variable */,"T[27]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1670
- type: SIMPLE_ASSIGN
- points[27]._Gamma._G[1,1] = exp((-points[27].BIP[1,1,2]) * points[27].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1670(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1670};
- data->localData[0]->realVars[342] /* points[27]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[533])) * (data->localData[0]->realVars[660] /* points[27]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1671
- type: SIMPLE_ASSIGN
- points[27]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[27].BIP[1,2,1], T[27])
- */
-void Graph_eqFunction_1671(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1671};
- data->localData[0]->realVars[661] /* points[27]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[534],data->localData[0]->realVars[226] /* T[27] variable */,"T[27]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1672
- type: SIMPLE_ASSIGN
- points[27]._Gamma._G[1,2] = exp((-points[27].BIP[1,2,2]) * points[27].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1672(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1672};
- data->localData[0]->realVars[343] /* points[27]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[535])) * (data->localData[0]->realVars[661] /* points[27]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1673
- type: SIMPLE_ASSIGN
- points[27]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[27].BIP[2,1,1], T[27])
- */
-void Graph_eqFunction_1673(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1673};
- data->localData[0]->realVars[662] /* points[27]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[536],data->localData[0]->realVars[226] /* T[27] variable */,"T[27]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1674
- type: SIMPLE_ASSIGN
- points[27]._Gamma._G[2,1] = exp((-points[27].BIP[2,1,2]) * points[27].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1674(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1674};
- data->localData[0]->realVars[344] /* points[27]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[537])) * (data->localData[0]->realVars[662] /* points[27]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1675
- type: SIMPLE_ASSIGN
- points[27]._Gamma._sum2[1] = 0.6666666666666666 * points[27].Gamma.tau[1,1] * points[27].Gamma.G[1,1] + 0.3333333333333334 * points[27].Gamma.tau[2,1] * points[27].Gamma.G[2,1]
- */
-void Graph_eqFunction_1675(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1675};
- data->localData[0]->realVars[528] /* points[27]._Gamma._sum2[1] variable */ = (0.6666666666666666) * ((data->localData[0]->realVars[660] /* points[27]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[342] /* points[27]._Gamma._G[1,1] variable */)) + (0.3333333333333334) * ((data->localData[0]->realVars[662] /* points[27]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[344] /* points[27]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1676
- type: SIMPLE_ASSIGN
- points[27]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[27].BIP[2,2,1], T[27])
- */
-void Graph_eqFunction_1676(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1676};
- data->localData[0]->realVars[663] /* points[27]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[538],data->localData[0]->realVars[226] /* T[27] variable */,"T[27]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1677
- type: SIMPLE_ASSIGN
- points[27]._Gamma._G[2,2] = exp((-points[27].BIP[2,2,2]) * points[27].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1677(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1677};
- data->localData[0]->realVars[345] /* points[27]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[539])) * (data->localData[0]->realVars[663] /* points[27]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1678
- type: SIMPLE_ASSIGN
- points[27]._Gamma._sum2[2] = 0.6666666666666666 * points[27].Gamma.tau[1,2] * points[27].Gamma.G[1,2] + 0.3333333333333334 * points[27].Gamma.tau[2,2] * points[27].Gamma.G[2,2]
- */
-void Graph_eqFunction_1678(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1678};
- data->localData[0]->realVars[529] /* points[27]._Gamma._sum2[2] variable */ = (0.6666666666666666) * ((data->localData[0]->realVars[661] /* points[27]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[343] /* points[27]._Gamma._G[1,2] variable */)) + (0.3333333333333334) * ((data->localData[0]->realVars[663] /* points[27]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[345] /* points[27]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1679
- type: SIMPLE_ASSIGN
- points[27]._Gamma._sum1[1] = 0.6666666666666666 * points[27].Gamma.G[1,1] + 0.3333333333333334 * points[27].Gamma.G[2,1]
- */
-void Graph_eqFunction_1679(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1679};
- data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */ = (0.6666666666666666) * (data->localData[0]->realVars[342] /* points[27]._Gamma._G[1,1] variable */) + (0.3333333333333334) * (data->localData[0]->realVars[344] /* points[27]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1680
- type: SIMPLE_ASSIGN
- points[27]._Gamma._sum1[2] = 0.6666666666666666 * points[27].Gamma.G[1,2] + 0.3333333333333334 * points[27].Gamma.G[2,2]
- */
-void Graph_eqFunction_1680(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1680};
- data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */ = (0.6666666666666666) * (data->localData[0]->realVars[343] /* points[27]._Gamma._G[1,2] variable */) + (0.3333333333333334) * (data->localData[0]->realVars[345] /* points[27]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1681
- type: SIMPLE_ASSIGN
- $cse106 = DIVISION(points[27].Gamma.sum2[2], points[27].Gamma.sum1[2]) + 0.6666666666666666 * points[27].Gamma.G[2,1] * DIVISION(points[27].Gamma.tau[2,1] - DIVISION(points[27].Gamma.sum2[1], points[27].Gamma.sum1[1]), points[27].Gamma.sum1[1]) + 0.3333333333333334 * points[27].Gamma.G[2,2] * DIVISION(points[27].Gamma.tau[2,2] - DIVISION(points[27].Gamma.sum2[2], points[27].Gamma.sum1[2]), points[27].Gamma.sum1[2])
- */
-void Graph_eqFunction_1681(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1681};
- data->localData[0]->realVars[8] /* $cse106 variable */ = DIVISION_SIM(data->localData[0]->realVars[529] /* points[27]._Gamma._sum2[2] variable */,data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes) + (0.6666666666666666) * ((data->localData[0]->realVars[344] /* points[27]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[662] /* points[27]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[528] /* points[27]._Gamma._sum2[1] variable */,data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes))) + (0.3333333333333334) * ((data->localData[0]->realVars[345] /* points[27]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[663] /* points[27]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[529] /* points[27]._Gamma._sum2[2] variable */,data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1682
- type: SIMPLE_ASSIGN
- $cse105 = DIVISION(points[27].Gamma.sum2[1], points[27].Gamma.sum1[1]) + 0.6666666666666666 * points[27].Gamma.G[1,1] * DIVISION(points[27].Gamma.tau[1,1] - DIVISION(points[27].Gamma.sum2[1], points[27].Gamma.sum1[1]), points[27].Gamma.sum1[1]) + 0.3333333333333334 * points[27].Gamma.G[1,2] * DIVISION(points[27].Gamma.tau[1,2] - DIVISION(points[27].Gamma.sum2[2], points[27].Gamma.sum1[2]), points[27].Gamma.sum1[2])
- */
-void Graph_eqFunction_1682(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1682};
- data->localData[0]->realVars[7] /* $cse105 variable */ = DIVISION_SIM(data->localData[0]->realVars[528] /* points[27]._Gamma._sum2[1] variable */,data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes) + (0.6666666666666666) * ((data->localData[0]->realVars[342] /* points[27]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[660] /* points[27]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[528] /* points[27]._Gamma._sum2[1] variable */,data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[448] /* points[27]._Gamma._sum1[1] variable */,"points[27].Gamma.sum1[1]",equationIndexes))) + (0.3333333333333334) * ((data->localData[0]->realVars[343] /* points[27]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[661] /* points[27]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[529] /* points[27]._Gamma._sum2[2] variable */,data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[449] /* points[27]._Gamma._sum1[2] variable */,"points[27].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1683
- type: SIMPLE_ASSIGN
- points[27]._gamma[1] = exp($cse105)
- */
-void Graph_eqFunction_1683(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1683};
- data->localData[0]->realVars[926] /* points[27]._gamma[1] variable */ = exp(data->localData[0]->realVars[7] /* $cse105 variable */);
- TRACE_POP
-}
-/*
- equation index: 1684
- type: SIMPLE_ASSIGN
- points[27]._K[1] = 0.0001 * points[27].gamma[1] * $cse107
- */
-void Graph_eqFunction_1684(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1684};
- data->localData[0]->realVars[767] /* points[27]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[926] /* points[27]._gamma[1] variable */) * (data->localData[0]->realVars[9] /* $cse107 variable */));
- TRACE_POP
-}
-/*
- equation index: 1685
- type: SIMPLE_ASSIGN
- points[27]._K[2] = -2.0 * points[27].K[1] - -3.0
- */
-void Graph_eqFunction_1685(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1685};
- data->localData[0]->realVars[768] /* points[27]._K[2] variable */ = (-2.0) * (data->localData[0]->realVars[767] /* points[27]._K[1] variable */) - (-3.0);
- TRACE_POP
-}
-/*
- equation index: 1686
- type: SIMPLE_ASSIGN
- points[27]._gamma[2] = exp($cse106)
- */
-void Graph_eqFunction_1686(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1686};
- data->localData[0]->realVars[927] /* points[27]._gamma[2] variable */ = exp(data->localData[0]->realVars[8] /* $cse106 variable */);
- TRACE_POP
-}
-
-void residualFunc1688(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1688};
- /* iteration variables */
- data->localData[0]->realVars[226] /* T[27] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1667(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1668(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1669(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1670(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1671(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1672(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1673(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1674(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1675(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1676(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1677(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1678(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1679(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1680(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1681(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1682(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1683(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1684(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1685(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1686(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[927] /* points[27]._gamma[2] variable */) * (data->localData[0]->realVars[10] /* $cse108 variable */)) - data->localData[0]->realVars[768] /* points[27]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1688(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1688(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[27] */
- sysData->nominal[i] = data->modelData->realVarsData[226].attribute /* T[27] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[226].attribute /* T[27] */.min;
- sysData->max[i++] = data->modelData->realVarsData[226].attribute /* T[27] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1688(sysData);
-}
-
-void getIterationVarsNLS1688(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[226] /* T[27] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1693
- type: SIMPLE_ASSIGN
- $cse112 = Simulator.Files.ThermodynamicFunctions.Psat({points[28].comp[2].VP[1], points[28].comp[2].VP[2], points[28].comp[2].VP[3], points[28].comp[2].VP[4], points[28].comp[2].VP[5], points[28].comp[2].VP[6]}, T[28])
- */
-void Graph_eqFunction_1693(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1693};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11614], (modelica_real)data->simulationInfo->realParameter[11615], (modelica_real)data->simulationInfo->realParameter[11616], (modelica_real)data->simulationInfo->realParameter[11617], (modelica_real)data->simulationInfo->realParameter[11618], (modelica_real)data->simulationInfo->realParameter[11619]);
- data->localData[0]->realVars[15] /* $cse112 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[227] /* T[28] variable */);
- TRACE_POP
-}
-/*
- equation index: 1694
- type: SIMPLE_ASSIGN
- $cse111 = Simulator.Files.ThermodynamicFunctions.Psat({points[28].comp[1].VP[1], points[28].comp[1].VP[2], points[28].comp[1].VP[3], points[28].comp[1].VP[4], points[28].comp[1].VP[5], points[28].comp[1].VP[6]}, T[28])
- */
-void Graph_eqFunction_1694(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1694};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11608], (modelica_real)data->simulationInfo->realParameter[11609], (modelica_real)data->simulationInfo->realParameter[11610], (modelica_real)data->simulationInfo->realParameter[11611], (modelica_real)data->simulationInfo->realParameter[11612], (modelica_real)data->simulationInfo->realParameter[11613]);
- data->localData[0]->realVars[14] /* $cse111 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[227] /* T[28] variable */);
- TRACE_POP
-}
-/*
- equation index: 1695
- type: SIMPLE_ASSIGN
- points[28]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[28].BIP[1,1,1], T[28])
- */
-void Graph_eqFunction_1695(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1695};
- data->localData[0]->realVars[664] /* points[28]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[540],data->localData[0]->realVars[227] /* T[28] variable */,"T[28]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1696
- type: SIMPLE_ASSIGN
- points[28]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[28].BIP[2,2,1], T[28])
- */
-void Graph_eqFunction_1696(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1696};
- data->localData[0]->realVars[667] /* points[28]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[546],data->localData[0]->realVars[227] /* T[28] variable */,"T[28]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1697
- type: SIMPLE_ASSIGN
- points[28]._Gamma._G[2,2] = exp((-points[28].BIP[2,2,2]) * points[28].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1697(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1697};
- data->localData[0]->realVars[349] /* points[28]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[547])) * (data->localData[0]->realVars[667] /* points[28]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1698
- type: SIMPLE_ASSIGN
- points[28]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[28].BIP[1,2,1], T[28])
- */
-void Graph_eqFunction_1698(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1698};
- data->localData[0]->realVars[665] /* points[28]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[542],data->localData[0]->realVars[227] /* T[28] variable */,"T[28]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1699
- type: SIMPLE_ASSIGN
- points[28]._Gamma._G[1,2] = exp((-points[28].BIP[1,2,2]) * points[28].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1699(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1699};
- data->localData[0]->realVars[347] /* points[28]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[543])) * (data->localData[0]->realVars[665] /* points[28]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1700
- type: SIMPLE_ASSIGN
- points[28]._Gamma._sum2[2] = 0.6923076923076923 * points[28].Gamma.tau[1,2] * points[28].Gamma.G[1,2] + 0.3076923076923077 * points[28].Gamma.tau[2,2] * points[28].Gamma.G[2,2]
- */
-void Graph_eqFunction_1700(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1700};
- data->localData[0]->realVars[531] /* points[28]._Gamma._sum2[2] variable */ = (0.6923076923076923) * ((data->localData[0]->realVars[665] /* points[28]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[347] /* points[28]._Gamma._G[1,2] variable */)) + (0.3076923076923077) * ((data->localData[0]->realVars[667] /* points[28]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[349] /* points[28]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1701
- type: SIMPLE_ASSIGN
- points[28]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[28].BIP[2,1,1], T[28])
- */
-void Graph_eqFunction_1701(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1701};
- data->localData[0]->realVars[666] /* points[28]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[544],data->localData[0]->realVars[227] /* T[28] variable */,"T[28]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1702
- type: SIMPLE_ASSIGN
- points[28]._Gamma._G[2,1] = exp((-points[28].BIP[2,1,2]) * points[28].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1702(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1702};
- data->localData[0]->realVars[348] /* points[28]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[545])) * (data->localData[0]->realVars[666] /* points[28]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1703
- type: SIMPLE_ASSIGN
- points[28]._Gamma._G[1,1] = exp((-points[28].BIP[1,1,2]) * points[28].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1703(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1703};
- data->localData[0]->realVars[346] /* points[28]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[541])) * (data->localData[0]->realVars[664] /* points[28]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1704
- type: SIMPLE_ASSIGN
- points[28]._Gamma._sum2[1] = 0.6923076923076923 * points[28].Gamma.tau[1,1] * points[28].Gamma.G[1,1] + 0.3076923076923077 * points[28].Gamma.tau[2,1] * points[28].Gamma.G[2,1]
- */
-void Graph_eqFunction_1704(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1704};
- data->localData[0]->realVars[530] /* points[28]._Gamma._sum2[1] variable */ = (0.6923076923076923) * ((data->localData[0]->realVars[664] /* points[28]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[346] /* points[28]._Gamma._G[1,1] variable */)) + (0.3076923076923077) * ((data->localData[0]->realVars[666] /* points[28]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[348] /* points[28]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1705
- type: SIMPLE_ASSIGN
- points[28]._Gamma._sum1[2] = 0.6923076923076923 * points[28].Gamma.G[1,2] + 0.3076923076923077 * points[28].Gamma.G[2,2]
- */
-void Graph_eqFunction_1705(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1705};
- data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */ = (0.6923076923076923) * (data->localData[0]->realVars[347] /* points[28]._Gamma._G[1,2] variable */) + (0.3076923076923077) * (data->localData[0]->realVars[349] /* points[28]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1706
- type: SIMPLE_ASSIGN
- points[28]._Gamma._sum1[1] = 0.6923076923076923 * points[28].Gamma.G[1,1] + 0.3076923076923077 * points[28].Gamma.G[2,1]
- */
-void Graph_eqFunction_1706(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1706};
- data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */ = (0.6923076923076923) * (data->localData[0]->realVars[346] /* points[28]._Gamma._G[1,1] variable */) + (0.3076923076923077) * (data->localData[0]->realVars[348] /* points[28]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1707
- type: SIMPLE_ASSIGN
- $cse109 = DIVISION(points[28].Gamma.sum2[1], points[28].Gamma.sum1[1]) + 0.6923076923076923 * points[28].Gamma.G[1,1] * DIVISION(points[28].Gamma.tau[1,1] - DIVISION(points[28].Gamma.sum2[1], points[28].Gamma.sum1[1]), points[28].Gamma.sum1[1]) + 0.3076923076923077 * points[28].Gamma.G[1,2] * DIVISION(points[28].Gamma.tau[1,2] - DIVISION(points[28].Gamma.sum2[2], points[28].Gamma.sum1[2]), points[28].Gamma.sum1[2])
- */
-void Graph_eqFunction_1707(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1707};
- data->localData[0]->realVars[11] /* $cse109 variable */ = DIVISION_SIM(data->localData[0]->realVars[530] /* points[28]._Gamma._sum2[1] variable */,data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes) + (0.6923076923076923) * ((data->localData[0]->realVars[346] /* points[28]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[664] /* points[28]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[530] /* points[28]._Gamma._sum2[1] variable */,data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes))) + (0.3076923076923077) * ((data->localData[0]->realVars[347] /* points[28]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[665] /* points[28]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[531] /* points[28]._Gamma._sum2[2] variable */,data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1708
- type: SIMPLE_ASSIGN
- $cse110 = DIVISION(points[28].Gamma.sum2[2], points[28].Gamma.sum1[2]) + 0.6923076923076923 * points[28].Gamma.G[2,1] * DIVISION(points[28].Gamma.tau[2,1] - DIVISION(points[28].Gamma.sum2[1], points[28].Gamma.sum1[1]), points[28].Gamma.sum1[1]) + 0.3076923076923077 * points[28].Gamma.G[2,2] * DIVISION(points[28].Gamma.tau[2,2] - DIVISION(points[28].Gamma.sum2[2], points[28].Gamma.sum1[2]), points[28].Gamma.sum1[2])
- */
-void Graph_eqFunction_1708(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1708};
- data->localData[0]->realVars[13] /* $cse110 variable */ = DIVISION_SIM(data->localData[0]->realVars[531] /* points[28]._Gamma._sum2[2] variable */,data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes) + (0.6923076923076923) * ((data->localData[0]->realVars[348] /* points[28]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[666] /* points[28]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[530] /* points[28]._Gamma._sum2[1] variable */,data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[450] /* points[28]._Gamma._sum1[1] variable */,"points[28].Gamma.sum1[1]",equationIndexes))) + (0.3076923076923077) * ((data->localData[0]->realVars[349] /* points[28]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[667] /* points[28]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[531] /* points[28]._Gamma._sum2[2] variable */,data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[451] /* points[28]._Gamma._sum1[2] variable */,"points[28].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1709
- type: SIMPLE_ASSIGN
- points[28]._gamma[1] = exp($cse109)
- */
-void Graph_eqFunction_1709(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1709};
- data->localData[0]->realVars[928] /* points[28]._gamma[1] variable */ = exp(data->localData[0]->realVars[11] /* $cse109 variable */);
- TRACE_POP
-}
-/*
- equation index: 1710
- type: SIMPLE_ASSIGN
- points[28]._K[1] = 0.0001 * points[28].gamma[1] * $cse111
- */
-void Graph_eqFunction_1710(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1710};
- data->localData[0]->realVars[769] /* points[28]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[928] /* points[28]._gamma[1] variable */) * (data->localData[0]->realVars[14] /* $cse111 variable */));
- TRACE_POP
-}
-/*
- equation index: 1711
- type: SIMPLE_ASSIGN
- points[28]._K[2] = -2.25 * points[28].K[1] - -3.25
- */
-void Graph_eqFunction_1711(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1711};
- data->localData[0]->realVars[770] /* points[28]._K[2] variable */ = (-2.25) * (data->localData[0]->realVars[769] /* points[28]._K[1] variable */) - (-3.25);
- TRACE_POP
-}
-/*
- equation index: 1712
- type: SIMPLE_ASSIGN
- points[28]._gamma[2] = exp($cse110)
- */
-void Graph_eqFunction_1712(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1712};
- data->localData[0]->realVars[929] /* points[28]._gamma[2] variable */ = exp(data->localData[0]->realVars[13] /* $cse110 variable */);
- TRACE_POP
-}
-
-void residualFunc1714(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1714};
- /* iteration variables */
- data->localData[0]->realVars[227] /* T[28] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1693(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1694(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1695(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1696(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1697(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1698(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1699(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1700(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1701(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1702(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1703(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1704(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1705(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1706(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1707(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1708(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1709(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1710(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1711(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1712(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[929] /* points[28]._gamma[2] variable */) * (data->localData[0]->realVars[15] /* $cse112 variable */)) - data->localData[0]->realVars[770] /* points[28]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1714(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1714(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[28] */
- sysData->nominal[i] = data->modelData->realVarsData[227].attribute /* T[28] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[227].attribute /* T[28] */.min;
- sysData->max[i++] = data->modelData->realVarsData[227].attribute /* T[28] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1714(sysData);
-}
-
-void getIterationVarsNLS1714(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[227] /* T[28] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1719
- type: SIMPLE_ASSIGN
- $cse115 = Simulator.Files.ThermodynamicFunctions.Psat({points[29].comp[1].VP[1], points[29].comp[1].VP[2], points[29].comp[1].VP[3], points[29].comp[1].VP[4], points[29].comp[1].VP[5], points[29].comp[1].VP[6]}, T[29])
- */
-void Graph_eqFunction_1719(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1719};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11620], (modelica_real)data->simulationInfo->realParameter[11621], (modelica_real)data->simulationInfo->realParameter[11622], (modelica_real)data->simulationInfo->realParameter[11623], (modelica_real)data->simulationInfo->realParameter[11624], (modelica_real)data->simulationInfo->realParameter[11625]);
- data->localData[0]->realVars[18] /* $cse115 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[228] /* T[29] variable */);
- TRACE_POP
-}
-/*
- equation index: 1720
- type: SIMPLE_ASSIGN
- $cse116 = Simulator.Files.ThermodynamicFunctions.Psat({points[29].comp[2].VP[1], points[29].comp[2].VP[2], points[29].comp[2].VP[3], points[29].comp[2].VP[4], points[29].comp[2].VP[5], points[29].comp[2].VP[6]}, T[29])
- */
-void Graph_eqFunction_1720(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1720};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11626], (modelica_real)data->simulationInfo->realParameter[11627], (modelica_real)data->simulationInfo->realParameter[11628], (modelica_real)data->simulationInfo->realParameter[11629], (modelica_real)data->simulationInfo->realParameter[11630], (modelica_real)data->simulationInfo->realParameter[11631]);
- data->localData[0]->realVars[19] /* $cse116 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[228] /* T[29] variable */);
- TRACE_POP
-}
-/*
- equation index: 1721
- type: SIMPLE_ASSIGN
- points[29]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[29].BIP[1,1,1], T[29])
- */
-void Graph_eqFunction_1721(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1721};
- data->localData[0]->realVars[668] /* points[29]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[548],data->localData[0]->realVars[228] /* T[29] variable */,"T[29]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1722
- type: SIMPLE_ASSIGN
- points[29]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[29].BIP[1,2,1], T[29])
- */
-void Graph_eqFunction_1722(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1722};
- data->localData[0]->realVars[669] /* points[29]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[550],data->localData[0]->realVars[228] /* T[29] variable */,"T[29]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1723
- type: SIMPLE_ASSIGN
- points[29]._Gamma._G[1,2] = exp((-points[29].BIP[1,2,2]) * points[29].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1723(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1723};
- data->localData[0]->realVars[351] /* points[29]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[551])) * (data->localData[0]->realVars[669] /* points[29]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1724
- type: SIMPLE_ASSIGN
- points[29]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[29].BIP[2,1,1], T[29])
- */
-void Graph_eqFunction_1724(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1724};
- data->localData[0]->realVars[670] /* points[29]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[552],data->localData[0]->realVars[228] /* T[29] variable */,"T[29]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1725
- type: SIMPLE_ASSIGN
- points[29]._Gamma._G[2,1] = exp((-points[29].BIP[2,1,2]) * points[29].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1725(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1725};
- data->localData[0]->realVars[352] /* points[29]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[553])) * (data->localData[0]->realVars[670] /* points[29]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1726
- type: SIMPLE_ASSIGN
- points[29]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[29].BIP[2,2,1], T[29])
- */
-void Graph_eqFunction_1726(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1726};
- data->localData[0]->realVars[671] /* points[29]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[554],data->localData[0]->realVars[228] /* T[29] variable */,"T[29]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1727
- type: SIMPLE_ASSIGN
- points[29]._Gamma._G[2,2] = exp((-points[29].BIP[2,2,2]) * points[29].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1727(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1727};
- data->localData[0]->realVars[353] /* points[29]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[555])) * (data->localData[0]->realVars[671] /* points[29]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1728
- type: SIMPLE_ASSIGN
- points[29]._Gamma._sum2[2] = 0.717948717948718 * points[29].Gamma.tau[1,2] * points[29].Gamma.G[1,2] + 0.2820512820512821 * points[29].Gamma.tau[2,2] * points[29].Gamma.G[2,2]
- */
-void Graph_eqFunction_1728(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1728};
- data->localData[0]->realVars[533] /* points[29]._Gamma._sum2[2] variable */ = (0.717948717948718) * ((data->localData[0]->realVars[669] /* points[29]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[351] /* points[29]._Gamma._G[1,2] variable */)) + (0.2820512820512821) * ((data->localData[0]->realVars[671] /* points[29]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[353] /* points[29]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1729
- type: SIMPLE_ASSIGN
- points[29]._Gamma._G[1,1] = exp((-points[29].BIP[1,1,2]) * points[29].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1729(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1729};
- data->localData[0]->realVars[350] /* points[29]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[549])) * (data->localData[0]->realVars[668] /* points[29]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1730
- type: SIMPLE_ASSIGN
- points[29]._Gamma._sum2[1] = 0.717948717948718 * points[29].Gamma.tau[1,1] * points[29].Gamma.G[1,1] + 0.2820512820512821 * points[29].Gamma.tau[2,1] * points[29].Gamma.G[2,1]
- */
-void Graph_eqFunction_1730(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1730};
- data->localData[0]->realVars[532] /* points[29]._Gamma._sum2[1] variable */ = (0.717948717948718) * ((data->localData[0]->realVars[668] /* points[29]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[350] /* points[29]._Gamma._G[1,1] variable */)) + (0.2820512820512821) * ((data->localData[0]->realVars[670] /* points[29]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[352] /* points[29]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1731
- type: SIMPLE_ASSIGN
- points[29]._Gamma._sum1[2] = 0.717948717948718 * points[29].Gamma.G[1,2] + 0.2820512820512821 * points[29].Gamma.G[2,2]
- */
-void Graph_eqFunction_1731(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1731};
- data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */ = (0.717948717948718) * (data->localData[0]->realVars[351] /* points[29]._Gamma._G[1,2] variable */) + (0.2820512820512821) * (data->localData[0]->realVars[353] /* points[29]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1732
- type: SIMPLE_ASSIGN
- points[29]._Gamma._sum1[1] = 0.717948717948718 * points[29].Gamma.G[1,1] + 0.2820512820512821 * points[29].Gamma.G[2,1]
- */
-void Graph_eqFunction_1732(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1732};
- data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */ = (0.717948717948718) * (data->localData[0]->realVars[350] /* points[29]._Gamma._G[1,1] variable */) + (0.2820512820512821) * (data->localData[0]->realVars[352] /* points[29]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1733
- type: SIMPLE_ASSIGN
- $cse114 = DIVISION(points[29].Gamma.sum2[2], points[29].Gamma.sum1[2]) + 0.717948717948718 * points[29].Gamma.G[2,1] * DIVISION(points[29].Gamma.tau[2,1] - DIVISION(points[29].Gamma.sum2[1], points[29].Gamma.sum1[1]), points[29].Gamma.sum1[1]) + 0.2820512820512821 * points[29].Gamma.G[2,2] * DIVISION(points[29].Gamma.tau[2,2] - DIVISION(points[29].Gamma.sum2[2], points[29].Gamma.sum1[2]), points[29].Gamma.sum1[2])
- */
-void Graph_eqFunction_1733(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1733};
- data->localData[0]->realVars[17] /* $cse114 variable */ = DIVISION_SIM(data->localData[0]->realVars[533] /* points[29]._Gamma._sum2[2] variable */,data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes) + (0.717948717948718) * ((data->localData[0]->realVars[352] /* points[29]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[670] /* points[29]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[532] /* points[29]._Gamma._sum2[1] variable */,data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes))) + (0.2820512820512821) * ((data->localData[0]->realVars[353] /* points[29]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[671] /* points[29]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[533] /* points[29]._Gamma._sum2[2] variable */,data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1734
- type: SIMPLE_ASSIGN
- $cse113 = DIVISION(points[29].Gamma.sum2[1], points[29].Gamma.sum1[1]) + 0.717948717948718 * points[29].Gamma.G[1,1] * DIVISION(points[29].Gamma.tau[1,1] - DIVISION(points[29].Gamma.sum2[1], points[29].Gamma.sum1[1]), points[29].Gamma.sum1[1]) + 0.2820512820512821 * points[29].Gamma.G[1,2] * DIVISION(points[29].Gamma.tau[1,2] - DIVISION(points[29].Gamma.sum2[2], points[29].Gamma.sum1[2]), points[29].Gamma.sum1[2])
- */
-void Graph_eqFunction_1734(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1734};
- data->localData[0]->realVars[16] /* $cse113 variable */ = DIVISION_SIM(data->localData[0]->realVars[532] /* points[29]._Gamma._sum2[1] variable */,data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes) + (0.717948717948718) * ((data->localData[0]->realVars[350] /* points[29]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[668] /* points[29]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[532] /* points[29]._Gamma._sum2[1] variable */,data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[452] /* points[29]._Gamma._sum1[1] variable */,"points[29].Gamma.sum1[1]",equationIndexes))) + (0.2820512820512821) * ((data->localData[0]->realVars[351] /* points[29]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[669] /* points[29]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[533] /* points[29]._Gamma._sum2[2] variable */,data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[453] /* points[29]._Gamma._sum1[2] variable */,"points[29].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1735
- type: SIMPLE_ASSIGN
- points[29]._gamma[2] = exp($cse114)
- */
-void Graph_eqFunction_1735(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1735};
- data->localData[0]->realVars[931] /* points[29]._gamma[2] variable */ = exp(data->localData[0]->realVars[17] /* $cse114 variable */);
- TRACE_POP
-}
-/*
- equation index: 1736
- type: SIMPLE_ASSIGN
- points[29]._K[2] = 0.0001 * points[29].gamma[2] * $cse116
- */
-void Graph_eqFunction_1736(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1736};
- data->localData[0]->realVars[772] /* points[29]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[931] /* points[29]._gamma[2] variable */) * (data->localData[0]->realVars[19] /* $cse116 variable */));
- TRACE_POP
-}
-/*
- equation index: 1737
- type: SIMPLE_ASSIGN
- points[29]._K[1] = -0.3928571428571429 * points[29].K[2] - -1.392857142857143
- */
-void Graph_eqFunction_1737(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1737};
- data->localData[0]->realVars[771] /* points[29]._K[1] variable */ = (-0.3928571428571429) * (data->localData[0]->realVars[772] /* points[29]._K[2] variable */) - (-1.392857142857143);
- TRACE_POP
-}
-/*
- equation index: 1738
- type: SIMPLE_ASSIGN
- points[29]._gamma[1] = exp($cse113)
- */
-void Graph_eqFunction_1738(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1738};
- data->localData[0]->realVars[930] /* points[29]._gamma[1] variable */ = exp(data->localData[0]->realVars[16] /* $cse113 variable */);
- TRACE_POP
-}
-
-void residualFunc1740(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1740};
- /* iteration variables */
- data->localData[0]->realVars[228] /* T[29] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1719(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1720(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1721(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1722(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1723(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1724(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1725(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1726(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1727(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1728(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1729(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1730(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1731(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1732(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1733(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1734(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1735(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1736(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1737(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1738(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[930] /* points[29]._gamma[1] variable */) * (data->localData[0]->realVars[18] /* $cse115 variable */)) - data->localData[0]->realVars[771] /* points[29]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1740(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1740(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[29] */
- sysData->nominal[i] = data->modelData->realVarsData[228].attribute /* T[29] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[228].attribute /* T[29] */.min;
- sysData->max[i++] = data->modelData->realVarsData[228].attribute /* T[29] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1740(sysData);
-}
-
-void getIterationVarsNLS1740(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[228] /* T[29] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1745
- type: SIMPLE_ASSIGN
- $cse119 = Simulator.Files.ThermodynamicFunctions.Psat({points[30].comp[1].VP[1], points[30].comp[1].VP[2], points[30].comp[1].VP[3], points[30].comp[1].VP[4], points[30].comp[1].VP[5], points[30].comp[1].VP[6]}, T[30])
- */
-void Graph_eqFunction_1745(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1745};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11632], (modelica_real)data->simulationInfo->realParameter[11633], (modelica_real)data->simulationInfo->realParameter[11634], (modelica_real)data->simulationInfo->realParameter[11635], (modelica_real)data->simulationInfo->realParameter[11636], (modelica_real)data->simulationInfo->realParameter[11637]);
- data->localData[0]->realVars[22] /* $cse119 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[229] /* T[30] variable */);
- TRACE_POP
-}
-/*
- equation index: 1746
- type: SIMPLE_ASSIGN
- $cse120 = Simulator.Files.ThermodynamicFunctions.Psat({points[30].comp[2].VP[1], points[30].comp[2].VP[2], points[30].comp[2].VP[3], points[30].comp[2].VP[4], points[30].comp[2].VP[5], points[30].comp[2].VP[6]}, T[30])
- */
-void Graph_eqFunction_1746(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1746};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11638], (modelica_real)data->simulationInfo->realParameter[11639], (modelica_real)data->simulationInfo->realParameter[11640], (modelica_real)data->simulationInfo->realParameter[11641], (modelica_real)data->simulationInfo->realParameter[11642], (modelica_real)data->simulationInfo->realParameter[11643]);
- data->localData[0]->realVars[24] /* $cse120 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[229] /* T[30] variable */);
- TRACE_POP
-}
-/*
- equation index: 1747
- type: SIMPLE_ASSIGN
- points[30]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[30].BIP[1,1,1], T[30])
- */
-void Graph_eqFunction_1747(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1747};
- data->localData[0]->realVars[672] /* points[30]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[556],data->localData[0]->realVars[229] /* T[30] variable */,"T[30]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1748
- type: SIMPLE_ASSIGN
- points[30]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[30].BIP[2,1,1], T[30])
- */
-void Graph_eqFunction_1748(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1748};
- data->localData[0]->realVars[674] /* points[30]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[560],data->localData[0]->realVars[229] /* T[30] variable */,"T[30]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1749
- type: SIMPLE_ASSIGN
- points[30]._Gamma._G[2,1] = exp((-points[30].BIP[2,1,2]) * points[30].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1749(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1749};
- data->localData[0]->realVars[356] /* points[30]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[561])) * (data->localData[0]->realVars[674] /* points[30]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1750
- type: SIMPLE_ASSIGN
- points[30]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[30].BIP[1,2,1], T[30])
- */
-void Graph_eqFunction_1750(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1750};
- data->localData[0]->realVars[673] /* points[30]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[558],data->localData[0]->realVars[229] /* T[30] variable */,"T[30]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1751
- type: SIMPLE_ASSIGN
- points[30]._Gamma._G[1,2] = exp((-points[30].BIP[1,2,2]) * points[30].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1751(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1751};
- data->localData[0]->realVars[355] /* points[30]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[559])) * (data->localData[0]->realVars[673] /* points[30]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1752
- type: SIMPLE_ASSIGN
- points[30]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[30].BIP[2,2,1], T[30])
- */
-void Graph_eqFunction_1752(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1752};
- data->localData[0]->realVars[675] /* points[30]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[562],data->localData[0]->realVars[229] /* T[30] variable */,"T[30]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1753
- type: SIMPLE_ASSIGN
- points[30]._Gamma._G[2,2] = exp((-points[30].BIP[2,2,2]) * points[30].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1753(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1753};
- data->localData[0]->realVars[357] /* points[30]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[563])) * (data->localData[0]->realVars[675] /* points[30]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1754
- type: SIMPLE_ASSIGN
- points[30]._Gamma._sum2[2] = 0.7435897435897436 * points[30].Gamma.tau[1,2] * points[30].Gamma.G[1,2] + 0.2564102564102564 * points[30].Gamma.tau[2,2] * points[30].Gamma.G[2,2]
- */
-void Graph_eqFunction_1754(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1754};
- data->localData[0]->realVars[535] /* points[30]._Gamma._sum2[2] variable */ = (0.7435897435897436) * ((data->localData[0]->realVars[673] /* points[30]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[355] /* points[30]._Gamma._G[1,2] variable */)) + (0.2564102564102564) * ((data->localData[0]->realVars[675] /* points[30]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[357] /* points[30]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1755
- type: SIMPLE_ASSIGN
- points[30]._Gamma._G[1,1] = exp((-points[30].BIP[1,1,2]) * points[30].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1755(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1755};
- data->localData[0]->realVars[354] /* points[30]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[557])) * (data->localData[0]->realVars[672] /* points[30]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1756
- type: SIMPLE_ASSIGN
- points[30]._Gamma._sum2[1] = 0.7435897435897436 * points[30].Gamma.tau[1,1] * points[30].Gamma.G[1,1] + 0.2564102564102564 * points[30].Gamma.tau[2,1] * points[30].Gamma.G[2,1]
- */
-void Graph_eqFunction_1756(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1756};
- data->localData[0]->realVars[534] /* points[30]._Gamma._sum2[1] variable */ = (0.7435897435897436) * ((data->localData[0]->realVars[672] /* points[30]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[354] /* points[30]._Gamma._G[1,1] variable */)) + (0.2564102564102564) * ((data->localData[0]->realVars[674] /* points[30]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[356] /* points[30]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1757
- type: SIMPLE_ASSIGN
- points[30]._Gamma._sum1[1] = 0.7435897435897436 * points[30].Gamma.G[1,1] + 0.2564102564102564 * points[30].Gamma.G[2,1]
- */
-void Graph_eqFunction_1757(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1757};
- data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */ = (0.7435897435897436) * (data->localData[0]->realVars[354] /* points[30]._Gamma._G[1,1] variable */) + (0.2564102564102564) * (data->localData[0]->realVars[356] /* points[30]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1758
- type: SIMPLE_ASSIGN
- points[30]._Gamma._sum1[2] = 0.7435897435897436 * points[30].Gamma.G[1,2] + 0.2564102564102564 * points[30].Gamma.G[2,2]
- */
-void Graph_eqFunction_1758(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1758};
- data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */ = (0.7435897435897436) * (data->localData[0]->realVars[355] /* points[30]._Gamma._G[1,2] variable */) + (0.2564102564102564) * (data->localData[0]->realVars[357] /* points[30]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1759
- type: SIMPLE_ASSIGN
- $cse118 = DIVISION(points[30].Gamma.sum2[2], points[30].Gamma.sum1[2]) + 0.7435897435897436 * points[30].Gamma.G[2,1] * DIVISION(points[30].Gamma.tau[2,1] - DIVISION(points[30].Gamma.sum2[1], points[30].Gamma.sum1[1]), points[30].Gamma.sum1[1]) + 0.2564102564102564 * points[30].Gamma.G[2,2] * DIVISION(points[30].Gamma.tau[2,2] - DIVISION(points[30].Gamma.sum2[2], points[30].Gamma.sum1[2]), points[30].Gamma.sum1[2])
- */
-void Graph_eqFunction_1759(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1759};
- data->localData[0]->realVars[21] /* $cse118 variable */ = DIVISION_SIM(data->localData[0]->realVars[535] /* points[30]._Gamma._sum2[2] variable */,data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes) + (0.7435897435897436) * ((data->localData[0]->realVars[356] /* points[30]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[674] /* points[30]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[534] /* points[30]._Gamma._sum2[1] variable */,data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes))) + (0.2564102564102564) * ((data->localData[0]->realVars[357] /* points[30]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[675] /* points[30]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[535] /* points[30]._Gamma._sum2[2] variable */,data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1760
- type: SIMPLE_ASSIGN
- $cse117 = DIVISION(points[30].Gamma.sum2[1], points[30].Gamma.sum1[1]) + 0.7435897435897436 * points[30].Gamma.G[1,1] * DIVISION(points[30].Gamma.tau[1,1] - DIVISION(points[30].Gamma.sum2[1], points[30].Gamma.sum1[1]), points[30].Gamma.sum1[1]) + 0.2564102564102564 * points[30].Gamma.G[1,2] * DIVISION(points[30].Gamma.tau[1,2] - DIVISION(points[30].Gamma.sum2[2], points[30].Gamma.sum1[2]), points[30].Gamma.sum1[2])
- */
-void Graph_eqFunction_1760(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1760};
- data->localData[0]->realVars[20] /* $cse117 variable */ = DIVISION_SIM(data->localData[0]->realVars[534] /* points[30]._Gamma._sum2[1] variable */,data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes) + (0.7435897435897436) * ((data->localData[0]->realVars[354] /* points[30]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[672] /* points[30]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[534] /* points[30]._Gamma._sum2[1] variable */,data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[454] /* points[30]._Gamma._sum1[1] variable */,"points[30].Gamma.sum1[1]",equationIndexes))) + (0.2564102564102564) * ((data->localData[0]->realVars[355] /* points[30]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[673] /* points[30]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[535] /* points[30]._Gamma._sum2[2] variable */,data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[455] /* points[30]._Gamma._sum1[2] variable */,"points[30].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1761
- type: SIMPLE_ASSIGN
- points[30]._gamma[2] = exp($cse118)
- */
-void Graph_eqFunction_1761(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1761};
- data->localData[0]->realVars[933] /* points[30]._gamma[2] variable */ = exp(data->localData[0]->realVars[21] /* $cse118 variable */);
- TRACE_POP
-}
-/*
- equation index: 1762
- type: SIMPLE_ASSIGN
- points[30]._K[2] = 0.0001 * points[30].gamma[2] * $cse120
- */
-void Graph_eqFunction_1762(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1762};
- data->localData[0]->realVars[774] /* points[30]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[933] /* points[30]._gamma[2] variable */) * (data->localData[0]->realVars[24] /* $cse120 variable */));
- TRACE_POP
-}
-/*
- equation index: 1763
- type: SIMPLE_ASSIGN
- points[30]._K[1] = -0.3448275862068965 * points[30].K[2] - -1.344827586206897
- */
-void Graph_eqFunction_1763(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1763};
- data->localData[0]->realVars[773] /* points[30]._K[1] variable */ = (-0.3448275862068965) * (data->localData[0]->realVars[774] /* points[30]._K[2] variable */) - (-1.344827586206897);
- TRACE_POP
-}
-/*
- equation index: 1764
- type: SIMPLE_ASSIGN
- points[30]._gamma[1] = exp($cse117)
- */
-void Graph_eqFunction_1764(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1764};
- data->localData[0]->realVars[932] /* points[30]._gamma[1] variable */ = exp(data->localData[0]->realVars[20] /* $cse117 variable */);
- TRACE_POP
-}
-
-void residualFunc1766(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1766};
- /* iteration variables */
- data->localData[0]->realVars[229] /* T[30] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1745(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1746(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1747(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1748(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1749(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1750(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1751(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1752(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1753(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1754(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1755(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1756(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1757(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1758(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1759(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1760(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1761(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1762(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1763(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1764(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[932] /* points[30]._gamma[1] variable */) * (data->localData[0]->realVars[22] /* $cse119 variable */)) - data->localData[0]->realVars[773] /* points[30]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1766(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1766(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[30] */
- sysData->nominal[i] = data->modelData->realVarsData[229].attribute /* T[30] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[229].attribute /* T[30] */.min;
- sysData->max[i++] = data->modelData->realVarsData[229].attribute /* T[30] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1766(sysData);
-}
-
-void getIterationVarsNLS1766(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[229] /* T[30] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1771
- type: SIMPLE_ASSIGN
- $cse124 = Simulator.Files.ThermodynamicFunctions.Psat({points[31].comp[2].VP[1], points[31].comp[2].VP[2], points[31].comp[2].VP[3], points[31].comp[2].VP[4], points[31].comp[2].VP[5], points[31].comp[2].VP[6]}, T[31])
- */
-void Graph_eqFunction_1771(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1771};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11650], (modelica_real)data->simulationInfo->realParameter[11651], (modelica_real)data->simulationInfo->realParameter[11652], (modelica_real)data->simulationInfo->realParameter[11653], (modelica_real)data->simulationInfo->realParameter[11654], (modelica_real)data->simulationInfo->realParameter[11655]);
- data->localData[0]->realVars[28] /* $cse124 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[230] /* T[31] variable */);
- TRACE_POP
-}
-/*
- equation index: 1772
- type: SIMPLE_ASSIGN
- $cse123 = Simulator.Files.ThermodynamicFunctions.Psat({points[31].comp[1].VP[1], points[31].comp[1].VP[2], points[31].comp[1].VP[3], points[31].comp[1].VP[4], points[31].comp[1].VP[5], points[31].comp[1].VP[6]}, T[31])
- */
-void Graph_eqFunction_1772(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1772};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11644], (modelica_real)data->simulationInfo->realParameter[11645], (modelica_real)data->simulationInfo->realParameter[11646], (modelica_real)data->simulationInfo->realParameter[11647], (modelica_real)data->simulationInfo->realParameter[11648], (modelica_real)data->simulationInfo->realParameter[11649]);
- data->localData[0]->realVars[27] /* $cse123 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[230] /* T[31] variable */);
- TRACE_POP
-}
-/*
- equation index: 1773
- type: SIMPLE_ASSIGN
- points[31]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[31].BIP[1,1,1], T[31])
- */
-void Graph_eqFunction_1773(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1773};
- data->localData[0]->realVars[676] /* points[31]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[564],data->localData[0]->realVars[230] /* T[31] variable */,"T[31]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1774
- type: SIMPLE_ASSIGN
- points[31]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[31].BIP[1,2,1], T[31])
- */
-void Graph_eqFunction_1774(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1774};
- data->localData[0]->realVars[677] /* points[31]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[566],data->localData[0]->realVars[230] /* T[31] variable */,"T[31]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1775
- type: SIMPLE_ASSIGN
- points[31]._Gamma._G[1,2] = exp((-points[31].BIP[1,2,2]) * points[31].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1775(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1775};
- data->localData[0]->realVars[359] /* points[31]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[567])) * (data->localData[0]->realVars[677] /* points[31]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1776
- type: SIMPLE_ASSIGN
- points[31]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[31].BIP[2,1,1], T[31])
- */
-void Graph_eqFunction_1776(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1776};
- data->localData[0]->realVars[678] /* points[31]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[568],data->localData[0]->realVars[230] /* T[31] variable */,"T[31]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1777
- type: SIMPLE_ASSIGN
- points[31]._Gamma._G[2,1] = exp((-points[31].BIP[2,1,2]) * points[31].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1777(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1777};
- data->localData[0]->realVars[360] /* points[31]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[569])) * (data->localData[0]->realVars[678] /* points[31]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1778
- type: SIMPLE_ASSIGN
- points[31]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[31].BIP[2,2,1], T[31])
- */
-void Graph_eqFunction_1778(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1778};
- data->localData[0]->realVars[679] /* points[31]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[570],data->localData[0]->realVars[230] /* T[31] variable */,"T[31]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1779
- type: SIMPLE_ASSIGN
- points[31]._Gamma._G[2,2] = exp((-points[31].BIP[2,2,2]) * points[31].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1779(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1779};
- data->localData[0]->realVars[361] /* points[31]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[571])) * (data->localData[0]->realVars[679] /* points[31]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1780
- type: SIMPLE_ASSIGN
- points[31]._Gamma._sum2[2] = 0.7692307692307693 * points[31].Gamma.tau[1,2] * points[31].Gamma.G[1,2] + 0.2307692307692307 * points[31].Gamma.tau[2,2] * points[31].Gamma.G[2,2]
- */
-void Graph_eqFunction_1780(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1780};
- data->localData[0]->realVars[537] /* points[31]._Gamma._sum2[2] variable */ = (0.7692307692307693) * ((data->localData[0]->realVars[677] /* points[31]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[359] /* points[31]._Gamma._G[1,2] variable */)) + (0.2307692307692307) * ((data->localData[0]->realVars[679] /* points[31]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[361] /* points[31]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1781
- type: SIMPLE_ASSIGN
- points[31]._Gamma._G[1,1] = exp((-points[31].BIP[1,1,2]) * points[31].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1781(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1781};
- data->localData[0]->realVars[358] /* points[31]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[565])) * (data->localData[0]->realVars[676] /* points[31]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1782
- type: SIMPLE_ASSIGN
- points[31]._Gamma._sum2[1] = 0.7692307692307693 * points[31].Gamma.tau[1,1] * points[31].Gamma.G[1,1] + 0.2307692307692307 * points[31].Gamma.tau[2,1] * points[31].Gamma.G[2,1]
- */
-void Graph_eqFunction_1782(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1782};
- data->localData[0]->realVars[536] /* points[31]._Gamma._sum2[1] variable */ = (0.7692307692307693) * ((data->localData[0]->realVars[676] /* points[31]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[358] /* points[31]._Gamma._G[1,1] variable */)) + (0.2307692307692307) * ((data->localData[0]->realVars[678] /* points[31]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[360] /* points[31]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1783
- type: SIMPLE_ASSIGN
- points[31]._Gamma._sum1[2] = 0.7692307692307693 * points[31].Gamma.G[1,2] + 0.2307692307692307 * points[31].Gamma.G[2,2]
- */
-void Graph_eqFunction_1783(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1783};
- data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */ = (0.7692307692307693) * (data->localData[0]->realVars[359] /* points[31]._Gamma._G[1,2] variable */) + (0.2307692307692307) * (data->localData[0]->realVars[361] /* points[31]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1784
- type: SIMPLE_ASSIGN
- points[31]._Gamma._sum1[1] = 0.7692307692307693 * points[31].Gamma.G[1,1] + 0.2307692307692307 * points[31].Gamma.G[2,1]
- */
-void Graph_eqFunction_1784(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1784};
- data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */ = (0.7692307692307693) * (data->localData[0]->realVars[358] /* points[31]._Gamma._G[1,1] variable */) + (0.2307692307692307) * (data->localData[0]->realVars[360] /* points[31]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1785
- type: SIMPLE_ASSIGN
- $cse122 = DIVISION(points[31].Gamma.sum2[2], points[31].Gamma.sum1[2]) + 0.7692307692307693 * points[31].Gamma.G[2,1] * DIVISION(points[31].Gamma.tau[2,1] - DIVISION(points[31].Gamma.sum2[1], points[31].Gamma.sum1[1]), points[31].Gamma.sum1[1]) + 0.2307692307692307 * points[31].Gamma.G[2,2] * DIVISION(points[31].Gamma.tau[2,2] - DIVISION(points[31].Gamma.sum2[2], points[31].Gamma.sum1[2]), points[31].Gamma.sum1[2])
- */
-void Graph_eqFunction_1785(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1785};
- data->localData[0]->realVars[26] /* $cse122 variable */ = DIVISION_SIM(data->localData[0]->realVars[537] /* points[31]._Gamma._sum2[2] variable */,data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes) + (0.7692307692307693) * ((data->localData[0]->realVars[360] /* points[31]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[678] /* points[31]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[536] /* points[31]._Gamma._sum2[1] variable */,data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes))) + (0.2307692307692307) * ((data->localData[0]->realVars[361] /* points[31]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[679] /* points[31]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[537] /* points[31]._Gamma._sum2[2] variable */,data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1786
- type: SIMPLE_ASSIGN
- $cse121 = DIVISION(points[31].Gamma.sum2[1], points[31].Gamma.sum1[1]) + 0.7692307692307693 * points[31].Gamma.G[1,1] * DIVISION(points[31].Gamma.tau[1,1] - DIVISION(points[31].Gamma.sum2[1], points[31].Gamma.sum1[1]), points[31].Gamma.sum1[1]) + 0.2307692307692307 * points[31].Gamma.G[1,2] * DIVISION(points[31].Gamma.tau[1,2] - DIVISION(points[31].Gamma.sum2[2], points[31].Gamma.sum1[2]), points[31].Gamma.sum1[2])
- */
-void Graph_eqFunction_1786(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1786};
- data->localData[0]->realVars[25] /* $cse121 variable */ = DIVISION_SIM(data->localData[0]->realVars[536] /* points[31]._Gamma._sum2[1] variable */,data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes) + (0.7692307692307693) * ((data->localData[0]->realVars[358] /* points[31]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[676] /* points[31]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[536] /* points[31]._Gamma._sum2[1] variable */,data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[456] /* points[31]._Gamma._sum1[1] variable */,"points[31].Gamma.sum1[1]",equationIndexes))) + (0.2307692307692307) * ((data->localData[0]->realVars[359] /* points[31]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[677] /* points[31]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[537] /* points[31]._Gamma._sum2[2] variable */,data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[457] /* points[31]._Gamma._sum1[2] variable */,"points[31].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1787
- type: SIMPLE_ASSIGN
- points[31]._gamma[2] = exp($cse122)
- */
-void Graph_eqFunction_1787(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1787};
- data->localData[0]->realVars[935] /* points[31]._gamma[2] variable */ = exp(data->localData[0]->realVars[26] /* $cse122 variable */);
- TRACE_POP
-}
-/*
- equation index: 1788
- type: SIMPLE_ASSIGN
- points[31]._K[2] = 0.0001 * points[31].gamma[2] * $cse124
- */
-void Graph_eqFunction_1788(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1788};
- data->localData[0]->realVars[776] /* points[31]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[935] /* points[31]._gamma[2] variable */) * (data->localData[0]->realVars[28] /* $cse124 variable */));
- TRACE_POP
-}
-/*
- equation index: 1789
- type: SIMPLE_ASSIGN
- points[31]._K[1] = -0.2999999999999999 * points[31].K[2] - -1.3
- */
-void Graph_eqFunction_1789(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1789};
- data->localData[0]->realVars[775] /* points[31]._K[1] variable */ = (-0.2999999999999999) * (data->localData[0]->realVars[776] /* points[31]._K[2] variable */) - (-1.3);
- TRACE_POP
-}
-/*
- equation index: 1790
- type: SIMPLE_ASSIGN
- points[31]._gamma[1] = exp($cse121)
- */
-void Graph_eqFunction_1790(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1790};
- data->localData[0]->realVars[934] /* points[31]._gamma[1] variable */ = exp(data->localData[0]->realVars[25] /* $cse121 variable */);
- TRACE_POP
-}
-
-void residualFunc1792(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1792};
- /* iteration variables */
- data->localData[0]->realVars[230] /* T[31] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1771(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1772(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1773(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1774(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1775(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1776(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1777(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1778(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1779(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1780(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1781(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1782(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1783(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1784(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1785(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1786(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1787(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1788(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1789(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1790(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[934] /* points[31]._gamma[1] variable */) * (data->localData[0]->realVars[27] /* $cse123 variable */)) - data->localData[0]->realVars[775] /* points[31]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1792(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1792(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[31] */
- sysData->nominal[i] = data->modelData->realVarsData[230].attribute /* T[31] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[230].attribute /* T[31] */.min;
- sysData->max[i++] = data->modelData->realVarsData[230].attribute /* T[31] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1792(sysData);
-}
-
-void getIterationVarsNLS1792(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[230] /* T[31] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1797
- type: SIMPLE_ASSIGN
- $cse127 = Simulator.Files.ThermodynamicFunctions.Psat({points[32].comp[1].VP[1], points[32].comp[1].VP[2], points[32].comp[1].VP[3], points[32].comp[1].VP[4], points[32].comp[1].VP[5], points[32].comp[1].VP[6]}, T[32])
- */
-void Graph_eqFunction_1797(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1797};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11656], (modelica_real)data->simulationInfo->realParameter[11657], (modelica_real)data->simulationInfo->realParameter[11658], (modelica_real)data->simulationInfo->realParameter[11659], (modelica_real)data->simulationInfo->realParameter[11660], (modelica_real)data->simulationInfo->realParameter[11661]);
- data->localData[0]->realVars[31] /* $cse127 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[231] /* T[32] variable */);
- TRACE_POP
-}
-/*
- equation index: 1798
- type: SIMPLE_ASSIGN
- $cse128 = Simulator.Files.ThermodynamicFunctions.Psat({points[32].comp[2].VP[1], points[32].comp[2].VP[2], points[32].comp[2].VP[3], points[32].comp[2].VP[4], points[32].comp[2].VP[5], points[32].comp[2].VP[6]}, T[32])
- */
-void Graph_eqFunction_1798(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1798};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11662], (modelica_real)data->simulationInfo->realParameter[11663], (modelica_real)data->simulationInfo->realParameter[11664], (modelica_real)data->simulationInfo->realParameter[11665], (modelica_real)data->simulationInfo->realParameter[11666], (modelica_real)data->simulationInfo->realParameter[11667]);
- data->localData[0]->realVars[32] /* $cse128 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[231] /* T[32] variable */);
- TRACE_POP
-}
-/*
- equation index: 1799
- type: SIMPLE_ASSIGN
- points[32]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[32].BIP[1,1,1], T[32])
- */
-void Graph_eqFunction_1799(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1799};
- data->localData[0]->realVars[680] /* points[32]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[572],data->localData[0]->realVars[231] /* T[32] variable */,"T[32]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1800
- type: SIMPLE_ASSIGN
- points[32]._Gamma._G[1,1] = exp((-points[32].BIP[1,1,2]) * points[32].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1800(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1800};
- data->localData[0]->realVars[362] /* points[32]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[573])) * (data->localData[0]->realVars[680] /* points[32]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1801
- type: SIMPLE_ASSIGN
- points[32]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[32].BIP[1,2,1], T[32])
- */
-void Graph_eqFunction_1801(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1801};
- data->localData[0]->realVars[681] /* points[32]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[574],data->localData[0]->realVars[231] /* T[32] variable */,"T[32]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1802
- type: SIMPLE_ASSIGN
- points[32]._Gamma._G[1,2] = exp((-points[32].BIP[1,2,2]) * points[32].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1802(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1802};
- data->localData[0]->realVars[363] /* points[32]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[575])) * (data->localData[0]->realVars[681] /* points[32]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1803
- type: SIMPLE_ASSIGN
- points[32]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[32].BIP[2,1,1], T[32])
- */
-void Graph_eqFunction_1803(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1803};
- data->localData[0]->realVars[682] /* points[32]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[576],data->localData[0]->realVars[231] /* T[32] variable */,"T[32]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1804
- type: SIMPLE_ASSIGN
- points[32]._Gamma._G[2,1] = exp((-points[32].BIP[2,1,2]) * points[32].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1804(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1804};
- data->localData[0]->realVars[364] /* points[32]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[577])) * (data->localData[0]->realVars[682] /* points[32]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1805
- type: SIMPLE_ASSIGN
- points[32]._Gamma._sum2[1] = 0.7948717948717948 * points[32].Gamma.tau[1,1] * points[32].Gamma.G[1,1] + 0.2051282051282052 * points[32].Gamma.tau[2,1] * points[32].Gamma.G[2,1]
- */
-void Graph_eqFunction_1805(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1805};
- data->localData[0]->realVars[538] /* points[32]._Gamma._sum2[1] variable */ = (0.7948717948717948) * ((data->localData[0]->realVars[680] /* points[32]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[362] /* points[32]._Gamma._G[1,1] variable */)) + (0.2051282051282052) * ((data->localData[0]->realVars[682] /* points[32]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[364] /* points[32]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1806
- type: SIMPLE_ASSIGN
- points[32]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[32].BIP[2,2,1], T[32])
- */
-void Graph_eqFunction_1806(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1806};
- data->localData[0]->realVars[683] /* points[32]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[578],data->localData[0]->realVars[231] /* T[32] variable */,"T[32]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1807
- type: SIMPLE_ASSIGN
- points[32]._Gamma._G[2,2] = exp((-points[32].BIP[2,2,2]) * points[32].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1807(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1807};
- data->localData[0]->realVars[365] /* points[32]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[579])) * (data->localData[0]->realVars[683] /* points[32]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1808
- type: SIMPLE_ASSIGN
- points[32]._Gamma._sum2[2] = 0.7948717948717948 * points[32].Gamma.tau[1,2] * points[32].Gamma.G[1,2] + 0.2051282051282052 * points[32].Gamma.tau[2,2] * points[32].Gamma.G[2,2]
- */
-void Graph_eqFunction_1808(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1808};
- data->localData[0]->realVars[539] /* points[32]._Gamma._sum2[2] variable */ = (0.7948717948717948) * ((data->localData[0]->realVars[681] /* points[32]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[363] /* points[32]._Gamma._G[1,2] variable */)) + (0.2051282051282052) * ((data->localData[0]->realVars[683] /* points[32]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[365] /* points[32]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1809
- type: SIMPLE_ASSIGN
- points[32]._Gamma._sum1[1] = 0.7948717948717948 * points[32].Gamma.G[1,1] + 0.2051282051282052 * points[32].Gamma.G[2,1]
- */
-void Graph_eqFunction_1809(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1809};
- data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */ = (0.7948717948717948) * (data->localData[0]->realVars[362] /* points[32]._Gamma._G[1,1] variable */) + (0.2051282051282052) * (data->localData[0]->realVars[364] /* points[32]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1810
- type: SIMPLE_ASSIGN
- points[32]._Gamma._sum1[2] = 0.7948717948717948 * points[32].Gamma.G[1,2] + 0.2051282051282052 * points[32].Gamma.G[2,2]
- */
-void Graph_eqFunction_1810(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1810};
- data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */ = (0.7948717948717948) * (data->localData[0]->realVars[363] /* points[32]._Gamma._G[1,2] variable */) + (0.2051282051282052) * (data->localData[0]->realVars[365] /* points[32]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1811
- type: SIMPLE_ASSIGN
- $cse125 = DIVISION(points[32].Gamma.sum2[1], points[32].Gamma.sum1[1]) + 0.7948717948717948 * points[32].Gamma.G[1,1] * DIVISION(points[32].Gamma.tau[1,1] - DIVISION(points[32].Gamma.sum2[1], points[32].Gamma.sum1[1]), points[32].Gamma.sum1[1]) + 0.2051282051282052 * points[32].Gamma.G[1,2] * DIVISION(points[32].Gamma.tau[1,2] - DIVISION(points[32].Gamma.sum2[2], points[32].Gamma.sum1[2]), points[32].Gamma.sum1[2])
- */
-void Graph_eqFunction_1811(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1811};
- data->localData[0]->realVars[29] /* $cse125 variable */ = DIVISION_SIM(data->localData[0]->realVars[538] /* points[32]._Gamma._sum2[1] variable */,data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes) + (0.7948717948717948) * ((data->localData[0]->realVars[362] /* points[32]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[680] /* points[32]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[538] /* points[32]._Gamma._sum2[1] variable */,data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes))) + (0.2051282051282052) * ((data->localData[0]->realVars[363] /* points[32]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[681] /* points[32]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[539] /* points[32]._Gamma._sum2[2] variable */,data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1812
- type: SIMPLE_ASSIGN
- $cse126 = DIVISION(points[32].Gamma.sum2[2], points[32].Gamma.sum1[2]) + 0.7948717948717948 * points[32].Gamma.G[2,1] * DIVISION(points[32].Gamma.tau[2,1] - DIVISION(points[32].Gamma.sum2[1], points[32].Gamma.sum1[1]), points[32].Gamma.sum1[1]) + 0.2051282051282052 * points[32].Gamma.G[2,2] * DIVISION(points[32].Gamma.tau[2,2] - DIVISION(points[32].Gamma.sum2[2], points[32].Gamma.sum1[2]), points[32].Gamma.sum1[2])
- */
-void Graph_eqFunction_1812(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1812};
- data->localData[0]->realVars[30] /* $cse126 variable */ = DIVISION_SIM(data->localData[0]->realVars[539] /* points[32]._Gamma._sum2[2] variable */,data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes) + (0.7948717948717948) * ((data->localData[0]->realVars[364] /* points[32]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[682] /* points[32]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[538] /* points[32]._Gamma._sum2[1] variable */,data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[458] /* points[32]._Gamma._sum1[1] variable */,"points[32].Gamma.sum1[1]",equationIndexes))) + (0.2051282051282052) * ((data->localData[0]->realVars[365] /* points[32]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[683] /* points[32]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[539] /* points[32]._Gamma._sum2[2] variable */,data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[459] /* points[32]._Gamma._sum1[2] variable */,"points[32].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1813
- type: SIMPLE_ASSIGN
- points[32]._gamma[1] = exp($cse125)
- */
-void Graph_eqFunction_1813(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1813};
- data->localData[0]->realVars[936] /* points[32]._gamma[1] variable */ = exp(data->localData[0]->realVars[29] /* $cse125 variable */);
- TRACE_POP
-}
-/*
- equation index: 1814
- type: SIMPLE_ASSIGN
- points[32]._K[1] = 0.0001 * points[32].gamma[1] * $cse127
- */
-void Graph_eqFunction_1814(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1814};
- data->localData[0]->realVars[777] /* points[32]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[936] /* points[32]._gamma[1] variable */) * (data->localData[0]->realVars[31] /* $cse127 variable */));
- TRACE_POP
-}
-/*
- equation index: 1815
- type: SIMPLE_ASSIGN
- points[32]._K[2] = -3.874999999999999 * points[32].K[1] - -4.874999999999999
- */
-void Graph_eqFunction_1815(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1815};
- data->localData[0]->realVars[778] /* points[32]._K[2] variable */ = (-3.874999999999999) * (data->localData[0]->realVars[777] /* points[32]._K[1] variable */) - (-4.874999999999999);
- TRACE_POP
-}
-/*
- equation index: 1816
- type: SIMPLE_ASSIGN
- points[32]._gamma[2] = exp($cse126)
- */
-void Graph_eqFunction_1816(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1816};
- data->localData[0]->realVars[937] /* points[32]._gamma[2] variable */ = exp(data->localData[0]->realVars[30] /* $cse126 variable */);
- TRACE_POP
-}
-
-void residualFunc1818(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1818};
- /* iteration variables */
- data->localData[0]->realVars[231] /* T[32] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1797(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1798(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1799(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1800(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1801(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1802(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1803(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1804(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1805(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1806(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1807(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1808(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1809(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1810(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1811(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1812(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1813(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1814(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1815(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1816(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[937] /* points[32]._gamma[2] variable */) * (data->localData[0]->realVars[32] /* $cse128 variable */)) - data->localData[0]->realVars[778] /* points[32]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1818(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1818(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[32] */
- sysData->nominal[i] = data->modelData->realVarsData[231].attribute /* T[32] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[231].attribute /* T[32] */.min;
- sysData->max[i++] = data->modelData->realVarsData[231].attribute /* T[32] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1818(sysData);
-}
-
-void getIterationVarsNLS1818(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[231] /* T[32] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1823
- type: SIMPLE_ASSIGN
- $cse132 = Simulator.Files.ThermodynamicFunctions.Psat({points[33].comp[2].VP[1], points[33].comp[2].VP[2], points[33].comp[2].VP[3], points[33].comp[2].VP[4], points[33].comp[2].VP[5], points[33].comp[2].VP[6]}, T[33])
- */
-void Graph_eqFunction_1823(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1823};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11674], (modelica_real)data->simulationInfo->realParameter[11675], (modelica_real)data->simulationInfo->realParameter[11676], (modelica_real)data->simulationInfo->realParameter[11677], (modelica_real)data->simulationInfo->realParameter[11678], (modelica_real)data->simulationInfo->realParameter[11679]);
- data->localData[0]->realVars[37] /* $cse132 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[232] /* T[33] variable */);
- TRACE_POP
-}
-/*
- equation index: 1824
- type: SIMPLE_ASSIGN
- $cse131 = Simulator.Files.ThermodynamicFunctions.Psat({points[33].comp[1].VP[1], points[33].comp[1].VP[2], points[33].comp[1].VP[3], points[33].comp[1].VP[4], points[33].comp[1].VP[5], points[33].comp[1].VP[6]}, T[33])
- */
-void Graph_eqFunction_1824(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1824};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11668], (modelica_real)data->simulationInfo->realParameter[11669], (modelica_real)data->simulationInfo->realParameter[11670], (modelica_real)data->simulationInfo->realParameter[11671], (modelica_real)data->simulationInfo->realParameter[11672], (modelica_real)data->simulationInfo->realParameter[11673]);
- data->localData[0]->realVars[36] /* $cse131 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[232] /* T[33] variable */);
- TRACE_POP
-}
-/*
- equation index: 1825
- type: SIMPLE_ASSIGN
- points[33]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[33].BIP[1,1,1], T[33])
- */
-void Graph_eqFunction_1825(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1825};
- data->localData[0]->realVars[684] /* points[33]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[580],data->localData[0]->realVars[232] /* T[33] variable */,"T[33]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1826
- type: SIMPLE_ASSIGN
- points[33]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[33].BIP[2,2,1], T[33])
- */
-void Graph_eqFunction_1826(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1826};
- data->localData[0]->realVars[687] /* points[33]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[586],data->localData[0]->realVars[232] /* T[33] variable */,"T[33]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1827
- type: SIMPLE_ASSIGN
- points[33]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[33].BIP[1,2,1], T[33])
- */
-void Graph_eqFunction_1827(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1827};
- data->localData[0]->realVars[685] /* points[33]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[582],data->localData[0]->realVars[232] /* T[33] variable */,"T[33]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1828
- type: SIMPLE_ASSIGN
- points[33]._Gamma._G[1,2] = exp((-points[33].BIP[1,2,2]) * points[33].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1828(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1828};
- data->localData[0]->realVars[367] /* points[33]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[583])) * (data->localData[0]->realVars[685] /* points[33]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1829
- type: SIMPLE_ASSIGN
- points[33]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[33].BIP[2,1,1], T[33])
- */
-void Graph_eqFunction_1829(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1829};
- data->localData[0]->realVars[686] /* points[33]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[584],data->localData[0]->realVars[232] /* T[33] variable */,"T[33]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1830
- type: SIMPLE_ASSIGN
- points[33]._Gamma._G[2,1] = exp((-points[33].BIP[2,1,2]) * points[33].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1830(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1830};
- data->localData[0]->realVars[368] /* points[33]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[585])) * (data->localData[0]->realVars[686] /* points[33]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1831
- type: SIMPLE_ASSIGN
- points[33]._Gamma._G[2,2] = exp((-points[33].BIP[2,2,2]) * points[33].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1831(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1831};
- data->localData[0]->realVars[369] /* points[33]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[587])) * (data->localData[0]->realVars[687] /* points[33]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1832
- type: SIMPLE_ASSIGN
- points[33]._Gamma._sum2[2] = 0.8205128205128205 * points[33].Gamma.tau[1,2] * points[33].Gamma.G[1,2] + 0.1794871794871795 * points[33].Gamma.tau[2,2] * points[33].Gamma.G[2,2]
- */
-void Graph_eqFunction_1832(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1832};
- data->localData[0]->realVars[541] /* points[33]._Gamma._sum2[2] variable */ = (0.8205128205128205) * ((data->localData[0]->realVars[685] /* points[33]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[367] /* points[33]._Gamma._G[1,2] variable */)) + (0.1794871794871795) * ((data->localData[0]->realVars[687] /* points[33]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[369] /* points[33]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1833
- type: SIMPLE_ASSIGN
- points[33]._Gamma._G[1,1] = exp((-points[33].BIP[1,1,2]) * points[33].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1833(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1833};
- data->localData[0]->realVars[366] /* points[33]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[581])) * (data->localData[0]->realVars[684] /* points[33]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1834
- type: SIMPLE_ASSIGN
- points[33]._Gamma._sum2[1] = 0.8205128205128205 * points[33].Gamma.tau[1,1] * points[33].Gamma.G[1,1] + 0.1794871794871795 * points[33].Gamma.tau[2,1] * points[33].Gamma.G[2,1]
- */
-void Graph_eqFunction_1834(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1834};
- data->localData[0]->realVars[540] /* points[33]._Gamma._sum2[1] variable */ = (0.8205128205128205) * ((data->localData[0]->realVars[684] /* points[33]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[366] /* points[33]._Gamma._G[1,1] variable */)) + (0.1794871794871795) * ((data->localData[0]->realVars[686] /* points[33]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[368] /* points[33]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1835
- type: SIMPLE_ASSIGN
- points[33]._Gamma._sum1[2] = 0.8205128205128205 * points[33].Gamma.G[1,2] + 0.1794871794871795 * points[33].Gamma.G[2,2]
- */
-void Graph_eqFunction_1835(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1835};
- data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */ = (0.8205128205128205) * (data->localData[0]->realVars[367] /* points[33]._Gamma._G[1,2] variable */) + (0.1794871794871795) * (data->localData[0]->realVars[369] /* points[33]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1836
- type: SIMPLE_ASSIGN
- points[33]._Gamma._sum1[1] = 0.8205128205128205 * points[33].Gamma.G[1,1] + 0.1794871794871795 * points[33].Gamma.G[2,1]
- */
-void Graph_eqFunction_1836(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1836};
- data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */ = (0.8205128205128205) * (data->localData[0]->realVars[366] /* points[33]._Gamma._G[1,1] variable */) + (0.1794871794871795) * (data->localData[0]->realVars[368] /* points[33]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1837
- type: SIMPLE_ASSIGN
- $cse130 = DIVISION(points[33].Gamma.sum2[2], points[33].Gamma.sum1[2]) + 0.8205128205128205 * points[33].Gamma.G[2,1] * DIVISION(points[33].Gamma.tau[2,1] - DIVISION(points[33].Gamma.sum2[1], points[33].Gamma.sum1[1]), points[33].Gamma.sum1[1]) + 0.1794871794871795 * points[33].Gamma.G[2,2] * DIVISION(points[33].Gamma.tau[2,2] - DIVISION(points[33].Gamma.sum2[2], points[33].Gamma.sum1[2]), points[33].Gamma.sum1[2])
- */
-void Graph_eqFunction_1837(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1837};
- data->localData[0]->realVars[35] /* $cse130 variable */ = DIVISION_SIM(data->localData[0]->realVars[541] /* points[33]._Gamma._sum2[2] variable */,data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes) + (0.8205128205128205) * ((data->localData[0]->realVars[368] /* points[33]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[686] /* points[33]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[540] /* points[33]._Gamma._sum2[1] variable */,data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes))) + (0.1794871794871795) * ((data->localData[0]->realVars[369] /* points[33]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[687] /* points[33]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[541] /* points[33]._Gamma._sum2[2] variable */,data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1838
- type: SIMPLE_ASSIGN
- $cse129 = DIVISION(points[33].Gamma.sum2[1], points[33].Gamma.sum1[1]) + 0.8205128205128205 * points[33].Gamma.G[1,1] * DIVISION(points[33].Gamma.tau[1,1] - DIVISION(points[33].Gamma.sum2[1], points[33].Gamma.sum1[1]), points[33].Gamma.sum1[1]) + 0.1794871794871795 * points[33].Gamma.G[1,2] * DIVISION(points[33].Gamma.tau[1,2] - DIVISION(points[33].Gamma.sum2[2], points[33].Gamma.sum1[2]), points[33].Gamma.sum1[2])
- */
-void Graph_eqFunction_1838(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1838};
- data->localData[0]->realVars[33] /* $cse129 variable */ = DIVISION_SIM(data->localData[0]->realVars[540] /* points[33]._Gamma._sum2[1] variable */,data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes) + (0.8205128205128205) * ((data->localData[0]->realVars[366] /* points[33]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[684] /* points[33]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[540] /* points[33]._Gamma._sum2[1] variable */,data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[460] /* points[33]._Gamma._sum1[1] variable */,"points[33].Gamma.sum1[1]",equationIndexes))) + (0.1794871794871795) * ((data->localData[0]->realVars[367] /* points[33]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[685] /* points[33]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[541] /* points[33]._Gamma._sum2[2] variable */,data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[461] /* points[33]._Gamma._sum1[2] variable */,"points[33].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1839
- type: SIMPLE_ASSIGN
- points[33]._gamma[2] = exp($cse130)
- */
-void Graph_eqFunction_1839(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1839};
- data->localData[0]->realVars[939] /* points[33]._gamma[2] variable */ = exp(data->localData[0]->realVars[35] /* $cse130 variable */);
- TRACE_POP
-}
-/*
- equation index: 1840
- type: SIMPLE_ASSIGN
- points[33]._K[2] = 0.0001 * points[33].gamma[2] * $cse132
- */
-void Graph_eqFunction_1840(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1840};
- data->localData[0]->realVars[780] /* points[33]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[939] /* points[33]._gamma[2] variable */) * (data->localData[0]->realVars[37] /* $cse132 variable */));
- TRACE_POP
-}
-/*
- equation index: 1841
- type: SIMPLE_ASSIGN
- points[33]._K[1] = -0.21875 * points[33].K[2] - -1.21875
- */
-void Graph_eqFunction_1841(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1841};
- data->localData[0]->realVars[779] /* points[33]._K[1] variable */ = (-0.21875) * (data->localData[0]->realVars[780] /* points[33]._K[2] variable */) - (-1.21875);
- TRACE_POP
-}
-/*
- equation index: 1842
- type: SIMPLE_ASSIGN
- points[33]._gamma[1] = exp($cse129)
- */
-void Graph_eqFunction_1842(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1842};
- data->localData[0]->realVars[938] /* points[33]._gamma[1] variable */ = exp(data->localData[0]->realVars[33] /* $cse129 variable */);
- TRACE_POP
-}
-
-void residualFunc1844(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1844};
- /* iteration variables */
- data->localData[0]->realVars[232] /* T[33] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1823(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1824(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1825(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1826(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1827(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1828(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1829(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1830(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1831(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1832(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1833(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1834(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1835(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1836(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1837(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1838(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1839(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1840(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1841(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1842(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[938] /* points[33]._gamma[1] variable */) * (data->localData[0]->realVars[36] /* $cse131 variable */)) - data->localData[0]->realVars[779] /* points[33]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1844(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1844(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[33] */
- sysData->nominal[i] = data->modelData->realVarsData[232].attribute /* T[33] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[232].attribute /* T[33] */.min;
- sysData->max[i++] = data->modelData->realVarsData[232].attribute /* T[33] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1844(sysData);
-}
-
-void getIterationVarsNLS1844(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[232] /* T[33] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1849
- type: SIMPLE_ASSIGN
- $cse136 = Simulator.Files.ThermodynamicFunctions.Psat({points[34].comp[2].VP[1], points[34].comp[2].VP[2], points[34].comp[2].VP[3], points[34].comp[2].VP[4], points[34].comp[2].VP[5], points[34].comp[2].VP[6]}, T[34])
- */
-void Graph_eqFunction_1849(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1849};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11686], (modelica_real)data->simulationInfo->realParameter[11687], (modelica_real)data->simulationInfo->realParameter[11688], (modelica_real)data->simulationInfo->realParameter[11689], (modelica_real)data->simulationInfo->realParameter[11690], (modelica_real)data->simulationInfo->realParameter[11691]);
- data->localData[0]->realVars[41] /* $cse136 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[233] /* T[34] variable */);
- TRACE_POP
-}
-/*
- equation index: 1850
- type: SIMPLE_ASSIGN
- $cse135 = Simulator.Files.ThermodynamicFunctions.Psat({points[34].comp[1].VP[1], points[34].comp[1].VP[2], points[34].comp[1].VP[3], points[34].comp[1].VP[4], points[34].comp[1].VP[5], points[34].comp[1].VP[6]}, T[34])
- */
-void Graph_eqFunction_1850(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1850};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11680], (modelica_real)data->simulationInfo->realParameter[11681], (modelica_real)data->simulationInfo->realParameter[11682], (modelica_real)data->simulationInfo->realParameter[11683], (modelica_real)data->simulationInfo->realParameter[11684], (modelica_real)data->simulationInfo->realParameter[11685]);
- data->localData[0]->realVars[40] /* $cse135 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[233] /* T[34] variable */);
- TRACE_POP
-}
-/*
- equation index: 1851
- type: SIMPLE_ASSIGN
- points[34]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[34].BIP[1,1,1], T[34])
- */
-void Graph_eqFunction_1851(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1851};
- data->localData[0]->realVars[688] /* points[34]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[588],data->localData[0]->realVars[233] /* T[34] variable */,"T[34]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1852
- type: SIMPLE_ASSIGN
- points[34]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[34].BIP[2,1,1], T[34])
- */
-void Graph_eqFunction_1852(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1852};
- data->localData[0]->realVars[690] /* points[34]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[592],data->localData[0]->realVars[233] /* T[34] variable */,"T[34]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1853
- type: SIMPLE_ASSIGN
- points[34]._Gamma._G[2,1] = exp((-points[34].BIP[2,1,2]) * points[34].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1853(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1853};
- data->localData[0]->realVars[372] /* points[34]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[593])) * (data->localData[0]->realVars[690] /* points[34]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1854
- type: SIMPLE_ASSIGN
- points[34]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[34].BIP[1,2,1], T[34])
- */
-void Graph_eqFunction_1854(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1854};
- data->localData[0]->realVars[689] /* points[34]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[590],data->localData[0]->realVars[233] /* T[34] variable */,"T[34]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1855
- type: SIMPLE_ASSIGN
- points[34]._Gamma._G[1,2] = exp((-points[34].BIP[1,2,2]) * points[34].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1855(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1855};
- data->localData[0]->realVars[371] /* points[34]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[591])) * (data->localData[0]->realVars[689] /* points[34]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1856
- type: SIMPLE_ASSIGN
- points[34]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[34].BIP[2,2,1], T[34])
- */
-void Graph_eqFunction_1856(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1856};
- data->localData[0]->realVars[691] /* points[34]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[594],data->localData[0]->realVars[233] /* T[34] variable */,"T[34]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1857
- type: SIMPLE_ASSIGN
- points[34]._Gamma._G[2,2] = exp((-points[34].BIP[2,2,2]) * points[34].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1857(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1857};
- data->localData[0]->realVars[373] /* points[34]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[595])) * (data->localData[0]->realVars[691] /* points[34]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1858
- type: SIMPLE_ASSIGN
- points[34]._Gamma._sum2[2] = 0.8461538461538462 * points[34].Gamma.tau[1,2] * points[34].Gamma.G[1,2] + 0.1538461538461539 * points[34].Gamma.tau[2,2] * points[34].Gamma.G[2,2]
- */
-void Graph_eqFunction_1858(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1858};
- data->localData[0]->realVars[543] /* points[34]._Gamma._sum2[2] variable */ = (0.8461538461538462) * ((data->localData[0]->realVars[689] /* points[34]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[371] /* points[34]._Gamma._G[1,2] variable */)) + (0.1538461538461539) * ((data->localData[0]->realVars[691] /* points[34]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[373] /* points[34]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1859
- type: SIMPLE_ASSIGN
- points[34]._Gamma._G[1,1] = exp((-points[34].BIP[1,1,2]) * points[34].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1859(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1859};
- data->localData[0]->realVars[370] /* points[34]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[589])) * (data->localData[0]->realVars[688] /* points[34]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1860
- type: SIMPLE_ASSIGN
- points[34]._Gamma._sum2[1] = 0.8461538461538462 * points[34].Gamma.tau[1,1] * points[34].Gamma.G[1,1] + 0.1538461538461539 * points[34].Gamma.tau[2,1] * points[34].Gamma.G[2,1]
- */
-void Graph_eqFunction_1860(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1860};
- data->localData[0]->realVars[542] /* points[34]._Gamma._sum2[1] variable */ = (0.8461538461538462) * ((data->localData[0]->realVars[688] /* points[34]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[370] /* points[34]._Gamma._G[1,1] variable */)) + (0.1538461538461539) * ((data->localData[0]->realVars[690] /* points[34]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[372] /* points[34]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1861
- type: SIMPLE_ASSIGN
- points[34]._Gamma._sum1[1] = 0.8461538461538462 * points[34].Gamma.G[1,1] + 0.1538461538461539 * points[34].Gamma.G[2,1]
- */
-void Graph_eqFunction_1861(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1861};
- data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */ = (0.8461538461538462) * (data->localData[0]->realVars[370] /* points[34]._Gamma._G[1,1] variable */) + (0.1538461538461539) * (data->localData[0]->realVars[372] /* points[34]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1862
- type: SIMPLE_ASSIGN
- points[34]._Gamma._sum1[2] = 0.8461538461538462 * points[34].Gamma.G[1,2] + 0.1538461538461539 * points[34].Gamma.G[2,2]
- */
-void Graph_eqFunction_1862(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1862};
- data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */ = (0.8461538461538462) * (data->localData[0]->realVars[371] /* points[34]._Gamma._G[1,2] variable */) + (0.1538461538461539) * (data->localData[0]->realVars[373] /* points[34]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1863
- type: SIMPLE_ASSIGN
- $cse134 = DIVISION(points[34].Gamma.sum2[2], points[34].Gamma.sum1[2]) + 0.8461538461538462 * points[34].Gamma.G[2,1] * DIVISION(points[34].Gamma.tau[2,1] - DIVISION(points[34].Gamma.sum2[1], points[34].Gamma.sum1[1]), points[34].Gamma.sum1[1]) + 0.1538461538461539 * points[34].Gamma.G[2,2] * DIVISION(points[34].Gamma.tau[2,2] - DIVISION(points[34].Gamma.sum2[2], points[34].Gamma.sum1[2]), points[34].Gamma.sum1[2])
- */
-void Graph_eqFunction_1863(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1863};
- data->localData[0]->realVars[39] /* $cse134 variable */ = DIVISION_SIM(data->localData[0]->realVars[543] /* points[34]._Gamma._sum2[2] variable */,data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes) + (0.8461538461538462) * ((data->localData[0]->realVars[372] /* points[34]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[690] /* points[34]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[542] /* points[34]._Gamma._sum2[1] variable */,data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes))) + (0.1538461538461539) * ((data->localData[0]->realVars[373] /* points[34]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[691] /* points[34]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[543] /* points[34]._Gamma._sum2[2] variable */,data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1864
- type: SIMPLE_ASSIGN
- $cse133 = DIVISION(points[34].Gamma.sum2[1], points[34].Gamma.sum1[1]) + 0.8461538461538462 * points[34].Gamma.G[1,1] * DIVISION(points[34].Gamma.tau[1,1] - DIVISION(points[34].Gamma.sum2[1], points[34].Gamma.sum1[1]), points[34].Gamma.sum1[1]) + 0.1538461538461539 * points[34].Gamma.G[1,2] * DIVISION(points[34].Gamma.tau[1,2] - DIVISION(points[34].Gamma.sum2[2], points[34].Gamma.sum1[2]), points[34].Gamma.sum1[2])
- */
-void Graph_eqFunction_1864(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1864};
- data->localData[0]->realVars[38] /* $cse133 variable */ = DIVISION_SIM(data->localData[0]->realVars[542] /* points[34]._Gamma._sum2[1] variable */,data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes) + (0.8461538461538462) * ((data->localData[0]->realVars[370] /* points[34]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[688] /* points[34]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[542] /* points[34]._Gamma._sum2[1] variable */,data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[462] /* points[34]._Gamma._sum1[1] variable */,"points[34].Gamma.sum1[1]",equationIndexes))) + (0.1538461538461539) * ((data->localData[0]->realVars[371] /* points[34]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[689] /* points[34]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[543] /* points[34]._Gamma._sum2[2] variable */,data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[463] /* points[34]._Gamma._sum1[2] variable */,"points[34].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1865
- type: SIMPLE_ASSIGN
- points[34]._gamma[1] = exp($cse133)
- */
-void Graph_eqFunction_1865(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1865};
- data->localData[0]->realVars[940] /* points[34]._gamma[1] variable */ = exp(data->localData[0]->realVars[38] /* $cse133 variable */);
- TRACE_POP
-}
-/*
- equation index: 1866
- type: SIMPLE_ASSIGN
- points[34]._K[1] = 0.0001 * points[34].gamma[1] * $cse135
- */
-void Graph_eqFunction_1866(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1866};
- data->localData[0]->realVars[781] /* points[34]._K[1] variable */ = (0.0001) * ((data->localData[0]->realVars[940] /* points[34]._gamma[1] variable */) * (data->localData[0]->realVars[40] /* $cse135 variable */));
- TRACE_POP
-}
-/*
- equation index: 1867
- type: SIMPLE_ASSIGN
- points[34]._K[2] = -5.5 * points[34].K[1] - -6.5
- */
-void Graph_eqFunction_1867(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1867};
- data->localData[0]->realVars[782] /* points[34]._K[2] variable */ = (-5.5) * (data->localData[0]->realVars[781] /* points[34]._K[1] variable */) - (-6.5);
- TRACE_POP
-}
-/*
- equation index: 1868
- type: SIMPLE_ASSIGN
- points[34]._gamma[2] = exp($cse134)
- */
-void Graph_eqFunction_1868(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1868};
- data->localData[0]->realVars[941] /* points[34]._gamma[2] variable */ = exp(data->localData[0]->realVars[39] /* $cse134 variable */);
- TRACE_POP
-}
-
-void residualFunc1870(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1870};
- /* iteration variables */
- data->localData[0]->realVars[233] /* T[34] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1849(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1850(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1851(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1852(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1853(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1854(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1855(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1856(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1857(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1858(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1859(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1860(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1861(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1862(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1863(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1864(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1865(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1866(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1867(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1868(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[941] /* points[34]._gamma[2] variable */) * (data->localData[0]->realVars[41] /* $cse136 variable */)) - data->localData[0]->realVars[782] /* points[34]._K[2] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1870(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1870(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[34] */
- sysData->nominal[i] = data->modelData->realVarsData[233].attribute /* T[34] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[233].attribute /* T[34] */.min;
- sysData->max[i++] = data->modelData->realVarsData[233].attribute /* T[34] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1870(sysData);
-}
-
-void getIterationVarsNLS1870(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[233] /* T[34] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1875
- type: SIMPLE_ASSIGN
- $cse140 = Simulator.Files.ThermodynamicFunctions.Psat({points[35].comp[2].VP[1], points[35].comp[2].VP[2], points[35].comp[2].VP[3], points[35].comp[2].VP[4], points[35].comp[2].VP[5], points[35].comp[2].VP[6]}, T[35])
- */
-void Graph_eqFunction_1875(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1875};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11698], (modelica_real)data->simulationInfo->realParameter[11699], (modelica_real)data->simulationInfo->realParameter[11700], (modelica_real)data->simulationInfo->realParameter[11701], (modelica_real)data->simulationInfo->realParameter[11702], (modelica_real)data->simulationInfo->realParameter[11703]);
- data->localData[0]->realVars[46] /* $cse140 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[234] /* T[35] variable */);
- TRACE_POP
-}
-/*
- equation index: 1876
- type: SIMPLE_ASSIGN
- $cse139 = Simulator.Files.ThermodynamicFunctions.Psat({points[35].comp[1].VP[1], points[35].comp[1].VP[2], points[35].comp[1].VP[3], points[35].comp[1].VP[4], points[35].comp[1].VP[5], points[35].comp[1].VP[6]}, T[35])
- */
-void Graph_eqFunction_1876(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1876};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11692], (modelica_real)data->simulationInfo->realParameter[11693], (modelica_real)data->simulationInfo->realParameter[11694], (modelica_real)data->simulationInfo->realParameter[11695], (modelica_real)data->simulationInfo->realParameter[11696], (modelica_real)data->simulationInfo->realParameter[11697]);
- data->localData[0]->realVars[44] /* $cse139 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[234] /* T[35] variable */);
- TRACE_POP
-}
-/*
- equation index: 1877
- type: SIMPLE_ASSIGN
- points[35]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[35].BIP[1,1,1], T[35])
- */
-void Graph_eqFunction_1877(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1877};
- data->localData[0]->realVars[692] /* points[35]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[596],data->localData[0]->realVars[234] /* T[35] variable */,"T[35]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1878
- type: SIMPLE_ASSIGN
- points[35]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[35].BIP[2,2,1], T[35])
- */
-void Graph_eqFunction_1878(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1878};
- data->localData[0]->realVars[695] /* points[35]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[602],data->localData[0]->realVars[234] /* T[35] variable */,"T[35]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1879
- type: SIMPLE_ASSIGN
- points[35]._Gamma._G[2,2] = exp((-points[35].BIP[2,2,2]) * points[35].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1879(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1879};
- data->localData[0]->realVars[377] /* points[35]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[603])) * (data->localData[0]->realVars[695] /* points[35]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1880
- type: SIMPLE_ASSIGN
- points[35]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[35].BIP[2,1,1], T[35])
- */
-void Graph_eqFunction_1880(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1880};
- data->localData[0]->realVars[694] /* points[35]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[600],data->localData[0]->realVars[234] /* T[35] variable */,"T[35]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1881
- type: SIMPLE_ASSIGN
- points[35]._Gamma._G[2,1] = exp((-points[35].BIP[2,1,2]) * points[35].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1881(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1881};
- data->localData[0]->realVars[376] /* points[35]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[601])) * (data->localData[0]->realVars[694] /* points[35]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1882
- type: SIMPLE_ASSIGN
- points[35]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[35].BIP[1,2,1], T[35])
- */
-void Graph_eqFunction_1882(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1882};
- data->localData[0]->realVars[693] /* points[35]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[598],data->localData[0]->realVars[234] /* T[35] variable */,"T[35]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1883
- type: SIMPLE_ASSIGN
- points[35]._Gamma._G[1,2] = exp((-points[35].BIP[1,2,2]) * points[35].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1883(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1883};
- data->localData[0]->realVars[375] /* points[35]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[599])) * (data->localData[0]->realVars[693] /* points[35]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1884
- type: SIMPLE_ASSIGN
- points[35]._Gamma._sum2[2] = 0.8717948717948718 * points[35].Gamma.tau[1,2] * points[35].Gamma.G[1,2] + 0.1282051282051282 * points[35].Gamma.tau[2,2] * points[35].Gamma.G[2,2]
- */
-void Graph_eqFunction_1884(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1884};
- data->localData[0]->realVars[545] /* points[35]._Gamma._sum2[2] variable */ = (0.8717948717948718) * ((data->localData[0]->realVars[693] /* points[35]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[375] /* points[35]._Gamma._G[1,2] variable */)) + (0.1282051282051282) * ((data->localData[0]->realVars[695] /* points[35]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[377] /* points[35]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1885
- type: SIMPLE_ASSIGN
- points[35]._Gamma._G[1,1] = exp((-points[35].BIP[1,1,2]) * points[35].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1885(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1885};
- data->localData[0]->realVars[374] /* points[35]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[597])) * (data->localData[0]->realVars[692] /* points[35]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1886
- type: SIMPLE_ASSIGN
- points[35]._Gamma._sum2[1] = 0.8717948717948718 * points[35].Gamma.tau[1,1] * points[35].Gamma.G[1,1] + 0.1282051282051282 * points[35].Gamma.tau[2,1] * points[35].Gamma.G[2,1]
- */
-void Graph_eqFunction_1886(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1886};
- data->localData[0]->realVars[544] /* points[35]._Gamma._sum2[1] variable */ = (0.8717948717948718) * ((data->localData[0]->realVars[692] /* points[35]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[374] /* points[35]._Gamma._G[1,1] variable */)) + (0.1282051282051282) * ((data->localData[0]->realVars[694] /* points[35]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[376] /* points[35]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1887
- type: SIMPLE_ASSIGN
- points[35]._Gamma._sum1[2] = 0.8717948717948718 * points[35].Gamma.G[1,2] + 0.1282051282051282 * points[35].Gamma.G[2,2]
- */
-void Graph_eqFunction_1887(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1887};
- data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */ = (0.8717948717948718) * (data->localData[0]->realVars[375] /* points[35]._Gamma._G[1,2] variable */) + (0.1282051282051282) * (data->localData[0]->realVars[377] /* points[35]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1888
- type: SIMPLE_ASSIGN
- points[35]._Gamma._sum1[1] = 0.8717948717948718 * points[35].Gamma.G[1,1] + 0.1282051282051282 * points[35].Gamma.G[2,1]
- */
-void Graph_eqFunction_1888(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1888};
- data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */ = (0.8717948717948718) * (data->localData[0]->realVars[374] /* points[35]._Gamma._G[1,1] variable */) + (0.1282051282051282) * (data->localData[0]->realVars[376] /* points[35]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1889
- type: SIMPLE_ASSIGN
- $cse138 = DIVISION(points[35].Gamma.sum2[2], points[35].Gamma.sum1[2]) + 0.8717948717948718 * points[35].Gamma.G[2,1] * DIVISION(points[35].Gamma.tau[2,1] - DIVISION(points[35].Gamma.sum2[1], points[35].Gamma.sum1[1]), points[35].Gamma.sum1[1]) + 0.1282051282051282 * points[35].Gamma.G[2,2] * DIVISION(points[35].Gamma.tau[2,2] - DIVISION(points[35].Gamma.sum2[2], points[35].Gamma.sum1[2]), points[35].Gamma.sum1[2])
- */
-void Graph_eqFunction_1889(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1889};
- data->localData[0]->realVars[43] /* $cse138 variable */ = DIVISION_SIM(data->localData[0]->realVars[545] /* points[35]._Gamma._sum2[2] variable */,data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes) + (0.8717948717948718) * ((data->localData[0]->realVars[376] /* points[35]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[694] /* points[35]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[544] /* points[35]._Gamma._sum2[1] variable */,data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes))) + (0.1282051282051282) * ((data->localData[0]->realVars[377] /* points[35]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[695] /* points[35]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[545] /* points[35]._Gamma._sum2[2] variable */,data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1890
- type: SIMPLE_ASSIGN
- $cse137 = DIVISION(points[35].Gamma.sum2[1], points[35].Gamma.sum1[1]) + 0.8717948717948718 * points[35].Gamma.G[1,1] * DIVISION(points[35].Gamma.tau[1,1] - DIVISION(points[35].Gamma.sum2[1], points[35].Gamma.sum1[1]), points[35].Gamma.sum1[1]) + 0.1282051282051282 * points[35].Gamma.G[1,2] * DIVISION(points[35].Gamma.tau[1,2] - DIVISION(points[35].Gamma.sum2[2], points[35].Gamma.sum1[2]), points[35].Gamma.sum1[2])
- */
-void Graph_eqFunction_1890(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1890};
- data->localData[0]->realVars[42] /* $cse137 variable */ = DIVISION_SIM(data->localData[0]->realVars[544] /* points[35]._Gamma._sum2[1] variable */,data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes) + (0.8717948717948718) * ((data->localData[0]->realVars[374] /* points[35]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[692] /* points[35]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[544] /* points[35]._Gamma._sum2[1] variable */,data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[464] /* points[35]._Gamma._sum1[1] variable */,"points[35].Gamma.sum1[1]",equationIndexes))) + (0.1282051282051282) * ((data->localData[0]->realVars[375] /* points[35]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[693] /* points[35]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[545] /* points[35]._Gamma._sum2[2] variable */,data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[465] /* points[35]._Gamma._sum1[2] variable */,"points[35].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1891
- type: SIMPLE_ASSIGN
- points[35]._gamma[2] = exp($cse138)
- */
-void Graph_eqFunction_1891(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1891};
- data->localData[0]->realVars[943] /* points[35]._gamma[2] variable */ = exp(data->localData[0]->realVars[43] /* $cse138 variable */);
- TRACE_POP
-}
-/*
- equation index: 1892
- type: SIMPLE_ASSIGN
- points[35]._K[2] = 0.0001 * points[35].gamma[2] * $cse140
- */
-void Graph_eqFunction_1892(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1892};
- data->localData[0]->realVars[784] /* points[35]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[943] /* points[35]._gamma[2] variable */) * (data->localData[0]->realVars[46] /* $cse140 variable */));
- TRACE_POP
-}
-/*
- equation index: 1893
- type: SIMPLE_ASSIGN
- points[35]._K[1] = -0.1470588235294117 * points[35].K[2] - -1.147058823529412
- */
-void Graph_eqFunction_1893(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1893};
- data->localData[0]->realVars[783] /* points[35]._K[1] variable */ = (-0.1470588235294117) * (data->localData[0]->realVars[784] /* points[35]._K[2] variable */) - (-1.147058823529412);
- TRACE_POP
-}
-/*
- equation index: 1894
- type: SIMPLE_ASSIGN
- points[35]._gamma[1] = exp($cse137)
- */
-void Graph_eqFunction_1894(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1894};
- data->localData[0]->realVars[942] /* points[35]._gamma[1] variable */ = exp(data->localData[0]->realVars[42] /* $cse137 variable */);
- TRACE_POP
-}
-
-void residualFunc1896(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1896};
- /* iteration variables */
- data->localData[0]->realVars[234] /* T[35] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1875(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1876(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1877(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1878(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1879(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1880(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1881(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1882(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1883(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1884(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1885(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1886(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1887(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1888(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1889(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1890(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1891(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1892(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1893(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1894(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[942] /* points[35]._gamma[1] variable */) * (data->localData[0]->realVars[44] /* $cse139 variable */)) - data->localData[0]->realVars[783] /* points[35]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1896(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1896(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[35] */
- sysData->nominal[i] = data->modelData->realVarsData[234].attribute /* T[35] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[234].attribute /* T[35] */.min;
- sysData->max[i++] = data->modelData->realVarsData[234].attribute /* T[35] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1896(sysData);
-}
-
-void getIterationVarsNLS1896(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[234] /* T[35] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1901
- type: SIMPLE_ASSIGN
- $cse143 = Simulator.Files.ThermodynamicFunctions.Psat({points[36].comp[1].VP[1], points[36].comp[1].VP[2], points[36].comp[1].VP[3], points[36].comp[1].VP[4], points[36].comp[1].VP[5], points[36].comp[1].VP[6]}, T[36])
- */
-void Graph_eqFunction_1901(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1901};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11704], (modelica_real)data->simulationInfo->realParameter[11705], (modelica_real)data->simulationInfo->realParameter[11706], (modelica_real)data->simulationInfo->realParameter[11707], (modelica_real)data->simulationInfo->realParameter[11708], (modelica_real)data->simulationInfo->realParameter[11709]);
- data->localData[0]->realVars[49] /* $cse143 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[235] /* T[36] variable */);
- TRACE_POP
-}
-/*
- equation index: 1902
- type: SIMPLE_ASSIGN
- $cse144 = Simulator.Files.ThermodynamicFunctions.Psat({points[36].comp[2].VP[1], points[36].comp[2].VP[2], points[36].comp[2].VP[3], points[36].comp[2].VP[4], points[36].comp[2].VP[5], points[36].comp[2].VP[6]}, T[36])
- */
-void Graph_eqFunction_1902(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1902};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11710], (modelica_real)data->simulationInfo->realParameter[11711], (modelica_real)data->simulationInfo->realParameter[11712], (modelica_real)data->simulationInfo->realParameter[11713], (modelica_real)data->simulationInfo->realParameter[11714], (modelica_real)data->simulationInfo->realParameter[11715]);
- data->localData[0]->realVars[50] /* $cse144 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[235] /* T[36] variable */);
- TRACE_POP
-}
-/*
- equation index: 1903
- type: SIMPLE_ASSIGN
- points[36]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[36].BIP[1,1,1], T[36])
- */
-void Graph_eqFunction_1903(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1903};
- data->localData[0]->realVars[696] /* points[36]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[604],data->localData[0]->realVars[235] /* T[36] variable */,"T[36]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1904
- type: SIMPLE_ASSIGN
- points[36]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[36].BIP[2,1,1], T[36])
- */
-void Graph_eqFunction_1904(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1904};
- data->localData[0]->realVars[698] /* points[36]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[608],data->localData[0]->realVars[235] /* T[36] variable */,"T[36]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1905
- type: SIMPLE_ASSIGN
- points[36]._Gamma._G[2,1] = exp((-points[36].BIP[2,1,2]) * points[36].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1905(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1905};
- data->localData[0]->realVars[380] /* points[36]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[609])) * (data->localData[0]->realVars[698] /* points[36]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1906
- type: SIMPLE_ASSIGN
- points[36]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[36].BIP[2,2,1], T[36])
- */
-void Graph_eqFunction_1906(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1906};
- data->localData[0]->realVars[699] /* points[36]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[610],data->localData[0]->realVars[235] /* T[36] variable */,"T[36]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1907
- type: SIMPLE_ASSIGN
- points[36]._Gamma._G[2,2] = exp((-points[36].BIP[2,2,2]) * points[36].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1907(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1907};
- data->localData[0]->realVars[381] /* points[36]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[611])) * (data->localData[0]->realVars[699] /* points[36]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1908
- type: SIMPLE_ASSIGN
- points[36]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[36].BIP[1,2,1], T[36])
- */
-void Graph_eqFunction_1908(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1908};
- data->localData[0]->realVars[697] /* points[36]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[606],data->localData[0]->realVars[235] /* T[36] variable */,"T[36]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1909
- type: SIMPLE_ASSIGN
- points[36]._Gamma._G[1,2] = exp((-points[36].BIP[1,2,2]) * points[36].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1909(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1909};
- data->localData[0]->realVars[379] /* points[36]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[607])) * (data->localData[0]->realVars[697] /* points[36]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1910
- type: SIMPLE_ASSIGN
- points[36]._Gamma._sum2[2] = 0.8974358974358975 * points[36].Gamma.tau[1,2] * points[36].Gamma.G[1,2] + 0.1025641025641025 * points[36].Gamma.tau[2,2] * points[36].Gamma.G[2,2]
- */
-void Graph_eqFunction_1910(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1910};
- data->localData[0]->realVars[547] /* points[36]._Gamma._sum2[2] variable */ = (0.8974358974358975) * ((data->localData[0]->realVars[697] /* points[36]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[379] /* points[36]._Gamma._G[1,2] variable */)) + (0.1025641025641025) * ((data->localData[0]->realVars[699] /* points[36]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[381] /* points[36]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1911
- type: SIMPLE_ASSIGN
- points[36]._Gamma._G[1,1] = exp((-points[36].BIP[1,1,2]) * points[36].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1911(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1911};
- data->localData[0]->realVars[378] /* points[36]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[605])) * (data->localData[0]->realVars[696] /* points[36]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1912
- type: SIMPLE_ASSIGN
- points[36]._Gamma._sum2[1] = 0.8974358974358975 * points[36].Gamma.tau[1,1] * points[36].Gamma.G[1,1] + 0.1025641025641025 * points[36].Gamma.tau[2,1] * points[36].Gamma.G[2,1]
- */
-void Graph_eqFunction_1912(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1912};
- data->localData[0]->realVars[546] /* points[36]._Gamma._sum2[1] variable */ = (0.8974358974358975) * ((data->localData[0]->realVars[696] /* points[36]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[378] /* points[36]._Gamma._G[1,1] variable */)) + (0.1025641025641025) * ((data->localData[0]->realVars[698] /* points[36]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[380] /* points[36]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1913
- type: SIMPLE_ASSIGN
- points[36]._Gamma._sum1[1] = 0.8974358974358975 * points[36].Gamma.G[1,1] + 0.1025641025641025 * points[36].Gamma.G[2,1]
- */
-void Graph_eqFunction_1913(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1913};
- data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */ = (0.8974358974358975) * (data->localData[0]->realVars[378] /* points[36]._Gamma._G[1,1] variable */) + (0.1025641025641025) * (data->localData[0]->realVars[380] /* points[36]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1914
- type: SIMPLE_ASSIGN
- points[36]._Gamma._sum1[2] = 0.8974358974358975 * points[36].Gamma.G[1,2] + 0.1025641025641025 * points[36].Gamma.G[2,2]
- */
-void Graph_eqFunction_1914(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1914};
- data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */ = (0.8974358974358975) * (data->localData[0]->realVars[379] /* points[36]._Gamma._G[1,2] variable */) + (0.1025641025641025) * (data->localData[0]->realVars[381] /* points[36]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1915
- type: SIMPLE_ASSIGN
- $cse142 = DIVISION(points[36].Gamma.sum2[2], points[36].Gamma.sum1[2]) + 0.8974358974358975 * points[36].Gamma.G[2,1] * DIVISION(points[36].Gamma.tau[2,1] - DIVISION(points[36].Gamma.sum2[1], points[36].Gamma.sum1[1]), points[36].Gamma.sum1[1]) + 0.1025641025641025 * points[36].Gamma.G[2,2] * DIVISION(points[36].Gamma.tau[2,2] - DIVISION(points[36].Gamma.sum2[2], points[36].Gamma.sum1[2]), points[36].Gamma.sum1[2])
- */
-void Graph_eqFunction_1915(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1915};
- data->localData[0]->realVars[48] /* $cse142 variable */ = DIVISION_SIM(data->localData[0]->realVars[547] /* points[36]._Gamma._sum2[2] variable */,data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes) + (0.8974358974358975) * ((data->localData[0]->realVars[380] /* points[36]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[698] /* points[36]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[546] /* points[36]._Gamma._sum2[1] variable */,data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes))) + (0.1025641025641025) * ((data->localData[0]->realVars[381] /* points[36]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[699] /* points[36]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[547] /* points[36]._Gamma._sum2[2] variable */,data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1916
- type: SIMPLE_ASSIGN
- $cse141 = DIVISION(points[36].Gamma.sum2[1], points[36].Gamma.sum1[1]) + 0.8974358974358975 * points[36].Gamma.G[1,1] * DIVISION(points[36].Gamma.tau[1,1] - DIVISION(points[36].Gamma.sum2[1], points[36].Gamma.sum1[1]), points[36].Gamma.sum1[1]) + 0.1025641025641025 * points[36].Gamma.G[1,2] * DIVISION(points[36].Gamma.tau[1,2] - DIVISION(points[36].Gamma.sum2[2], points[36].Gamma.sum1[2]), points[36].Gamma.sum1[2])
- */
-void Graph_eqFunction_1916(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1916};
- data->localData[0]->realVars[47] /* $cse141 variable */ = DIVISION_SIM(data->localData[0]->realVars[546] /* points[36]._Gamma._sum2[1] variable */,data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes) + (0.8974358974358975) * ((data->localData[0]->realVars[378] /* points[36]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[696] /* points[36]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[546] /* points[36]._Gamma._sum2[1] variable */,data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[466] /* points[36]._Gamma._sum1[1] variable */,"points[36].Gamma.sum1[1]",equationIndexes))) + (0.1025641025641025) * ((data->localData[0]->realVars[379] /* points[36]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[697] /* points[36]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[547] /* points[36]._Gamma._sum2[2] variable */,data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[467] /* points[36]._Gamma._sum1[2] variable */,"points[36].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1917
- type: SIMPLE_ASSIGN
- points[36]._gamma[2] = exp($cse142)
- */
-void Graph_eqFunction_1917(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1917};
- data->localData[0]->realVars[945] /* points[36]._gamma[2] variable */ = exp(data->localData[0]->realVars[48] /* $cse142 variable */);
- TRACE_POP
-}
-/*
- equation index: 1918
- type: SIMPLE_ASSIGN
- points[36]._K[2] = 0.0001 * points[36].gamma[2] * $cse144
- */
-void Graph_eqFunction_1918(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1918};
- data->localData[0]->realVars[786] /* points[36]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[945] /* points[36]._gamma[2] variable */) * (data->localData[0]->realVars[50] /* $cse144 variable */));
- TRACE_POP
-}
-/*
- equation index: 1919
- type: SIMPLE_ASSIGN
- points[36]._K[1] = -0.1142857142857142 * points[36].K[2] - -1.114285714285714
- */
-void Graph_eqFunction_1919(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1919};
- data->localData[0]->realVars[785] /* points[36]._K[1] variable */ = (-0.1142857142857142) * (data->localData[0]->realVars[786] /* points[36]._K[2] variable */) - (-1.114285714285714);
- TRACE_POP
-}
-/*
- equation index: 1920
- type: SIMPLE_ASSIGN
- points[36]._gamma[1] = exp($cse141)
- */
-void Graph_eqFunction_1920(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1920};
- data->localData[0]->realVars[944] /* points[36]._gamma[1] variable */ = exp(data->localData[0]->realVars[47] /* $cse141 variable */);
- TRACE_POP
-}
-
-void residualFunc1922(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1922};
- /* iteration variables */
- data->localData[0]->realVars[235] /* T[36] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1901(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1902(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1903(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1904(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1905(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1906(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1907(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1908(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1909(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1910(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1911(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1912(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1913(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1914(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1915(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1916(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1917(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1918(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1919(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1920(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[944] /* points[36]._gamma[1] variable */) * (data->localData[0]->realVars[49] /* $cse143 variable */)) - data->localData[0]->realVars[785] /* points[36]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1922(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1922(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[36] */
- sysData->nominal[i] = data->modelData->realVarsData[235].attribute /* T[36] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[235].attribute /* T[36] */.min;
- sysData->max[i++] = data->modelData->realVarsData[235].attribute /* T[36] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1922(sysData);
-}
-
-void getIterationVarsNLS1922(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[235] /* T[36] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1927
- type: SIMPLE_ASSIGN
- $cse147 = Simulator.Files.ThermodynamicFunctions.Psat({points[37].comp[1].VP[1], points[37].comp[1].VP[2], points[37].comp[1].VP[3], points[37].comp[1].VP[4], points[37].comp[1].VP[5], points[37].comp[1].VP[6]}, T[37])
- */
-void Graph_eqFunction_1927(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1927};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11716], (modelica_real)data->simulationInfo->realParameter[11717], (modelica_real)data->simulationInfo->realParameter[11718], (modelica_real)data->simulationInfo->realParameter[11719], (modelica_real)data->simulationInfo->realParameter[11720], (modelica_real)data->simulationInfo->realParameter[11721]);
- data->localData[0]->realVars[53] /* $cse147 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[236] /* T[37] variable */);
- TRACE_POP
-}
-/*
- equation index: 1928
- type: SIMPLE_ASSIGN
- $cse148 = Simulator.Files.ThermodynamicFunctions.Psat({points[37].comp[2].VP[1], points[37].comp[2].VP[2], points[37].comp[2].VP[3], points[37].comp[2].VP[4], points[37].comp[2].VP[5], points[37].comp[2].VP[6]}, T[37])
- */
-void Graph_eqFunction_1928(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1928};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11722], (modelica_real)data->simulationInfo->realParameter[11723], (modelica_real)data->simulationInfo->realParameter[11724], (modelica_real)data->simulationInfo->realParameter[11725], (modelica_real)data->simulationInfo->realParameter[11726], (modelica_real)data->simulationInfo->realParameter[11727]);
- data->localData[0]->realVars[54] /* $cse148 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[236] /* T[37] variable */);
- TRACE_POP
-}
-/*
- equation index: 1929
- type: SIMPLE_ASSIGN
- points[37]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[37].BIP[1,1,1], T[37])
- */
-void Graph_eqFunction_1929(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1929};
- data->localData[0]->realVars[700] /* points[37]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[612],data->localData[0]->realVars[236] /* T[37] variable */,"T[37]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1930
- type: SIMPLE_ASSIGN
- points[37]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[37].BIP[1,2,1], T[37])
- */
-void Graph_eqFunction_1930(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1930};
- data->localData[0]->realVars[701] /* points[37]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[614],data->localData[0]->realVars[236] /* T[37] variable */,"T[37]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1931
- type: SIMPLE_ASSIGN
- points[37]._Gamma._G[1,2] = exp((-points[37].BIP[1,2,2]) * points[37].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1931(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1931};
- data->localData[0]->realVars[383] /* points[37]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[615])) * (data->localData[0]->realVars[701] /* points[37]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1932
- type: SIMPLE_ASSIGN
- points[37]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[37].BIP[2,1,1], T[37])
- */
-void Graph_eqFunction_1932(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1932};
- data->localData[0]->realVars[702] /* points[37]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[616],data->localData[0]->realVars[236] /* T[37] variable */,"T[37]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1933
- type: SIMPLE_ASSIGN
- points[37]._Gamma._G[2,1] = exp((-points[37].BIP[2,1,2]) * points[37].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1933(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1933};
- data->localData[0]->realVars[384] /* points[37]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[617])) * (data->localData[0]->realVars[702] /* points[37]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1934
- type: SIMPLE_ASSIGN
- points[37]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[37].BIP[2,2,1], T[37])
- */
-void Graph_eqFunction_1934(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1934};
- data->localData[0]->realVars[703] /* points[37]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[618],data->localData[0]->realVars[236] /* T[37] variable */,"T[37]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1935
- type: SIMPLE_ASSIGN
- points[37]._Gamma._G[2,2] = exp((-points[37].BIP[2,2,2]) * points[37].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1935(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1935};
- data->localData[0]->realVars[385] /* points[37]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[619])) * (data->localData[0]->realVars[703] /* points[37]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1936
- type: SIMPLE_ASSIGN
- points[37]._Gamma._sum2[2] = 0.9230769230769231 * points[37].Gamma.tau[1,2] * points[37].Gamma.G[1,2] + 0.07692307692307687 * points[37].Gamma.tau[2,2] * points[37].Gamma.G[2,2]
- */
-void Graph_eqFunction_1936(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1936};
- data->localData[0]->realVars[549] /* points[37]._Gamma._sum2[2] variable */ = (0.9230769230769231) * ((data->localData[0]->realVars[701] /* points[37]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[383] /* points[37]._Gamma._G[1,2] variable */)) + (0.07692307692307687) * ((data->localData[0]->realVars[703] /* points[37]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[385] /* points[37]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1937
- type: SIMPLE_ASSIGN
- points[37]._Gamma._G[1,1] = exp((-points[37].BIP[1,1,2]) * points[37].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1937(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1937};
- data->localData[0]->realVars[382] /* points[37]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[613])) * (data->localData[0]->realVars[700] /* points[37]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1938
- type: SIMPLE_ASSIGN
- points[37]._Gamma._sum2[1] = 0.9230769230769231 * points[37].Gamma.tau[1,1] * points[37].Gamma.G[1,1] + 0.07692307692307687 * points[37].Gamma.tau[2,1] * points[37].Gamma.G[2,1]
- */
-void Graph_eqFunction_1938(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1938};
- data->localData[0]->realVars[548] /* points[37]._Gamma._sum2[1] variable */ = (0.9230769230769231) * ((data->localData[0]->realVars[700] /* points[37]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[382] /* points[37]._Gamma._G[1,1] variable */)) + (0.07692307692307687) * ((data->localData[0]->realVars[702] /* points[37]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[384] /* points[37]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1939
- type: SIMPLE_ASSIGN
- points[37]._Gamma._sum1[2] = 0.9230769230769231 * points[37].Gamma.G[1,2] + 0.07692307692307687 * points[37].Gamma.G[2,2]
- */
-void Graph_eqFunction_1939(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1939};
- data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */ = (0.9230769230769231) * (data->localData[0]->realVars[383] /* points[37]._Gamma._G[1,2] variable */) + (0.07692307692307687) * (data->localData[0]->realVars[385] /* points[37]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1940
- type: SIMPLE_ASSIGN
- points[37]._Gamma._sum1[1] = 0.9230769230769231 * points[37].Gamma.G[1,1] + 0.07692307692307687 * points[37].Gamma.G[2,1]
- */
-void Graph_eqFunction_1940(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1940};
- data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */ = (0.9230769230769231) * (data->localData[0]->realVars[382] /* points[37]._Gamma._G[1,1] variable */) + (0.07692307692307687) * (data->localData[0]->realVars[384] /* points[37]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1941
- type: SIMPLE_ASSIGN
- $cse146 = DIVISION(points[37].Gamma.sum2[2], points[37].Gamma.sum1[2]) + 0.9230769230769231 * points[37].Gamma.G[2,1] * DIVISION(points[37].Gamma.tau[2,1] - DIVISION(points[37].Gamma.sum2[1], points[37].Gamma.sum1[1]), points[37].Gamma.sum1[1]) + 0.07692307692307687 * points[37].Gamma.G[2,2] * DIVISION(points[37].Gamma.tau[2,2] - DIVISION(points[37].Gamma.sum2[2], points[37].Gamma.sum1[2]), points[37].Gamma.sum1[2])
- */
-void Graph_eqFunction_1941(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1941};
- data->localData[0]->realVars[52] /* $cse146 variable */ = DIVISION_SIM(data->localData[0]->realVars[549] /* points[37]._Gamma._sum2[2] variable */,data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes) + (0.9230769230769231) * ((data->localData[0]->realVars[384] /* points[37]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[702] /* points[37]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[548] /* points[37]._Gamma._sum2[1] variable */,data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes))) + (0.07692307692307687) * ((data->localData[0]->realVars[385] /* points[37]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[703] /* points[37]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[549] /* points[37]._Gamma._sum2[2] variable */,data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1942
- type: SIMPLE_ASSIGN
- $cse145 = DIVISION(points[37].Gamma.sum2[1], points[37].Gamma.sum1[1]) + 0.9230769230769231 * points[37].Gamma.G[1,1] * DIVISION(points[37].Gamma.tau[1,1] - DIVISION(points[37].Gamma.sum2[1], points[37].Gamma.sum1[1]), points[37].Gamma.sum1[1]) + 0.07692307692307687 * points[37].Gamma.G[1,2] * DIVISION(points[37].Gamma.tau[1,2] - DIVISION(points[37].Gamma.sum2[2], points[37].Gamma.sum1[2]), points[37].Gamma.sum1[2])
- */
-void Graph_eqFunction_1942(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1942};
- data->localData[0]->realVars[51] /* $cse145 variable */ = DIVISION_SIM(data->localData[0]->realVars[548] /* points[37]._Gamma._sum2[1] variable */,data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes) + (0.9230769230769231) * ((data->localData[0]->realVars[382] /* points[37]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[700] /* points[37]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[548] /* points[37]._Gamma._sum2[1] variable */,data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[468] /* points[37]._Gamma._sum1[1] variable */,"points[37].Gamma.sum1[1]",equationIndexes))) + (0.07692307692307687) * ((data->localData[0]->realVars[383] /* points[37]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[701] /* points[37]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[549] /* points[37]._Gamma._sum2[2] variable */,data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[469] /* points[37]._Gamma._sum1[2] variable */,"points[37].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1943
- type: SIMPLE_ASSIGN
- points[37]._gamma[2] = exp($cse146)
- */
-void Graph_eqFunction_1943(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1943};
- data->localData[0]->realVars[947] /* points[37]._gamma[2] variable */ = exp(data->localData[0]->realVars[52] /* $cse146 variable */);
- TRACE_POP
-}
-/*
- equation index: 1944
- type: SIMPLE_ASSIGN
- points[37]._K[2] = 0.0001 * points[37].gamma[2] * $cse148
- */
-void Graph_eqFunction_1944(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1944};
- data->localData[0]->realVars[788] /* points[37]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[947] /* points[37]._gamma[2] variable */) * (data->localData[0]->realVars[54] /* $cse148 variable */));
- TRACE_POP
-}
-/*
- equation index: 1945
- type: SIMPLE_ASSIGN
- points[37]._K[1] = -0.08333333333333327 * points[37].K[2] - -1.083333333333333
- */
-void Graph_eqFunction_1945(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1945};
- data->localData[0]->realVars[787] /* points[37]._K[1] variable */ = (-0.08333333333333327) * (data->localData[0]->realVars[788] /* points[37]._K[2] variable */) - (-1.083333333333333);
- TRACE_POP
-}
-/*
- equation index: 1946
- type: SIMPLE_ASSIGN
- points[37]._gamma[1] = exp($cse145)
- */
-void Graph_eqFunction_1946(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1946};
- data->localData[0]->realVars[946] /* points[37]._gamma[1] variable */ = exp(data->localData[0]->realVars[51] /* $cse145 variable */);
- TRACE_POP
-}
-
-void residualFunc1948(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1948};
- /* iteration variables */
- data->localData[0]->realVars[236] /* T[37] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1927(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1928(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1929(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1930(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1931(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1932(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1933(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1934(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1935(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1936(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1937(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1938(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1939(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1940(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1941(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1942(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1943(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1944(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1945(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1946(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[946] /* points[37]._gamma[1] variable */) * (data->localData[0]->realVars[53] /* $cse147 variable */)) - data->localData[0]->realVars[787] /* points[37]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1948(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1948(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[37] */
- sysData->nominal[i] = data->modelData->realVarsData[236].attribute /* T[37] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[236].attribute /* T[37] */.min;
- sysData->max[i++] = data->modelData->realVarsData[236].attribute /* T[37] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1948(sysData);
-}
-
-void getIterationVarsNLS1948(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[236] /* T[37] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1953
- type: SIMPLE_ASSIGN
- $cse152 = Simulator.Files.ThermodynamicFunctions.Psat({points[38].comp[2].VP[1], points[38].comp[2].VP[2], points[38].comp[2].VP[3], points[38].comp[2].VP[4], points[38].comp[2].VP[5], points[38].comp[2].VP[6]}, T[38])
- */
-void Graph_eqFunction_1953(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1953};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11734], (modelica_real)data->simulationInfo->realParameter[11735], (modelica_real)data->simulationInfo->realParameter[11736], (modelica_real)data->simulationInfo->realParameter[11737], (modelica_real)data->simulationInfo->realParameter[11738], (modelica_real)data->simulationInfo->realParameter[11739]);
- data->localData[0]->realVars[59] /* $cse152 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[237] /* T[38] variable */);
- TRACE_POP
-}
-/*
- equation index: 1954
- type: SIMPLE_ASSIGN
- $cse151 = Simulator.Files.ThermodynamicFunctions.Psat({points[38].comp[1].VP[1], points[38].comp[1].VP[2], points[38].comp[1].VP[3], points[38].comp[1].VP[4], points[38].comp[1].VP[5], points[38].comp[1].VP[6]}, T[38])
- */
-void Graph_eqFunction_1954(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1954};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11728], (modelica_real)data->simulationInfo->realParameter[11729], (modelica_real)data->simulationInfo->realParameter[11730], (modelica_real)data->simulationInfo->realParameter[11731], (modelica_real)data->simulationInfo->realParameter[11732], (modelica_real)data->simulationInfo->realParameter[11733]);
- data->localData[0]->realVars[58] /* $cse151 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[237] /* T[38] variable */);
- TRACE_POP
-}
-/*
- equation index: 1955
- type: SIMPLE_ASSIGN
- points[38]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[38].BIP[1,1,1], T[38])
- */
-void Graph_eqFunction_1955(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1955};
- data->localData[0]->realVars[704] /* points[38]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[620],data->localData[0]->realVars[237] /* T[38] variable */,"T[38]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1956
- type: SIMPLE_ASSIGN
- points[38]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[38].BIP[2,1,1], T[38])
- */
-void Graph_eqFunction_1956(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1956};
- data->localData[0]->realVars[706] /* points[38]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[624],data->localData[0]->realVars[237] /* T[38] variable */,"T[38]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1957
- type: SIMPLE_ASSIGN
- points[38]._Gamma._G[1,1] = exp((-points[38].BIP[1,1,2]) * points[38].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1957(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1957};
- data->localData[0]->realVars[386] /* points[38]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[621])) * (data->localData[0]->realVars[704] /* points[38]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1958
- type: SIMPLE_ASSIGN
- points[38]._Gamma._G[2,1] = exp((-points[38].BIP[2,1,2]) * points[38].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1958(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1958};
- data->localData[0]->realVars[388] /* points[38]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[625])) * (data->localData[0]->realVars[706] /* points[38]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1959
- type: SIMPLE_ASSIGN
- points[38]._Gamma._sum2[1] = 0.9487179487179487 * points[38].Gamma.tau[1,1] * points[38].Gamma.G[1,1] + 0.05128205128205132 * points[38].Gamma.tau[2,1] * points[38].Gamma.G[2,1]
- */
-void Graph_eqFunction_1959(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1959};
- data->localData[0]->realVars[550] /* points[38]._Gamma._sum2[1] variable */ = (0.9487179487179487) * ((data->localData[0]->realVars[704] /* points[38]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[386] /* points[38]._Gamma._G[1,1] variable */)) + (0.05128205128205132) * ((data->localData[0]->realVars[706] /* points[38]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[388] /* points[38]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1960
- type: SIMPLE_ASSIGN
- points[38]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[38].BIP[2,2,1], T[38])
- */
-void Graph_eqFunction_1960(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1960};
- data->localData[0]->realVars[707] /* points[38]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[626],data->localData[0]->realVars[237] /* T[38] variable */,"T[38]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1961
- type: SIMPLE_ASSIGN
- points[38]._Gamma._G[2,2] = exp((-points[38].BIP[2,2,2]) * points[38].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1961(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1961};
- data->localData[0]->realVars[389] /* points[38]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[627])) * (data->localData[0]->realVars[707] /* points[38]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1962
- type: SIMPLE_ASSIGN
- points[38]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[38].BIP[1,2,1], T[38])
- */
-void Graph_eqFunction_1962(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1962};
- data->localData[0]->realVars[705] /* points[38]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[622],data->localData[0]->realVars[237] /* T[38] variable */,"T[38]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1963
- type: SIMPLE_ASSIGN
- points[38]._Gamma._G[1,2] = exp((-points[38].BIP[1,2,2]) * points[38].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1963(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1963};
- data->localData[0]->realVars[387] /* points[38]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[623])) * (data->localData[0]->realVars[705] /* points[38]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1964
- type: SIMPLE_ASSIGN
- points[38]._Gamma._sum2[2] = 0.9487179487179487 * points[38].Gamma.tau[1,2] * points[38].Gamma.G[1,2] + 0.05128205128205132 * points[38].Gamma.tau[2,2] * points[38].Gamma.G[2,2]
- */
-void Graph_eqFunction_1964(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1964};
- data->localData[0]->realVars[551] /* points[38]._Gamma._sum2[2] variable */ = (0.9487179487179487) * ((data->localData[0]->realVars[705] /* points[38]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[387] /* points[38]._Gamma._G[1,2] variable */)) + (0.05128205128205132) * ((data->localData[0]->realVars[707] /* points[38]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[389] /* points[38]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1965
- type: SIMPLE_ASSIGN
- points[38]._Gamma._sum1[1] = 0.9487179487179487 * points[38].Gamma.G[1,1] + 0.05128205128205132 * points[38].Gamma.G[2,1]
- */
-void Graph_eqFunction_1965(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1965};
- data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */ = (0.9487179487179487) * (data->localData[0]->realVars[386] /* points[38]._Gamma._G[1,1] variable */) + (0.05128205128205132) * (data->localData[0]->realVars[388] /* points[38]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1966
- type: SIMPLE_ASSIGN
- points[38]._Gamma._sum1[2] = 0.9487179487179487 * points[38].Gamma.G[1,2] + 0.05128205128205132 * points[38].Gamma.G[2,2]
- */
-void Graph_eqFunction_1966(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1966};
- data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */ = (0.9487179487179487) * (data->localData[0]->realVars[387] /* points[38]._Gamma._G[1,2] variable */) + (0.05128205128205132) * (data->localData[0]->realVars[389] /* points[38]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1967
- type: SIMPLE_ASSIGN
- $cse150 = DIVISION(points[38].Gamma.sum2[2], points[38].Gamma.sum1[2]) + 0.9487179487179487 * points[38].Gamma.G[2,1] * DIVISION(points[38].Gamma.tau[2,1] - DIVISION(points[38].Gamma.sum2[1], points[38].Gamma.sum1[1]), points[38].Gamma.sum1[1]) + 0.05128205128205132 * points[38].Gamma.G[2,2] * DIVISION(points[38].Gamma.tau[2,2] - DIVISION(points[38].Gamma.sum2[2], points[38].Gamma.sum1[2]), points[38].Gamma.sum1[2])
- */
-void Graph_eqFunction_1967(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1967};
- data->localData[0]->realVars[57] /* $cse150 variable */ = DIVISION_SIM(data->localData[0]->realVars[551] /* points[38]._Gamma._sum2[2] variable */,data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes) + (0.9487179487179487) * ((data->localData[0]->realVars[388] /* points[38]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[706] /* points[38]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[550] /* points[38]._Gamma._sum2[1] variable */,data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes))) + (0.05128205128205132) * ((data->localData[0]->realVars[389] /* points[38]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[707] /* points[38]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[551] /* points[38]._Gamma._sum2[2] variable */,data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1968
- type: SIMPLE_ASSIGN
- $cse149 = DIVISION(points[38].Gamma.sum2[1], points[38].Gamma.sum1[1]) + 0.9487179487179487 * points[38].Gamma.G[1,1] * DIVISION(points[38].Gamma.tau[1,1] - DIVISION(points[38].Gamma.sum2[1], points[38].Gamma.sum1[1]), points[38].Gamma.sum1[1]) + 0.05128205128205132 * points[38].Gamma.G[1,2] * DIVISION(points[38].Gamma.tau[1,2] - DIVISION(points[38].Gamma.sum2[2], points[38].Gamma.sum1[2]), points[38].Gamma.sum1[2])
- */
-void Graph_eqFunction_1968(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1968};
- data->localData[0]->realVars[55] /* $cse149 variable */ = DIVISION_SIM(data->localData[0]->realVars[550] /* points[38]._Gamma._sum2[1] variable */,data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes) + (0.9487179487179487) * ((data->localData[0]->realVars[386] /* points[38]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[704] /* points[38]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[550] /* points[38]._Gamma._sum2[1] variable */,data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[470] /* points[38]._Gamma._sum1[1] variable */,"points[38].Gamma.sum1[1]",equationIndexes))) + (0.05128205128205132) * ((data->localData[0]->realVars[387] /* points[38]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[705] /* points[38]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[551] /* points[38]._Gamma._sum2[2] variable */,data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[471] /* points[38]._Gamma._sum1[2] variable */,"points[38].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1969
- type: SIMPLE_ASSIGN
- points[38]._gamma[2] = exp($cse150)
- */
-void Graph_eqFunction_1969(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1969};
- data->localData[0]->realVars[949] /* points[38]._gamma[2] variable */ = exp(data->localData[0]->realVars[57] /* $cse150 variable */);
- TRACE_POP
-}
-/*
- equation index: 1970
- type: SIMPLE_ASSIGN
- points[38]._K[2] = 0.0001 * points[38].gamma[2] * $cse152
- */
-void Graph_eqFunction_1970(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1970};
- data->localData[0]->realVars[790] /* points[38]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[949] /* points[38]._gamma[2] variable */) * (data->localData[0]->realVars[59] /* $cse152 variable */));
- TRACE_POP
-}
-/*
- equation index: 1971
- type: SIMPLE_ASSIGN
- points[38]._K[1] = -0.0540540540540541 * points[38].K[2] - -1.054054054054054
- */
-void Graph_eqFunction_1971(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1971};
- data->localData[0]->realVars[789] /* points[38]._K[1] variable */ = (-0.0540540540540541) * (data->localData[0]->realVars[790] /* points[38]._K[2] variable */) - (-1.054054054054054);
- TRACE_POP
-}
-/*
- equation index: 1972
- type: SIMPLE_ASSIGN
- points[38]._gamma[1] = exp($cse149)
- */
-void Graph_eqFunction_1972(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1972};
- data->localData[0]->realVars[948] /* points[38]._gamma[1] variable */ = exp(data->localData[0]->realVars[55] /* $cse149 variable */);
- TRACE_POP
-}
-
-void residualFunc1974(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,1974};
- /* iteration variables */
- data->localData[0]->realVars[237] /* T[38] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1953(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1954(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1955(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1956(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1957(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1958(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1959(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1960(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1961(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1962(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1963(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1964(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1965(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1966(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1967(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1968(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1969(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1970(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1971(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1972(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[948] /* points[38]._gamma[1] variable */) * (data->localData[0]->realVars[58] /* $cse151 variable */)) - data->localData[0]->realVars[789] /* points[38]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS1974(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS1974(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[38] */
- sysData->nominal[i] = data->modelData->realVarsData[237].attribute /* T[38] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[237].attribute /* T[38] */.min;
- sysData->max[i++] = data->modelData->realVarsData[237].attribute /* T[38] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS1974(sysData);
-}
-
-void getIterationVarsNLS1974(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[237] /* T[38] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 1979
- type: SIMPLE_ASSIGN
- $cse155 = Simulator.Files.ThermodynamicFunctions.Psat({points[39].comp[1].VP[1], points[39].comp[1].VP[2], points[39].comp[1].VP[3], points[39].comp[1].VP[4], points[39].comp[1].VP[5], points[39].comp[1].VP[6]}, T[39])
- */
-void Graph_eqFunction_1979(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1979};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11740], (modelica_real)data->simulationInfo->realParameter[11741], (modelica_real)data->simulationInfo->realParameter[11742], (modelica_real)data->simulationInfo->realParameter[11743], (modelica_real)data->simulationInfo->realParameter[11744], (modelica_real)data->simulationInfo->realParameter[11745]);
- data->localData[0]->realVars[62] /* $cse155 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[238] /* T[39] variable */);
- TRACE_POP
-}
-/*
- equation index: 1980
- type: SIMPLE_ASSIGN
- $cse156 = Simulator.Files.ThermodynamicFunctions.Psat({points[39].comp[2].VP[1], points[39].comp[2].VP[2], points[39].comp[2].VP[3], points[39].comp[2].VP[4], points[39].comp[2].VP[5], points[39].comp[2].VP[6]}, T[39])
- */
-void Graph_eqFunction_1980(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1980};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11746], (modelica_real)data->simulationInfo->realParameter[11747], (modelica_real)data->simulationInfo->realParameter[11748], (modelica_real)data->simulationInfo->realParameter[11749], (modelica_real)data->simulationInfo->realParameter[11750], (modelica_real)data->simulationInfo->realParameter[11751]);
- data->localData[0]->realVars[63] /* $cse156 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[238] /* T[39] variable */);
- TRACE_POP
-}
-/*
- equation index: 1981
- type: SIMPLE_ASSIGN
- points[39]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[39].BIP[1,1,1], T[39])
- */
-void Graph_eqFunction_1981(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1981};
- data->localData[0]->realVars[708] /* points[39]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[628],data->localData[0]->realVars[238] /* T[39] variable */,"T[39]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1982
- type: SIMPLE_ASSIGN
- points[39]._Gamma._tau[2,2] = 0.5032180796191645 * DIVISION(points[39].BIP[2,2,1], T[39])
- */
-void Graph_eqFunction_1982(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1982};
- data->localData[0]->realVars[711] /* points[39]._Gamma._tau[2,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[634],data->localData[0]->realVars[238] /* T[39] variable */,"T[39]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1983
- type: SIMPLE_ASSIGN
- points[39]._Gamma._G[2,2] = exp((-points[39].BIP[2,2,2]) * points[39].Gamma.tau[2,2])
- */
-void Graph_eqFunction_1983(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1983};
- data->localData[0]->realVars[393] /* points[39]._Gamma._G[2,2] variable */ = exp(((-data->simulationInfo->realParameter[635])) * (data->localData[0]->realVars[711] /* points[39]._Gamma._tau[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1984
- type: SIMPLE_ASSIGN
- points[39]._Gamma._tau[1,2] = 0.5032180796191645 * DIVISION(points[39].BIP[1,2,1], T[39])
- */
-void Graph_eqFunction_1984(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1984};
- data->localData[0]->realVars[709] /* points[39]._Gamma._tau[1,2] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[630],data->localData[0]->realVars[238] /* T[39] variable */,"T[39]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1985
- type: SIMPLE_ASSIGN
- points[39]._Gamma._G[1,2] = exp((-points[39].BIP[1,2,2]) * points[39].Gamma.tau[1,2])
- */
-void Graph_eqFunction_1985(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1985};
- data->localData[0]->realVars[391] /* points[39]._Gamma._G[1,2] variable */ = exp(((-data->simulationInfo->realParameter[631])) * (data->localData[0]->realVars[709] /* points[39]._Gamma._tau[1,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1986
- type: SIMPLE_ASSIGN
- points[39]._Gamma._sum2[2] = 0.9743589743589743 * points[39].Gamma.tau[1,2] * points[39].Gamma.G[1,2] + 0.02564102564102566 * points[39].Gamma.tau[2,2] * points[39].Gamma.G[2,2]
- */
-void Graph_eqFunction_1986(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1986};
- data->localData[0]->realVars[553] /* points[39]._Gamma._sum2[2] variable */ = (0.9743589743589743) * ((data->localData[0]->realVars[709] /* points[39]._Gamma._tau[1,2] variable */) * (data->localData[0]->realVars[391] /* points[39]._Gamma._G[1,2] variable */)) + (0.02564102564102566) * ((data->localData[0]->realVars[711] /* points[39]._Gamma._tau[2,2] variable */) * (data->localData[0]->realVars[393] /* points[39]._Gamma._G[2,2] variable */));
- TRACE_POP
-}
-/*
- equation index: 1987
- type: SIMPLE_ASSIGN
- points[39]._Gamma._tau[2,1] = 0.5032180796191645 * DIVISION(points[39].BIP[2,1,1], T[39])
- */
-void Graph_eqFunction_1987(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1987};
- data->localData[0]->realVars[710] /* points[39]._Gamma._tau[2,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[632],data->localData[0]->realVars[238] /* T[39] variable */,"T[39]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 1988
- type: SIMPLE_ASSIGN
- points[39]._Gamma._G[2,1] = exp((-points[39].BIP[2,1,2]) * points[39].Gamma.tau[2,1])
- */
-void Graph_eqFunction_1988(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1988};
- data->localData[0]->realVars[392] /* points[39]._Gamma._G[2,1] variable */ = exp(((-data->simulationInfo->realParameter[633])) * (data->localData[0]->realVars[710] /* points[39]._Gamma._tau[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1989
- type: SIMPLE_ASSIGN
- points[39]._Gamma._G[1,1] = exp((-points[39].BIP[1,1,2]) * points[39].Gamma.tau[1,1])
- */
-void Graph_eqFunction_1989(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1989};
- data->localData[0]->realVars[390] /* points[39]._Gamma._G[1,1] variable */ = exp(((-data->simulationInfo->realParameter[629])) * (data->localData[0]->realVars[708] /* points[39]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1990
- type: SIMPLE_ASSIGN
- points[39]._Gamma._sum2[1] = 0.9743589743589743 * points[39].Gamma.tau[1,1] * points[39].Gamma.G[1,1] + 0.02564102564102566 * points[39].Gamma.tau[2,1] * points[39].Gamma.G[2,1]
- */
-void Graph_eqFunction_1990(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1990};
- data->localData[0]->realVars[552] /* points[39]._Gamma._sum2[1] variable */ = (0.9743589743589743) * ((data->localData[0]->realVars[708] /* points[39]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[390] /* points[39]._Gamma._G[1,1] variable */)) + (0.02564102564102566) * ((data->localData[0]->realVars[710] /* points[39]._Gamma._tau[2,1] variable */) * (data->localData[0]->realVars[392] /* points[39]._Gamma._G[2,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 1991
- type: SIMPLE_ASSIGN
- points[39]._Gamma._sum1[2] = 0.9743589743589743 * points[39].Gamma.G[1,2] + 0.02564102564102566 * points[39].Gamma.G[2,2]
- */
-void Graph_eqFunction_1991(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1991};
- data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */ = (0.9743589743589743) * (data->localData[0]->realVars[391] /* points[39]._Gamma._G[1,2] variable */) + (0.02564102564102566) * (data->localData[0]->realVars[393] /* points[39]._Gamma._G[2,2] variable */);
- TRACE_POP
-}
-/*
- equation index: 1992
- type: SIMPLE_ASSIGN
- points[39]._Gamma._sum1[1] = 0.9743589743589743 * points[39].Gamma.G[1,1] + 0.02564102564102566 * points[39].Gamma.G[2,1]
- */
-void Graph_eqFunction_1992(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1992};
- data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */ = (0.9743589743589743) * (data->localData[0]->realVars[390] /* points[39]._Gamma._G[1,1] variable */) + (0.02564102564102566) * (data->localData[0]->realVars[392] /* points[39]._Gamma._G[2,1] variable */);
- TRACE_POP
-}
-/*
- equation index: 1993
- type: SIMPLE_ASSIGN
- $cse154 = DIVISION(points[39].Gamma.sum2[2], points[39].Gamma.sum1[2]) + 0.9743589743589743 * points[39].Gamma.G[2,1] * DIVISION(points[39].Gamma.tau[2,1] - DIVISION(points[39].Gamma.sum2[1], points[39].Gamma.sum1[1]), points[39].Gamma.sum1[1]) + 0.02564102564102566 * points[39].Gamma.G[2,2] * DIVISION(points[39].Gamma.tau[2,2] - DIVISION(points[39].Gamma.sum2[2], points[39].Gamma.sum1[2]), points[39].Gamma.sum1[2])
- */
-void Graph_eqFunction_1993(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1993};
- data->localData[0]->realVars[61] /* $cse154 variable */ = DIVISION_SIM(data->localData[0]->realVars[553] /* points[39]._Gamma._sum2[2] variable */,data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes) + (0.9743589743589743) * ((data->localData[0]->realVars[392] /* points[39]._Gamma._G[2,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[710] /* points[39]._Gamma._tau[2,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[552] /* points[39]._Gamma._sum2[1] variable */,data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes))) + (0.02564102564102566) * ((data->localData[0]->realVars[393] /* points[39]._Gamma._G[2,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[711] /* points[39]._Gamma._tau[2,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[553] /* points[39]._Gamma._sum2[2] variable */,data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1994
- type: SIMPLE_ASSIGN
- $cse153 = DIVISION(points[39].Gamma.sum2[1], points[39].Gamma.sum1[1]) + 0.9743589743589743 * points[39].Gamma.G[1,1] * DIVISION(points[39].Gamma.tau[1,1] - DIVISION(points[39].Gamma.sum2[1], points[39].Gamma.sum1[1]), points[39].Gamma.sum1[1]) + 0.02564102564102566 * points[39].Gamma.G[1,2] * DIVISION(points[39].Gamma.tau[1,2] - DIVISION(points[39].Gamma.sum2[2], points[39].Gamma.sum1[2]), points[39].Gamma.sum1[2])
- */
-void Graph_eqFunction_1994(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1994};
- data->localData[0]->realVars[60] /* $cse153 variable */ = DIVISION_SIM(data->localData[0]->realVars[552] /* points[39]._Gamma._sum2[1] variable */,data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes) + (0.9743589743589743) * ((data->localData[0]->realVars[390] /* points[39]._Gamma._G[1,1] variable */) * (DIVISION_SIM(data->localData[0]->realVars[708] /* points[39]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[552] /* points[39]._Gamma._sum2[1] variable */,data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes),data->localData[0]->realVars[472] /* points[39]._Gamma._sum1[1] variable */,"points[39].Gamma.sum1[1]",equationIndexes))) + (0.02564102564102566) * ((data->localData[0]->realVars[391] /* points[39]._Gamma._G[1,2] variable */) * (DIVISION_SIM(data->localData[0]->realVars[709] /* points[39]._Gamma._tau[1,2] variable */ - DIVISION_SIM(data->localData[0]->realVars[553] /* points[39]._Gamma._sum2[2] variable */,data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes),data->localData[0]->realVars[473] /* points[39]._Gamma._sum1[2] variable */,"points[39].Gamma.sum1[2]",equationIndexes)));
- TRACE_POP
-}
-/*
- equation index: 1995
- type: SIMPLE_ASSIGN
- points[39]._gamma[2] = exp($cse154)
- */
-void Graph_eqFunction_1995(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1995};
- data->localData[0]->realVars[951] /* points[39]._gamma[2] variable */ = exp(data->localData[0]->realVars[61] /* $cse154 variable */);
- TRACE_POP
-}
-/*
- equation index: 1996
- type: SIMPLE_ASSIGN
- points[39]._K[2] = 0.0001 * points[39].gamma[2] * $cse156
- */
-void Graph_eqFunction_1996(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1996};
- data->localData[0]->realVars[792] /* points[39]._K[2] variable */ = (0.0001) * ((data->localData[0]->realVars[951] /* points[39]._gamma[2] variable */) * (data->localData[0]->realVars[63] /* $cse156 variable */));
- TRACE_POP
-}
-/*
- equation index: 1997
- type: SIMPLE_ASSIGN
- points[39]._K[1] = -0.02631578947368423 * points[39].K[2] - -1.026315789473684
- */
-void Graph_eqFunction_1997(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1997};
- data->localData[0]->realVars[791] /* points[39]._K[1] variable */ = (-0.02631578947368423) * (data->localData[0]->realVars[792] /* points[39]._K[2] variable */) - (-1.026315789473684);
- TRACE_POP
-}
-/*
- equation index: 1998
- type: SIMPLE_ASSIGN
- points[39]._gamma[1] = exp($cse153)
- */
-void Graph_eqFunction_1998(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,1998};
- data->localData[0]->realVars[950] /* points[39]._gamma[1] variable */ = exp(data->localData[0]->realVars[60] /* $cse153 variable */);
- TRACE_POP
-}
-
-void residualFunc2000(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,2000};
- /* iteration variables */
- data->localData[0]->realVars[238] /* T[39] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_1979(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1980(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1981(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1982(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1983(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1984(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1985(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1986(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1987(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1988(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1989(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1990(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1991(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1992(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1993(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1994(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1995(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1996(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1997(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_1998(data, threadData);
- /* body */
- res[0] = (0.0001) * ((data->localData[0]->realVars[950] /* points[39]._gamma[1] variable */) * (data->localData[0]->realVars[62] /* $cse155 variable */)) - data->localData[0]->realVars[791] /* points[39]._K[1] variable */;
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS2000(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS2000(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[39] */
- sysData->nominal[i] = data->modelData->realVarsData[238].attribute /* T[39] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[238].attribute /* T[39] */.min;
- sysData->max[i++] = data->modelData->realVarsData[238].attribute /* T[39] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS2000(sysData);
-}
-
-void getIterationVarsNLS2000(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[238] /* T[39] variable */;
-}
-
-
-/* inner equations */
-
-/*
- equation index: 2005
- type: SIMPLE_ASSIGN
- $cse159 = Simulator.Files.ThermodynamicFunctions.Psat({points[40].comp[1].VP[1], points[40].comp[1].VP[2], points[40].comp[1].VP[3], points[40].comp[1].VP[4], points[40].comp[1].VP[5], points[40].comp[1].VP[6]}, T[40])
- */
-void Graph_eqFunction_2005(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,2005};
- real_array tmp0;
- array_alloc_scalar_real_array(&tmp0, 6, (modelica_real)data->simulationInfo->realParameter[11752], (modelica_real)data->simulationInfo->realParameter[11753], (modelica_real)data->simulationInfo->realParameter[11754], (modelica_real)data->simulationInfo->realParameter[11755], (modelica_real)data->simulationInfo->realParameter[11756], (modelica_real)data->simulationInfo->realParameter[11757]);
- data->localData[0]->realVars[66] /* $cse159 variable */ = omc_Simulator_Files_ThermodynamicFunctions_Psat(threadData, tmp0, data->localData[0]->realVars[239] /* T[40] variable */);
- TRACE_POP
-}
-/*
- equation index: 2006
- type: SIMPLE_ASSIGN
- points[40]._Gamma._tau[1,1] = 0.5032180796191645 * DIVISION(points[40].BIP[1,1,1], T[40])
- */
-void Graph_eqFunction_2006(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,2006};
- data->localData[0]->realVars[712] /* points[40]._Gamma._tau[1,1] variable */ = (0.5032180796191645) * (DIVISION_SIM(data->simulationInfo->realParameter[636],data->localData[0]->realVars[239] /* T[40] variable */,"T[40]",equationIndexes));
- TRACE_POP
-}
-/*
- equation index: 2007
- type: SIMPLE_ASSIGN
- points[40]._Gamma._sum1[1] = exp((-points[40].BIP[1,1,2]) * points[40].Gamma.tau[1,1])
- */
-void Graph_eqFunction_2007(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,2007};
- data->localData[0]->realVars[474] /* points[40]._Gamma._sum1[1] variable */ = exp(((-data->simulationInfo->realParameter[637])) * (data->localData[0]->realVars[712] /* points[40]._Gamma._tau[1,1] variable */));
- TRACE_POP
-}
-/*
- equation index: 2008
- type: SIMPLE_ASSIGN
- points[40]._Gamma._sum2[1] = points[40].Gamma.tau[1,1] * points[40].Gamma.sum1[1]
- */
-void Graph_eqFunction_2008(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,2008};
- data->localData[0]->realVars[554] /* points[40]._Gamma._sum2[1] variable */ = (data->localData[0]->realVars[712] /* points[40]._Gamma._tau[1,1] variable */) * (data->localData[0]->realVars[474] /* points[40]._Gamma._sum1[1] variable */);
- TRACE_POP
-}
-/*
- equation index: 2009
- type: SIMPLE_ASSIGN
- $cse157 = DIVISION(points[40].Gamma.sum2[1], points[40].Gamma.sum1[1]) + points[40].Gamma.tau[1,1] - DIVISION(points[40].Gamma.sum2[1], points[40].Gamma.sum1[1])
- */
-void Graph_eqFunction_2009(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,2009};
- data->localData[0]->realVars[64] /* $cse157 variable */ = DIVISION_SIM(data->localData[0]->realVars[554] /* points[40]._Gamma._sum2[1] variable */,data->localData[0]->realVars[474] /* points[40]._Gamma._sum1[1] variable */,"points[40].Gamma.sum1[1]",equationIndexes) + data->localData[0]->realVars[712] /* points[40]._Gamma._tau[1,1] variable */ - DIVISION_SIM(data->localData[0]->realVars[554] /* points[40]._Gamma._sum2[1] variable */,data->localData[0]->realVars[474] /* points[40]._Gamma._sum1[1] variable */,"points[40].Gamma.sum1[1]",equationIndexes);
- TRACE_POP
-}
-/*
- equation index: 2010
- type: SIMPLE_ASSIGN
- points[40]._gamma[1] = exp($cse157)
- */
-void Graph_eqFunction_2010(DATA *data, threadData_t *threadData)
-{
- TRACE_PUSH
- const int equationIndexes[2] = {1,2010};
- data->localData[0]->realVars[952] /* points[40]._gamma[1] variable */ = exp(data->localData[0]->realVars[64] /* $cse157 variable */);
- TRACE_POP
-}
-
-void residualFunc2012(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
- TRACE_PUSH
- DATA *data = (DATA*) ((void**)dataIn[0]);
- threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
- const int equationIndexes[2] = {1,2012};
- /* iteration variables */
- data->localData[0]->realVars[239] /* T[40] variable */ = xloc[0];
- /* backup outputs */
- /* pre body */
- /* local constraints */
- Graph_eqFunction_2005(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_2006(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_2007(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_2008(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_2009(data, threadData);
-
- /* local constraints */
- Graph_eqFunction_2010(data, threadData);
- /* body */
- res[0] = 1.0 + (-0.0001) * ((data->localData[0]->realVars[952] /* points[40]._gamma[1] variable */) * (data->localData[0]->realVars[66] /* $cse159 variable */));
- /* restore known outputs */
- TRACE_POP
-}
-void initializeSparsePatternNLS2012(NONLINEAR_SYSTEM_DATA* inSysData)
-{
- int i=0;
- const int colPtrIndex[1+1] = {0,1};
- const int rowIndex[1] = {0};
- /* sparsity pattern available */
- inSysData->isPatternAvailable = 'T';
- inSysData->sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
- inSysData->sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.numberOfNoneZeros = 1;
- inSysData->sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
- inSysData->sparsePattern.maxColors = 1;
-
- /* write lead index of compressed sparse column */
- memcpy(inSysData->sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-
- for(i=2;i<1+1;++i)
- inSysData->sparsePattern.leadindex[i] += inSysData->sparsePattern.leadindex[i-1];
-
- /* call sparse index */
- memcpy(inSysData->sparsePattern.index, rowIndex, 1*sizeof(int));
-
- /* write color array */
- inSysData->sparsePattern.colorCols[0] = 1;
-}
-void initializeStaticDataNLS2012(void *inData, threadData_t *threadData, void *inSystemData)
-{
- DATA* data = (DATA*) inData;
- NONLINEAR_SYSTEM_DATA* sysData = (NONLINEAR_SYSTEM_DATA*) inSystemData;
- int i=0;
- /* static nls data for T[40] */
- sysData->nominal[i] = data->modelData->realVarsData[239].attribute /* T[40] */.nominal;
- sysData->min[i] = data->modelData->realVarsData[239].attribute /* T[40] */.min;
- sysData->max[i++] = data->modelData->realVarsData[239].attribute /* T[40] */.max;
- /* initial sparse pattern */
- initializeSparsePatternNLS2012(sysData);
-}
-
-void getIterationVarsNLS2012(struct DATA *inData, double *array)
-{
- DATA* data = (DATA*) inData;
- array[0] = data->localData[0]->realVars[239] /* T[40] variable */;
-}
-
-/* Prototypes for the strict sets (Dynamic Tearing) */
-
-/* Global constraints for the casual sets */
-/* function initialize non-linear systems */
-void Graph_initialNonLinearSystem(int nNonLinearSystems, NONLINEAR_SYSTEM_DATA* nonLinearSystemData)
-{
-
- nonLinearSystemData[0].equationIndex = 129;
- nonLinearSystemData[0].size = 1;
- nonLinearSystemData[0].homotopySupport = 0;
- nonLinearSystemData[0].mixedSystem = 0;
- nonLinearSystemData[0].residualFunc = residualFunc129;
- nonLinearSystemData[0].strictTearingFunctionCall = NULL;
- nonLinearSystemData[0].analyticalJacobianColumn = NULL;
- nonLinearSystemData[0].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[0].jacobianIndex = -1;
- nonLinearSystemData[0].initializeStaticNLSData = initializeStaticDataNLS129;
- nonLinearSystemData[0].getIterationVars = getIterationVarsNLS129;
- nonLinearSystemData[0].checkConstraints = NULL;
-
-
- nonLinearSystemData[1].equationIndex = 158;
- nonLinearSystemData[1].size = 1;
- nonLinearSystemData[1].homotopySupport = 0;
- nonLinearSystemData[1].mixedSystem = 0;
- nonLinearSystemData[1].residualFunc = residualFunc158;
- nonLinearSystemData[1].strictTearingFunctionCall = NULL;
- nonLinearSystemData[1].analyticalJacobianColumn = NULL;
- nonLinearSystemData[1].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[1].jacobianIndex = -1;
- nonLinearSystemData[1].initializeStaticNLSData = initializeStaticDataNLS158;
- nonLinearSystemData[1].getIterationVars = getIterationVarsNLS158;
- nonLinearSystemData[1].checkConstraints = NULL;
-
-
- nonLinearSystemData[2].equationIndex = 180;
- nonLinearSystemData[2].size = 1;
- nonLinearSystemData[2].homotopySupport = 0;
- nonLinearSystemData[2].mixedSystem = 0;
- nonLinearSystemData[2].residualFunc = residualFunc180;
- nonLinearSystemData[2].strictTearingFunctionCall = NULL;
- nonLinearSystemData[2].analyticalJacobianColumn = NULL;
- nonLinearSystemData[2].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[2].jacobianIndex = -1;
- nonLinearSystemData[2].initializeStaticNLSData = initializeStaticDataNLS180;
- nonLinearSystemData[2].getIterationVars = getIterationVarsNLS180;
- nonLinearSystemData[2].checkConstraints = NULL;
-
-
- nonLinearSystemData[3].equationIndex = 202;
- nonLinearSystemData[3].size = 1;
- nonLinearSystemData[3].homotopySupport = 0;
- nonLinearSystemData[3].mixedSystem = 0;
- nonLinearSystemData[3].residualFunc = residualFunc202;
- nonLinearSystemData[3].strictTearingFunctionCall = NULL;
- nonLinearSystemData[3].analyticalJacobianColumn = NULL;
- nonLinearSystemData[3].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[3].jacobianIndex = -1;
- nonLinearSystemData[3].initializeStaticNLSData = initializeStaticDataNLS202;
- nonLinearSystemData[3].getIterationVars = getIterationVarsNLS202;
- nonLinearSystemData[3].checkConstraints = NULL;
-
-
- nonLinearSystemData[4].equationIndex = 224;
- nonLinearSystemData[4].size = 1;
- nonLinearSystemData[4].homotopySupport = 0;
- nonLinearSystemData[4].mixedSystem = 0;
- nonLinearSystemData[4].residualFunc = residualFunc224;
- nonLinearSystemData[4].strictTearingFunctionCall = NULL;
- nonLinearSystemData[4].analyticalJacobianColumn = NULL;
- nonLinearSystemData[4].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[4].jacobianIndex = -1;
- nonLinearSystemData[4].initializeStaticNLSData = initializeStaticDataNLS224;
- nonLinearSystemData[4].getIterationVars = getIterationVarsNLS224;
- nonLinearSystemData[4].checkConstraints = NULL;
-
-
- nonLinearSystemData[5].equationIndex = 246;
- nonLinearSystemData[5].size = 1;
- nonLinearSystemData[5].homotopySupport = 0;
- nonLinearSystemData[5].mixedSystem = 0;
- nonLinearSystemData[5].residualFunc = residualFunc246;
- nonLinearSystemData[5].strictTearingFunctionCall = NULL;
- nonLinearSystemData[5].analyticalJacobianColumn = NULL;
- nonLinearSystemData[5].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[5].jacobianIndex = -1;
- nonLinearSystemData[5].initializeStaticNLSData = initializeStaticDataNLS246;
- nonLinearSystemData[5].getIterationVars = getIterationVarsNLS246;
- nonLinearSystemData[5].checkConstraints = NULL;
-
-
- nonLinearSystemData[6].equationIndex = 268;
- nonLinearSystemData[6].size = 1;
- nonLinearSystemData[6].homotopySupport = 0;
- nonLinearSystemData[6].mixedSystem = 0;
- nonLinearSystemData[6].residualFunc = residualFunc268;
- nonLinearSystemData[6].strictTearingFunctionCall = NULL;
- nonLinearSystemData[6].analyticalJacobianColumn = NULL;
- nonLinearSystemData[6].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[6].jacobianIndex = -1;
- nonLinearSystemData[6].initializeStaticNLSData = initializeStaticDataNLS268;
- nonLinearSystemData[6].getIterationVars = getIterationVarsNLS268;
- nonLinearSystemData[6].checkConstraints = NULL;
-
-
- nonLinearSystemData[7].equationIndex = 290;
- nonLinearSystemData[7].size = 1;
- nonLinearSystemData[7].homotopySupport = 0;
- nonLinearSystemData[7].mixedSystem = 0;
- nonLinearSystemData[7].residualFunc = residualFunc290;
- nonLinearSystemData[7].strictTearingFunctionCall = NULL;
- nonLinearSystemData[7].analyticalJacobianColumn = NULL;
- nonLinearSystemData[7].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[7].jacobianIndex = -1;
- nonLinearSystemData[7].initializeStaticNLSData = initializeStaticDataNLS290;
- nonLinearSystemData[7].getIterationVars = getIterationVarsNLS290;
- nonLinearSystemData[7].checkConstraints = NULL;
-
-
- nonLinearSystemData[8].equationIndex = 312;
- nonLinearSystemData[8].size = 1;
- nonLinearSystemData[8].homotopySupport = 0;
- nonLinearSystemData[8].mixedSystem = 0;
- nonLinearSystemData[8].residualFunc = residualFunc312;
- nonLinearSystemData[8].strictTearingFunctionCall = NULL;
- nonLinearSystemData[8].analyticalJacobianColumn = NULL;
- nonLinearSystemData[8].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[8].jacobianIndex = -1;
- nonLinearSystemData[8].initializeStaticNLSData = initializeStaticDataNLS312;
- nonLinearSystemData[8].getIterationVars = getIterationVarsNLS312;
- nonLinearSystemData[8].checkConstraints = NULL;
-
-
- nonLinearSystemData[9].equationIndex = 334;
- nonLinearSystemData[9].size = 1;
- nonLinearSystemData[9].homotopySupport = 0;
- nonLinearSystemData[9].mixedSystem = 0;
- nonLinearSystemData[9].residualFunc = residualFunc334;
- nonLinearSystemData[9].strictTearingFunctionCall = NULL;
- nonLinearSystemData[9].analyticalJacobianColumn = NULL;
- nonLinearSystemData[9].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[9].jacobianIndex = -1;
- nonLinearSystemData[9].initializeStaticNLSData = initializeStaticDataNLS334;
- nonLinearSystemData[9].getIterationVars = getIterationVarsNLS334;
- nonLinearSystemData[9].checkConstraints = NULL;
-
-
- nonLinearSystemData[10].equationIndex = 356;
- nonLinearSystemData[10].size = 1;
- nonLinearSystemData[10].homotopySupport = 0;
- nonLinearSystemData[10].mixedSystem = 0;
- nonLinearSystemData[10].residualFunc = residualFunc356;
- nonLinearSystemData[10].strictTearingFunctionCall = NULL;
- nonLinearSystemData[10].analyticalJacobianColumn = NULL;
- nonLinearSystemData[10].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[10].jacobianIndex = -1;
- nonLinearSystemData[10].initializeStaticNLSData = initializeStaticDataNLS356;
- nonLinearSystemData[10].getIterationVars = getIterationVarsNLS356;
- nonLinearSystemData[10].checkConstraints = NULL;
-
-
- nonLinearSystemData[11].equationIndex = 378;
- nonLinearSystemData[11].size = 1;
- nonLinearSystemData[11].homotopySupport = 0;
- nonLinearSystemData[11].mixedSystem = 0;
- nonLinearSystemData[11].residualFunc = residualFunc378;
- nonLinearSystemData[11].strictTearingFunctionCall = NULL;
- nonLinearSystemData[11].analyticalJacobianColumn = NULL;
- nonLinearSystemData[11].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[11].jacobianIndex = -1;
- nonLinearSystemData[11].initializeStaticNLSData = initializeStaticDataNLS378;
- nonLinearSystemData[11].getIterationVars = getIterationVarsNLS378;
- nonLinearSystemData[11].checkConstraints = NULL;
-
-
- nonLinearSystemData[12].equationIndex = 400;
- nonLinearSystemData[12].size = 1;
- nonLinearSystemData[12].homotopySupport = 0;
- nonLinearSystemData[12].mixedSystem = 0;
- nonLinearSystemData[12].residualFunc = residualFunc400;
- nonLinearSystemData[12].strictTearingFunctionCall = NULL;
- nonLinearSystemData[12].analyticalJacobianColumn = NULL;
- nonLinearSystemData[12].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[12].jacobianIndex = -1;
- nonLinearSystemData[12].initializeStaticNLSData = initializeStaticDataNLS400;
- nonLinearSystemData[12].getIterationVars = getIterationVarsNLS400;
- nonLinearSystemData[12].checkConstraints = NULL;
-
-
- nonLinearSystemData[13].equationIndex = 422;
- nonLinearSystemData[13].size = 1;
- nonLinearSystemData[13].homotopySupport = 0;
- nonLinearSystemData[13].mixedSystem = 0;
- nonLinearSystemData[13].residualFunc = residualFunc422;
- nonLinearSystemData[13].strictTearingFunctionCall = NULL;
- nonLinearSystemData[13].analyticalJacobianColumn = NULL;
- nonLinearSystemData[13].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[13].jacobianIndex = -1;
- nonLinearSystemData[13].initializeStaticNLSData = initializeStaticDataNLS422;
- nonLinearSystemData[13].getIterationVars = getIterationVarsNLS422;
- nonLinearSystemData[13].checkConstraints = NULL;
-
-
- nonLinearSystemData[14].equationIndex = 444;
- nonLinearSystemData[14].size = 1;
- nonLinearSystemData[14].homotopySupport = 0;
- nonLinearSystemData[14].mixedSystem = 0;
- nonLinearSystemData[14].residualFunc = residualFunc444;
- nonLinearSystemData[14].strictTearingFunctionCall = NULL;
- nonLinearSystemData[14].analyticalJacobianColumn = NULL;
- nonLinearSystemData[14].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[14].jacobianIndex = -1;
- nonLinearSystemData[14].initializeStaticNLSData = initializeStaticDataNLS444;
- nonLinearSystemData[14].getIterationVars = getIterationVarsNLS444;
- nonLinearSystemData[14].checkConstraints = NULL;
-
-
- nonLinearSystemData[15].equationIndex = 466;
- nonLinearSystemData[15].size = 1;
- nonLinearSystemData[15].homotopySupport = 0;
- nonLinearSystemData[15].mixedSystem = 0;
- nonLinearSystemData[15].residualFunc = residualFunc466;
- nonLinearSystemData[15].strictTearingFunctionCall = NULL;
- nonLinearSystemData[15].analyticalJacobianColumn = NULL;
- nonLinearSystemData[15].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[15].jacobianIndex = -1;
- nonLinearSystemData[15].initializeStaticNLSData = initializeStaticDataNLS466;
- nonLinearSystemData[15].getIterationVars = getIterationVarsNLS466;
- nonLinearSystemData[15].checkConstraints = NULL;
-
-
- nonLinearSystemData[16].equationIndex = 488;
- nonLinearSystemData[16].size = 1;
- nonLinearSystemData[16].homotopySupport = 0;
- nonLinearSystemData[16].mixedSystem = 0;
- nonLinearSystemData[16].residualFunc = residualFunc488;
- nonLinearSystemData[16].strictTearingFunctionCall = NULL;
- nonLinearSystemData[16].analyticalJacobianColumn = NULL;
- nonLinearSystemData[16].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[16].jacobianIndex = -1;
- nonLinearSystemData[16].initializeStaticNLSData = initializeStaticDataNLS488;
- nonLinearSystemData[16].getIterationVars = getIterationVarsNLS488;
- nonLinearSystemData[16].checkConstraints = NULL;
-
-
- nonLinearSystemData[17].equationIndex = 510;
- nonLinearSystemData[17].size = 1;
- nonLinearSystemData[17].homotopySupport = 0;
- nonLinearSystemData[17].mixedSystem = 0;
- nonLinearSystemData[17].residualFunc = residualFunc510;
- nonLinearSystemData[17].strictTearingFunctionCall = NULL;
- nonLinearSystemData[17].analyticalJacobianColumn = NULL;
- nonLinearSystemData[17].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[17].jacobianIndex = -1;
- nonLinearSystemData[17].initializeStaticNLSData = initializeStaticDataNLS510;
- nonLinearSystemData[17].getIterationVars = getIterationVarsNLS510;
- nonLinearSystemData[17].checkConstraints = NULL;
-
-
- nonLinearSystemData[18].equationIndex = 532;
- nonLinearSystemData[18].size = 1;
- nonLinearSystemData[18].homotopySupport = 0;
- nonLinearSystemData[18].mixedSystem = 0;
- nonLinearSystemData[18].residualFunc = residualFunc532;
- nonLinearSystemData[18].strictTearingFunctionCall = NULL;
- nonLinearSystemData[18].analyticalJacobianColumn = NULL;
- nonLinearSystemData[18].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[18].jacobianIndex = -1;
- nonLinearSystemData[18].initializeStaticNLSData = initializeStaticDataNLS532;
- nonLinearSystemData[18].getIterationVars = getIterationVarsNLS532;
- nonLinearSystemData[18].checkConstraints = NULL;
-
-
- nonLinearSystemData[19].equationIndex = 554;
- nonLinearSystemData[19].size = 1;
- nonLinearSystemData[19].homotopySupport = 0;
- nonLinearSystemData[19].mixedSystem = 0;
- nonLinearSystemData[19].residualFunc = residualFunc554;
- nonLinearSystemData[19].strictTearingFunctionCall = NULL;
- nonLinearSystemData[19].analyticalJacobianColumn = NULL;
- nonLinearSystemData[19].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[19].jacobianIndex = -1;
- nonLinearSystemData[19].initializeStaticNLSData = initializeStaticDataNLS554;
- nonLinearSystemData[19].getIterationVars = getIterationVarsNLS554;
- nonLinearSystemData[19].checkConstraints = NULL;
-
-
- nonLinearSystemData[20].equationIndex = 576;
- nonLinearSystemData[20].size = 1;
- nonLinearSystemData[20].homotopySupport = 0;
- nonLinearSystemData[20].mixedSystem = 0;
- nonLinearSystemData[20].residualFunc = residualFunc576;
- nonLinearSystemData[20].strictTearingFunctionCall = NULL;
- nonLinearSystemData[20].analyticalJacobianColumn = NULL;
- nonLinearSystemData[20].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[20].jacobianIndex = -1;
- nonLinearSystemData[20].initializeStaticNLSData = initializeStaticDataNLS576;
- nonLinearSystemData[20].getIterationVars = getIterationVarsNLS576;
- nonLinearSystemData[20].checkConstraints = NULL;
-
-
- nonLinearSystemData[21].equationIndex = 598;
- nonLinearSystemData[21].size = 1;
- nonLinearSystemData[21].homotopySupport = 0;
- nonLinearSystemData[21].mixedSystem = 0;
- nonLinearSystemData[21].residualFunc = residualFunc598;
- nonLinearSystemData[21].strictTearingFunctionCall = NULL;
- nonLinearSystemData[21].analyticalJacobianColumn = NULL;
- nonLinearSystemData[21].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[21].jacobianIndex = -1;
- nonLinearSystemData[21].initializeStaticNLSData = initializeStaticDataNLS598;
- nonLinearSystemData[21].getIterationVars = getIterationVarsNLS598;
- nonLinearSystemData[21].checkConstraints = NULL;
-
-
- nonLinearSystemData[22].equationIndex = 620;
- nonLinearSystemData[22].size = 1;
- nonLinearSystemData[22].homotopySupport = 0;
- nonLinearSystemData[22].mixedSystem = 0;
- nonLinearSystemData[22].residualFunc = residualFunc620;
- nonLinearSystemData[22].strictTearingFunctionCall = NULL;
- nonLinearSystemData[22].analyticalJacobianColumn = NULL;
- nonLinearSystemData[22].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[22].jacobianIndex = -1;
- nonLinearSystemData[22].initializeStaticNLSData = initializeStaticDataNLS620;
- nonLinearSystemData[22].getIterationVars = getIterationVarsNLS620;
- nonLinearSystemData[22].checkConstraints = NULL;
-
-
- nonLinearSystemData[23].equationIndex = 642;
- nonLinearSystemData[23].size = 1;
- nonLinearSystemData[23].homotopySupport = 0;
- nonLinearSystemData[23].mixedSystem = 0;
- nonLinearSystemData[23].residualFunc = residualFunc642;
- nonLinearSystemData[23].strictTearingFunctionCall = NULL;
- nonLinearSystemData[23].analyticalJacobianColumn = NULL;
- nonLinearSystemData[23].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[23].jacobianIndex = -1;
- nonLinearSystemData[23].initializeStaticNLSData = initializeStaticDataNLS642;
- nonLinearSystemData[23].getIterationVars = getIterationVarsNLS642;
- nonLinearSystemData[23].checkConstraints = NULL;
-
-
- nonLinearSystemData[24].equationIndex = 664;
- nonLinearSystemData[24].size = 1;
- nonLinearSystemData[24].homotopySupport = 0;
- nonLinearSystemData[24].mixedSystem = 0;
- nonLinearSystemData[24].residualFunc = residualFunc664;
- nonLinearSystemData[24].strictTearingFunctionCall = NULL;
- nonLinearSystemData[24].analyticalJacobianColumn = NULL;
- nonLinearSystemData[24].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[24].jacobianIndex = -1;
- nonLinearSystemData[24].initializeStaticNLSData = initializeStaticDataNLS664;
- nonLinearSystemData[24].getIterationVars = getIterationVarsNLS664;
- nonLinearSystemData[24].checkConstraints = NULL;
-
-
- nonLinearSystemData[25].equationIndex = 686;
- nonLinearSystemData[25].size = 1;
- nonLinearSystemData[25].homotopySupport = 0;
- nonLinearSystemData[25].mixedSystem = 0;
- nonLinearSystemData[25].residualFunc = residualFunc686;
- nonLinearSystemData[25].strictTearingFunctionCall = NULL;
- nonLinearSystemData[25].analyticalJacobianColumn = NULL;
- nonLinearSystemData[25].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[25].jacobianIndex = -1;
- nonLinearSystemData[25].initializeStaticNLSData = initializeStaticDataNLS686;
- nonLinearSystemData[25].getIterationVars = getIterationVarsNLS686;
- nonLinearSystemData[25].checkConstraints = NULL;
-
-
- nonLinearSystemData[26].equationIndex = 708;
- nonLinearSystemData[26].size = 1;
- nonLinearSystemData[26].homotopySupport = 0;
- nonLinearSystemData[26].mixedSystem = 0;
- nonLinearSystemData[26].residualFunc = residualFunc708;
- nonLinearSystemData[26].strictTearingFunctionCall = NULL;
- nonLinearSystemData[26].analyticalJacobianColumn = NULL;
- nonLinearSystemData[26].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[26].jacobianIndex = -1;
- nonLinearSystemData[26].initializeStaticNLSData = initializeStaticDataNLS708;
- nonLinearSystemData[26].getIterationVars = getIterationVarsNLS708;
- nonLinearSystemData[26].checkConstraints = NULL;
-
-
- nonLinearSystemData[27].equationIndex = 730;
- nonLinearSystemData[27].size = 1;
- nonLinearSystemData[27].homotopySupport = 0;
- nonLinearSystemData[27].mixedSystem = 0;
- nonLinearSystemData[27].residualFunc = residualFunc730;
- nonLinearSystemData[27].strictTearingFunctionCall = NULL;
- nonLinearSystemData[27].analyticalJacobianColumn = NULL;
- nonLinearSystemData[27].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[27].jacobianIndex = -1;
- nonLinearSystemData[27].initializeStaticNLSData = initializeStaticDataNLS730;
- nonLinearSystemData[27].getIterationVars = getIterationVarsNLS730;
- nonLinearSystemData[27].checkConstraints = NULL;
-
-
- nonLinearSystemData[28].equationIndex = 752;
- nonLinearSystemData[28].size = 1;
- nonLinearSystemData[28].homotopySupport = 0;
- nonLinearSystemData[28].mixedSystem = 0;
- nonLinearSystemData[28].residualFunc = residualFunc752;
- nonLinearSystemData[28].strictTearingFunctionCall = NULL;
- nonLinearSystemData[28].analyticalJacobianColumn = NULL;
- nonLinearSystemData[28].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[28].jacobianIndex = -1;
- nonLinearSystemData[28].initializeStaticNLSData = initializeStaticDataNLS752;
- nonLinearSystemData[28].getIterationVars = getIterationVarsNLS752;
- nonLinearSystemData[28].checkConstraints = NULL;
-
-
- nonLinearSystemData[29].equationIndex = 774;
- nonLinearSystemData[29].size = 1;
- nonLinearSystemData[29].homotopySupport = 0;
- nonLinearSystemData[29].mixedSystem = 0;
- nonLinearSystemData[29].residualFunc = residualFunc774;
- nonLinearSystemData[29].strictTearingFunctionCall = NULL;
- nonLinearSystemData[29].analyticalJacobianColumn = NULL;
- nonLinearSystemData[29].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[29].jacobianIndex = -1;
- nonLinearSystemData[29].initializeStaticNLSData = initializeStaticDataNLS774;
- nonLinearSystemData[29].getIterationVars = getIterationVarsNLS774;
- nonLinearSystemData[29].checkConstraints = NULL;
-
-
- nonLinearSystemData[30].equationIndex = 796;
- nonLinearSystemData[30].size = 1;
- nonLinearSystemData[30].homotopySupport = 0;
- nonLinearSystemData[30].mixedSystem = 0;
- nonLinearSystemData[30].residualFunc = residualFunc796;
- nonLinearSystemData[30].strictTearingFunctionCall = NULL;
- nonLinearSystemData[30].analyticalJacobianColumn = NULL;
- nonLinearSystemData[30].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[30].jacobianIndex = -1;
- nonLinearSystemData[30].initializeStaticNLSData = initializeStaticDataNLS796;
- nonLinearSystemData[30].getIterationVars = getIterationVarsNLS796;
- nonLinearSystemData[30].checkConstraints = NULL;
-
-
- nonLinearSystemData[31].equationIndex = 818;
- nonLinearSystemData[31].size = 1;
- nonLinearSystemData[31].homotopySupport = 0;
- nonLinearSystemData[31].mixedSystem = 0;
- nonLinearSystemData[31].residualFunc = residualFunc818;
- nonLinearSystemData[31].strictTearingFunctionCall = NULL;
- nonLinearSystemData[31].analyticalJacobianColumn = NULL;
- nonLinearSystemData[31].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[31].jacobianIndex = -1;
- nonLinearSystemData[31].initializeStaticNLSData = initializeStaticDataNLS818;
- nonLinearSystemData[31].getIterationVars = getIterationVarsNLS818;
- nonLinearSystemData[31].checkConstraints = NULL;
-
-
- nonLinearSystemData[32].equationIndex = 840;
- nonLinearSystemData[32].size = 1;
- nonLinearSystemData[32].homotopySupport = 0;
- nonLinearSystemData[32].mixedSystem = 0;
- nonLinearSystemData[32].residualFunc = residualFunc840;
- nonLinearSystemData[32].strictTearingFunctionCall = NULL;
- nonLinearSystemData[32].analyticalJacobianColumn = NULL;
- nonLinearSystemData[32].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[32].jacobianIndex = -1;
- nonLinearSystemData[32].initializeStaticNLSData = initializeStaticDataNLS840;
- nonLinearSystemData[32].getIterationVars = getIterationVarsNLS840;
- nonLinearSystemData[32].checkConstraints = NULL;
-
-
- nonLinearSystemData[33].equationIndex = 862;
- nonLinearSystemData[33].size = 1;
- nonLinearSystemData[33].homotopySupport = 0;
- nonLinearSystemData[33].mixedSystem = 0;
- nonLinearSystemData[33].residualFunc = residualFunc862;
- nonLinearSystemData[33].strictTearingFunctionCall = NULL;
- nonLinearSystemData[33].analyticalJacobianColumn = NULL;
- nonLinearSystemData[33].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[33].jacobianIndex = -1;
- nonLinearSystemData[33].initializeStaticNLSData = initializeStaticDataNLS862;
- nonLinearSystemData[33].getIterationVars = getIterationVarsNLS862;
- nonLinearSystemData[33].checkConstraints = NULL;
-
-
- nonLinearSystemData[34].equationIndex = 884;
- nonLinearSystemData[34].size = 1;
- nonLinearSystemData[34].homotopySupport = 0;
- nonLinearSystemData[34].mixedSystem = 0;
- nonLinearSystemData[34].residualFunc = residualFunc884;
- nonLinearSystemData[34].strictTearingFunctionCall = NULL;
- nonLinearSystemData[34].analyticalJacobianColumn = NULL;
- nonLinearSystemData[34].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[34].jacobianIndex = -1;
- nonLinearSystemData[34].initializeStaticNLSData = initializeStaticDataNLS884;
- nonLinearSystemData[34].getIterationVars = getIterationVarsNLS884;
- nonLinearSystemData[34].checkConstraints = NULL;
-
-
- nonLinearSystemData[35].equationIndex = 906;
- nonLinearSystemData[35].size = 1;
- nonLinearSystemData[35].homotopySupport = 0;
- nonLinearSystemData[35].mixedSystem = 0;
- nonLinearSystemData[35].residualFunc = residualFunc906;
- nonLinearSystemData[35].strictTearingFunctionCall = NULL;
- nonLinearSystemData[35].analyticalJacobianColumn = NULL;
- nonLinearSystemData[35].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[35].jacobianIndex = -1;
- nonLinearSystemData[35].initializeStaticNLSData = initializeStaticDataNLS906;
- nonLinearSystemData[35].getIterationVars = getIterationVarsNLS906;
- nonLinearSystemData[35].checkConstraints = NULL;
-
-
- nonLinearSystemData[36].equationIndex = 928;
- nonLinearSystemData[36].size = 1;
- nonLinearSystemData[36].homotopySupport = 0;
- nonLinearSystemData[36].mixedSystem = 0;
- nonLinearSystemData[36].residualFunc = residualFunc928;
- nonLinearSystemData[36].strictTearingFunctionCall = NULL;
- nonLinearSystemData[36].analyticalJacobianColumn = NULL;
- nonLinearSystemData[36].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[36].jacobianIndex = -1;
- nonLinearSystemData[36].initializeStaticNLSData = initializeStaticDataNLS928;
- nonLinearSystemData[36].getIterationVars = getIterationVarsNLS928;
- nonLinearSystemData[36].checkConstraints = NULL;
-
-
- nonLinearSystemData[37].equationIndex = 950;
- nonLinearSystemData[37].size = 1;
- nonLinearSystemData[37].homotopySupport = 0;
- nonLinearSystemData[37].mixedSystem = 0;
- nonLinearSystemData[37].residualFunc = residualFunc950;
- nonLinearSystemData[37].strictTearingFunctionCall = NULL;
- nonLinearSystemData[37].analyticalJacobianColumn = NULL;
- nonLinearSystemData[37].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[37].jacobianIndex = -1;
- nonLinearSystemData[37].initializeStaticNLSData = initializeStaticDataNLS950;
- nonLinearSystemData[37].getIterationVars = getIterationVarsNLS950;
- nonLinearSystemData[37].checkConstraints = NULL;
-
-
- nonLinearSystemData[38].equationIndex = 972;
- nonLinearSystemData[38].size = 1;
- nonLinearSystemData[38].homotopySupport = 0;
- nonLinearSystemData[38].mixedSystem = 0;
- nonLinearSystemData[38].residualFunc = residualFunc972;
- nonLinearSystemData[38].strictTearingFunctionCall = NULL;
- nonLinearSystemData[38].analyticalJacobianColumn = NULL;
- nonLinearSystemData[38].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[38].jacobianIndex = -1;
- nonLinearSystemData[38].initializeStaticNLSData = initializeStaticDataNLS972;
- nonLinearSystemData[38].getIterationVars = getIterationVarsNLS972;
- nonLinearSystemData[38].checkConstraints = NULL;
-
-
- nonLinearSystemData[39].equationIndex = 983;
- nonLinearSystemData[39].size = 1;
- nonLinearSystemData[39].homotopySupport = 0;
- nonLinearSystemData[39].mixedSystem = 0;
- nonLinearSystemData[39].residualFunc = residualFunc983;
- nonLinearSystemData[39].strictTearingFunctionCall = NULL;
- nonLinearSystemData[39].analyticalJacobianColumn = NULL;
- nonLinearSystemData[39].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[39].jacobianIndex = -1;
- nonLinearSystemData[39].initializeStaticNLSData = initializeStaticDataNLS983;
- nonLinearSystemData[39].getIterationVars = getIterationVarsNLS983;
- nonLinearSystemData[39].checkConstraints = NULL;
-
- nonLinearSystemData[40].equationIndex = 1003;
- nonLinearSystemData[40].size = 1;
- nonLinearSystemData[40].homotopySupport = 0;
- nonLinearSystemData[40].mixedSystem = 0;
- nonLinearSystemData[40].residualFunc = residualFunc1003;
- nonLinearSystemData[40].strictTearingFunctionCall = NULL;
- nonLinearSystemData[40].analyticalJacobianColumn = NULL;
- nonLinearSystemData[40].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[40].jacobianIndex = -1;
- nonLinearSystemData[40].initializeStaticNLSData = initializeStaticDataNLS1003;
- nonLinearSystemData[40].getIterationVars = getIterationVarsNLS1003;
- nonLinearSystemData[40].checkConstraints = NULL;
-
-
- nonLinearSystemData[41].equationIndex = 1038;
- nonLinearSystemData[41].size = 1;
- nonLinearSystemData[41].homotopySupport = 0;
- nonLinearSystemData[41].mixedSystem = 0;
- nonLinearSystemData[41].residualFunc = residualFunc1038;
- nonLinearSystemData[41].strictTearingFunctionCall = NULL;
- nonLinearSystemData[41].analyticalJacobianColumn = NULL;
- nonLinearSystemData[41].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[41].jacobianIndex = -1;
- nonLinearSystemData[41].initializeStaticNLSData = initializeStaticDataNLS1038;
- nonLinearSystemData[41].getIterationVars = getIterationVarsNLS1038;
- nonLinearSystemData[41].checkConstraints = NULL;
-
-
- nonLinearSystemData[42].equationIndex = 1064;
- nonLinearSystemData[42].size = 1;
- nonLinearSystemData[42].homotopySupport = 0;
- nonLinearSystemData[42].mixedSystem = 0;
- nonLinearSystemData[42].residualFunc = residualFunc1064;
- nonLinearSystemData[42].strictTearingFunctionCall = NULL;
- nonLinearSystemData[42].analyticalJacobianColumn = NULL;
- nonLinearSystemData[42].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[42].jacobianIndex = -1;
- nonLinearSystemData[42].initializeStaticNLSData = initializeStaticDataNLS1064;
- nonLinearSystemData[42].getIterationVars = getIterationVarsNLS1064;
- nonLinearSystemData[42].checkConstraints = NULL;
-
-
- nonLinearSystemData[43].equationIndex = 1090;
- nonLinearSystemData[43].size = 1;
- nonLinearSystemData[43].homotopySupport = 0;
- nonLinearSystemData[43].mixedSystem = 0;
- nonLinearSystemData[43].residualFunc = residualFunc1090;
- nonLinearSystemData[43].strictTearingFunctionCall = NULL;
- nonLinearSystemData[43].analyticalJacobianColumn = NULL;
- nonLinearSystemData[43].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[43].jacobianIndex = -1;
- nonLinearSystemData[43].initializeStaticNLSData = initializeStaticDataNLS1090;
- nonLinearSystemData[43].getIterationVars = getIterationVarsNLS1090;
- nonLinearSystemData[43].checkConstraints = NULL;
-
-
- nonLinearSystemData[44].equationIndex = 1116;
- nonLinearSystemData[44].size = 1;
- nonLinearSystemData[44].homotopySupport = 0;
- nonLinearSystemData[44].mixedSystem = 0;
- nonLinearSystemData[44].residualFunc = residualFunc1116;
- nonLinearSystemData[44].strictTearingFunctionCall = NULL;
- nonLinearSystemData[44].analyticalJacobianColumn = NULL;
- nonLinearSystemData[44].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[44].jacobianIndex = -1;
- nonLinearSystemData[44].initializeStaticNLSData = initializeStaticDataNLS1116;
- nonLinearSystemData[44].getIterationVars = getIterationVarsNLS1116;
- nonLinearSystemData[44].checkConstraints = NULL;
-
-
- nonLinearSystemData[45].equationIndex = 1142;
- nonLinearSystemData[45].size = 1;
- nonLinearSystemData[45].homotopySupport = 0;
- nonLinearSystemData[45].mixedSystem = 0;
- nonLinearSystemData[45].residualFunc = residualFunc1142;
- nonLinearSystemData[45].strictTearingFunctionCall = NULL;
- nonLinearSystemData[45].analyticalJacobianColumn = NULL;
- nonLinearSystemData[45].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[45].jacobianIndex = -1;
- nonLinearSystemData[45].initializeStaticNLSData = initializeStaticDataNLS1142;
- nonLinearSystemData[45].getIterationVars = getIterationVarsNLS1142;
- nonLinearSystemData[45].checkConstraints = NULL;
-
-
- nonLinearSystemData[46].equationIndex = 1168;
- nonLinearSystemData[46].size = 1;
- nonLinearSystemData[46].homotopySupport = 0;
- nonLinearSystemData[46].mixedSystem = 0;
- nonLinearSystemData[46].residualFunc = residualFunc1168;
- nonLinearSystemData[46].strictTearingFunctionCall = NULL;
- nonLinearSystemData[46].analyticalJacobianColumn = NULL;
- nonLinearSystemData[46].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[46].jacobianIndex = -1;
- nonLinearSystemData[46].initializeStaticNLSData = initializeStaticDataNLS1168;
- nonLinearSystemData[46].getIterationVars = getIterationVarsNLS1168;
- nonLinearSystemData[46].checkConstraints = NULL;
-
-
- nonLinearSystemData[47].equationIndex = 1194;
- nonLinearSystemData[47].size = 1;
- nonLinearSystemData[47].homotopySupport = 0;
- nonLinearSystemData[47].mixedSystem = 0;
- nonLinearSystemData[47].residualFunc = residualFunc1194;
- nonLinearSystemData[47].strictTearingFunctionCall = NULL;
- nonLinearSystemData[47].analyticalJacobianColumn = NULL;
- nonLinearSystemData[47].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[47].jacobianIndex = -1;
- nonLinearSystemData[47].initializeStaticNLSData = initializeStaticDataNLS1194;
- nonLinearSystemData[47].getIterationVars = getIterationVarsNLS1194;
- nonLinearSystemData[47].checkConstraints = NULL;
-
-
- nonLinearSystemData[48].equationIndex = 1220;
- nonLinearSystemData[48].size = 1;
- nonLinearSystemData[48].homotopySupport = 0;
- nonLinearSystemData[48].mixedSystem = 0;
- nonLinearSystemData[48].residualFunc = residualFunc1220;
- nonLinearSystemData[48].strictTearingFunctionCall = NULL;
- nonLinearSystemData[48].analyticalJacobianColumn = NULL;
- nonLinearSystemData[48].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[48].jacobianIndex = -1;
- nonLinearSystemData[48].initializeStaticNLSData = initializeStaticDataNLS1220;
- nonLinearSystemData[48].getIterationVars = getIterationVarsNLS1220;
- nonLinearSystemData[48].checkConstraints = NULL;
-
-
- nonLinearSystemData[49].equationIndex = 1246;
- nonLinearSystemData[49].size = 1;
- nonLinearSystemData[49].homotopySupport = 0;
- nonLinearSystemData[49].mixedSystem = 0;
- nonLinearSystemData[49].residualFunc = residualFunc1246;
- nonLinearSystemData[49].strictTearingFunctionCall = NULL;
- nonLinearSystemData[49].analyticalJacobianColumn = NULL;
- nonLinearSystemData[49].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[49].jacobianIndex = -1;
- nonLinearSystemData[49].initializeStaticNLSData = initializeStaticDataNLS1246;
- nonLinearSystemData[49].getIterationVars = getIterationVarsNLS1246;
- nonLinearSystemData[49].checkConstraints = NULL;
-
-
- nonLinearSystemData[50].equationIndex = 1272;
- nonLinearSystemData[50].size = 1;
- nonLinearSystemData[50].homotopySupport = 0;
- nonLinearSystemData[50].mixedSystem = 0;
- nonLinearSystemData[50].residualFunc = residualFunc1272;
- nonLinearSystemData[50].strictTearingFunctionCall = NULL;
- nonLinearSystemData[50].analyticalJacobianColumn = NULL;
- nonLinearSystemData[50].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[50].jacobianIndex = -1;
- nonLinearSystemData[50].initializeStaticNLSData = initializeStaticDataNLS1272;
- nonLinearSystemData[50].getIterationVars = getIterationVarsNLS1272;
- nonLinearSystemData[50].checkConstraints = NULL;
-
-
- nonLinearSystemData[51].equationIndex = 1298;
- nonLinearSystemData[51].size = 1;
- nonLinearSystemData[51].homotopySupport = 0;
- nonLinearSystemData[51].mixedSystem = 0;
- nonLinearSystemData[51].residualFunc = residualFunc1298;
- nonLinearSystemData[51].strictTearingFunctionCall = NULL;
- nonLinearSystemData[51].analyticalJacobianColumn = NULL;
- nonLinearSystemData[51].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[51].jacobianIndex = -1;
- nonLinearSystemData[51].initializeStaticNLSData = initializeStaticDataNLS1298;
- nonLinearSystemData[51].getIterationVars = getIterationVarsNLS1298;
- nonLinearSystemData[51].checkConstraints = NULL;
-
-
- nonLinearSystemData[52].equationIndex = 1324;
- nonLinearSystemData[52].size = 1;
- nonLinearSystemData[52].homotopySupport = 0;
- nonLinearSystemData[52].mixedSystem = 0;
- nonLinearSystemData[52].residualFunc = residualFunc1324;
- nonLinearSystemData[52].strictTearingFunctionCall = NULL;
- nonLinearSystemData[52].analyticalJacobianColumn = NULL;
- nonLinearSystemData[52].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[52].jacobianIndex = -1;
- nonLinearSystemData[52].initializeStaticNLSData = initializeStaticDataNLS1324;
- nonLinearSystemData[52].getIterationVars = getIterationVarsNLS1324;
- nonLinearSystemData[52].checkConstraints = NULL;
-
-
- nonLinearSystemData[53].equationIndex = 1350;
- nonLinearSystemData[53].size = 1;
- nonLinearSystemData[53].homotopySupport = 0;
- nonLinearSystemData[53].mixedSystem = 0;
- nonLinearSystemData[53].residualFunc = residualFunc1350;
- nonLinearSystemData[53].strictTearingFunctionCall = NULL;
- nonLinearSystemData[53].analyticalJacobianColumn = NULL;
- nonLinearSystemData[53].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[53].jacobianIndex = -1;
- nonLinearSystemData[53].initializeStaticNLSData = initializeStaticDataNLS1350;
- nonLinearSystemData[53].getIterationVars = getIterationVarsNLS1350;
- nonLinearSystemData[53].checkConstraints = NULL;
-
-
- nonLinearSystemData[54].equationIndex = 1376;
- nonLinearSystemData[54].size = 1;
- nonLinearSystemData[54].homotopySupport = 0;
- nonLinearSystemData[54].mixedSystem = 0;
- nonLinearSystemData[54].residualFunc = residualFunc1376;
- nonLinearSystemData[54].strictTearingFunctionCall = NULL;
- nonLinearSystemData[54].analyticalJacobianColumn = NULL;
- nonLinearSystemData[54].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[54].jacobianIndex = -1;
- nonLinearSystemData[54].initializeStaticNLSData = initializeStaticDataNLS1376;
- nonLinearSystemData[54].getIterationVars = getIterationVarsNLS1376;
- nonLinearSystemData[54].checkConstraints = NULL;
-
-
- nonLinearSystemData[55].equationIndex = 1402;
- nonLinearSystemData[55].size = 1;
- nonLinearSystemData[55].homotopySupport = 0;
- nonLinearSystemData[55].mixedSystem = 0;
- nonLinearSystemData[55].residualFunc = residualFunc1402;
- nonLinearSystemData[55].strictTearingFunctionCall = NULL;
- nonLinearSystemData[55].analyticalJacobianColumn = NULL;
- nonLinearSystemData[55].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[55].jacobianIndex = -1;
- nonLinearSystemData[55].initializeStaticNLSData = initializeStaticDataNLS1402;
- nonLinearSystemData[55].getIterationVars = getIterationVarsNLS1402;
- nonLinearSystemData[55].checkConstraints = NULL;
-
-
- nonLinearSystemData[56].equationIndex = 1428;
- nonLinearSystemData[56].size = 1;
- nonLinearSystemData[56].homotopySupport = 0;
- nonLinearSystemData[56].mixedSystem = 0;
- nonLinearSystemData[56].residualFunc = residualFunc1428;
- nonLinearSystemData[56].strictTearingFunctionCall = NULL;
- nonLinearSystemData[56].analyticalJacobianColumn = NULL;
- nonLinearSystemData[56].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[56].jacobianIndex = -1;
- nonLinearSystemData[56].initializeStaticNLSData = initializeStaticDataNLS1428;
- nonLinearSystemData[56].getIterationVars = getIterationVarsNLS1428;
- nonLinearSystemData[56].checkConstraints = NULL;
-
-
- nonLinearSystemData[57].equationIndex = 1454;
- nonLinearSystemData[57].size = 1;
- nonLinearSystemData[57].homotopySupport = 0;
- nonLinearSystemData[57].mixedSystem = 0;
- nonLinearSystemData[57].residualFunc = residualFunc1454;
- nonLinearSystemData[57].strictTearingFunctionCall = NULL;
- nonLinearSystemData[57].analyticalJacobianColumn = NULL;
- nonLinearSystemData[57].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[57].jacobianIndex = -1;
- nonLinearSystemData[57].initializeStaticNLSData = initializeStaticDataNLS1454;
- nonLinearSystemData[57].getIterationVars = getIterationVarsNLS1454;
- nonLinearSystemData[57].checkConstraints = NULL;
-
-
- nonLinearSystemData[58].equationIndex = 1480;
- nonLinearSystemData[58].size = 1;
- nonLinearSystemData[58].homotopySupport = 0;
- nonLinearSystemData[58].mixedSystem = 0;
- nonLinearSystemData[58].residualFunc = residualFunc1480;
- nonLinearSystemData[58].strictTearingFunctionCall = NULL;
- nonLinearSystemData[58].analyticalJacobianColumn = NULL;
- nonLinearSystemData[58].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[58].jacobianIndex = -1;
- nonLinearSystemData[58].initializeStaticNLSData = initializeStaticDataNLS1480;
- nonLinearSystemData[58].getIterationVars = getIterationVarsNLS1480;
- nonLinearSystemData[58].checkConstraints = NULL;
-
-
- nonLinearSystemData[59].equationIndex = 1506;
- nonLinearSystemData[59].size = 1;
- nonLinearSystemData[59].homotopySupport = 0;
- nonLinearSystemData[59].mixedSystem = 0;
- nonLinearSystemData[59].residualFunc = residualFunc1506;
- nonLinearSystemData[59].strictTearingFunctionCall = NULL;
- nonLinearSystemData[59].analyticalJacobianColumn = NULL;
- nonLinearSystemData[59].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[59].jacobianIndex = -1;
- nonLinearSystemData[59].initializeStaticNLSData = initializeStaticDataNLS1506;
- nonLinearSystemData[59].getIterationVars = getIterationVarsNLS1506;
- nonLinearSystemData[59].checkConstraints = NULL;
-
-
- nonLinearSystemData[60].equationIndex = 1532;
- nonLinearSystemData[60].size = 1;
- nonLinearSystemData[60].homotopySupport = 0;
- nonLinearSystemData[60].mixedSystem = 0;
- nonLinearSystemData[60].residualFunc = residualFunc1532;
- nonLinearSystemData[60].strictTearingFunctionCall = NULL;
- nonLinearSystemData[60].analyticalJacobianColumn = NULL;
- nonLinearSystemData[60].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[60].jacobianIndex = -1;
- nonLinearSystemData[60].initializeStaticNLSData = initializeStaticDataNLS1532;
- nonLinearSystemData[60].getIterationVars = getIterationVarsNLS1532;
- nonLinearSystemData[60].checkConstraints = NULL;
-
-
- nonLinearSystemData[61].equationIndex = 1558;
- nonLinearSystemData[61].size = 1;
- nonLinearSystemData[61].homotopySupport = 0;
- nonLinearSystemData[61].mixedSystem = 0;
- nonLinearSystemData[61].residualFunc = residualFunc1558;
- nonLinearSystemData[61].strictTearingFunctionCall = NULL;
- nonLinearSystemData[61].analyticalJacobianColumn = NULL;
- nonLinearSystemData[61].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[61].jacobianIndex = -1;
- nonLinearSystemData[61].initializeStaticNLSData = initializeStaticDataNLS1558;
- nonLinearSystemData[61].getIterationVars = getIterationVarsNLS1558;
- nonLinearSystemData[61].checkConstraints = NULL;
-
-
- nonLinearSystemData[62].equationIndex = 1584;
- nonLinearSystemData[62].size = 1;
- nonLinearSystemData[62].homotopySupport = 0;
- nonLinearSystemData[62].mixedSystem = 0;
- nonLinearSystemData[62].residualFunc = residualFunc1584;
- nonLinearSystemData[62].strictTearingFunctionCall = NULL;
- nonLinearSystemData[62].analyticalJacobianColumn = NULL;
- nonLinearSystemData[62].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[62].jacobianIndex = -1;
- nonLinearSystemData[62].initializeStaticNLSData = initializeStaticDataNLS1584;
- nonLinearSystemData[62].getIterationVars = getIterationVarsNLS1584;
- nonLinearSystemData[62].checkConstraints = NULL;
-
-
- nonLinearSystemData[63].equationIndex = 1610;
- nonLinearSystemData[63].size = 1;
- nonLinearSystemData[63].homotopySupport = 0;
- nonLinearSystemData[63].mixedSystem = 0;
- nonLinearSystemData[63].residualFunc = residualFunc1610;
- nonLinearSystemData[63].strictTearingFunctionCall = NULL;
- nonLinearSystemData[63].analyticalJacobianColumn = NULL;
- nonLinearSystemData[63].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[63].jacobianIndex = -1;
- nonLinearSystemData[63].initializeStaticNLSData = initializeStaticDataNLS1610;
- nonLinearSystemData[63].getIterationVars = getIterationVarsNLS1610;
- nonLinearSystemData[63].checkConstraints = NULL;
-
-
- nonLinearSystemData[64].equationIndex = 1636;
- nonLinearSystemData[64].size = 1;
- nonLinearSystemData[64].homotopySupport = 0;
- nonLinearSystemData[64].mixedSystem = 0;
- nonLinearSystemData[64].residualFunc = residualFunc1636;
- nonLinearSystemData[64].strictTearingFunctionCall = NULL;
- nonLinearSystemData[64].analyticalJacobianColumn = NULL;
- nonLinearSystemData[64].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[64].jacobianIndex = -1;
- nonLinearSystemData[64].initializeStaticNLSData = initializeStaticDataNLS1636;
- nonLinearSystemData[64].getIterationVars = getIterationVarsNLS1636;
- nonLinearSystemData[64].checkConstraints = NULL;
-
-
- nonLinearSystemData[65].equationIndex = 1662;
- nonLinearSystemData[65].size = 1;
- nonLinearSystemData[65].homotopySupport = 0;
- nonLinearSystemData[65].mixedSystem = 0;
- nonLinearSystemData[65].residualFunc = residualFunc1662;
- nonLinearSystemData[65].strictTearingFunctionCall = NULL;
- nonLinearSystemData[65].analyticalJacobianColumn = NULL;
- nonLinearSystemData[65].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[65].jacobianIndex = -1;
- nonLinearSystemData[65].initializeStaticNLSData = initializeStaticDataNLS1662;
- nonLinearSystemData[65].getIterationVars = getIterationVarsNLS1662;
- nonLinearSystemData[65].checkConstraints = NULL;
-
-
- nonLinearSystemData[66].equationIndex = 1688;
- nonLinearSystemData[66].size = 1;
- nonLinearSystemData[66].homotopySupport = 0;
- nonLinearSystemData[66].mixedSystem = 0;
- nonLinearSystemData[66].residualFunc = residualFunc1688;
- nonLinearSystemData[66].strictTearingFunctionCall = NULL;
- nonLinearSystemData[66].analyticalJacobianColumn = NULL;
- nonLinearSystemData[66].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[66].jacobianIndex = -1;
- nonLinearSystemData[66].initializeStaticNLSData = initializeStaticDataNLS1688;
- nonLinearSystemData[66].getIterationVars = getIterationVarsNLS1688;
- nonLinearSystemData[66].checkConstraints = NULL;
-
-
- nonLinearSystemData[67].equationIndex = 1714;
- nonLinearSystemData[67].size = 1;
- nonLinearSystemData[67].homotopySupport = 0;
- nonLinearSystemData[67].mixedSystem = 0;
- nonLinearSystemData[67].residualFunc = residualFunc1714;
- nonLinearSystemData[67].strictTearingFunctionCall = NULL;
- nonLinearSystemData[67].analyticalJacobianColumn = NULL;
- nonLinearSystemData[67].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[67].jacobianIndex = -1;
- nonLinearSystemData[67].initializeStaticNLSData = initializeStaticDataNLS1714;
- nonLinearSystemData[67].getIterationVars = getIterationVarsNLS1714;
- nonLinearSystemData[67].checkConstraints = NULL;
-
-
- nonLinearSystemData[68].equationIndex = 1740;
- nonLinearSystemData[68].size = 1;
- nonLinearSystemData[68].homotopySupport = 0;
- nonLinearSystemData[68].mixedSystem = 0;
- nonLinearSystemData[68].residualFunc = residualFunc1740;
- nonLinearSystemData[68].strictTearingFunctionCall = NULL;
- nonLinearSystemData[68].analyticalJacobianColumn = NULL;
- nonLinearSystemData[68].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[68].jacobianIndex = -1;
- nonLinearSystemData[68].initializeStaticNLSData = initializeStaticDataNLS1740;
- nonLinearSystemData[68].getIterationVars = getIterationVarsNLS1740;
- nonLinearSystemData[68].checkConstraints = NULL;
-
-
- nonLinearSystemData[69].equationIndex = 1766;
- nonLinearSystemData[69].size = 1;
- nonLinearSystemData[69].homotopySupport = 0;
- nonLinearSystemData[69].mixedSystem = 0;
- nonLinearSystemData[69].residualFunc = residualFunc1766;
- nonLinearSystemData[69].strictTearingFunctionCall = NULL;
- nonLinearSystemData[69].analyticalJacobianColumn = NULL;
- nonLinearSystemData[69].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[69].jacobianIndex = -1;
- nonLinearSystemData[69].initializeStaticNLSData = initializeStaticDataNLS1766;
- nonLinearSystemData[69].getIterationVars = getIterationVarsNLS1766;
- nonLinearSystemData[69].checkConstraints = NULL;
-
-
- nonLinearSystemData[70].equationIndex = 1792;
- nonLinearSystemData[70].size = 1;
- nonLinearSystemData[70].homotopySupport = 0;
- nonLinearSystemData[70].mixedSystem = 0;
- nonLinearSystemData[70].residualFunc = residualFunc1792;
- nonLinearSystemData[70].strictTearingFunctionCall = NULL;
- nonLinearSystemData[70].analyticalJacobianColumn = NULL;
- nonLinearSystemData[70].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[70].jacobianIndex = -1;
- nonLinearSystemData[70].initializeStaticNLSData = initializeStaticDataNLS1792;
- nonLinearSystemData[70].getIterationVars = getIterationVarsNLS1792;
- nonLinearSystemData[70].checkConstraints = NULL;
-
-
- nonLinearSystemData[71].equationIndex = 1818;
- nonLinearSystemData[71].size = 1;
- nonLinearSystemData[71].homotopySupport = 0;
- nonLinearSystemData[71].mixedSystem = 0;
- nonLinearSystemData[71].residualFunc = residualFunc1818;
- nonLinearSystemData[71].strictTearingFunctionCall = NULL;
- nonLinearSystemData[71].analyticalJacobianColumn = NULL;
- nonLinearSystemData[71].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[71].jacobianIndex = -1;
- nonLinearSystemData[71].initializeStaticNLSData = initializeStaticDataNLS1818;
- nonLinearSystemData[71].getIterationVars = getIterationVarsNLS1818;
- nonLinearSystemData[71].checkConstraints = NULL;
-
-
- nonLinearSystemData[72].equationIndex = 1844;
- nonLinearSystemData[72].size = 1;
- nonLinearSystemData[72].homotopySupport = 0;
- nonLinearSystemData[72].mixedSystem = 0;
- nonLinearSystemData[72].residualFunc = residualFunc1844;
- nonLinearSystemData[72].strictTearingFunctionCall = NULL;
- nonLinearSystemData[72].analyticalJacobianColumn = NULL;
- nonLinearSystemData[72].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[72].jacobianIndex = -1;
- nonLinearSystemData[72].initializeStaticNLSData = initializeStaticDataNLS1844;
- nonLinearSystemData[72].getIterationVars = getIterationVarsNLS1844;
- nonLinearSystemData[72].checkConstraints = NULL;
-
-
- nonLinearSystemData[73].equationIndex = 1870;
- nonLinearSystemData[73].size = 1;
- nonLinearSystemData[73].homotopySupport = 0;
- nonLinearSystemData[73].mixedSystem = 0;
- nonLinearSystemData[73].residualFunc = residualFunc1870;
- nonLinearSystemData[73].strictTearingFunctionCall = NULL;
- nonLinearSystemData[73].analyticalJacobianColumn = NULL;
- nonLinearSystemData[73].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[73].jacobianIndex = -1;
- nonLinearSystemData[73].initializeStaticNLSData = initializeStaticDataNLS1870;
- nonLinearSystemData[73].getIterationVars = getIterationVarsNLS1870;
- nonLinearSystemData[73].checkConstraints = NULL;
-
-
- nonLinearSystemData[74].equationIndex = 1896;
- nonLinearSystemData[74].size = 1;
- nonLinearSystemData[74].homotopySupport = 0;
- nonLinearSystemData[74].mixedSystem = 0;
- nonLinearSystemData[74].residualFunc = residualFunc1896;
- nonLinearSystemData[74].strictTearingFunctionCall = NULL;
- nonLinearSystemData[74].analyticalJacobianColumn = NULL;
- nonLinearSystemData[74].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[74].jacobianIndex = -1;
- nonLinearSystemData[74].initializeStaticNLSData = initializeStaticDataNLS1896;
- nonLinearSystemData[74].getIterationVars = getIterationVarsNLS1896;
- nonLinearSystemData[74].checkConstraints = NULL;
-
-
- nonLinearSystemData[75].equationIndex = 1922;
- nonLinearSystemData[75].size = 1;
- nonLinearSystemData[75].homotopySupport = 0;
- nonLinearSystemData[75].mixedSystem = 0;
- nonLinearSystemData[75].residualFunc = residualFunc1922;
- nonLinearSystemData[75].strictTearingFunctionCall = NULL;
- nonLinearSystemData[75].analyticalJacobianColumn = NULL;
- nonLinearSystemData[75].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[75].jacobianIndex = -1;
- nonLinearSystemData[75].initializeStaticNLSData = initializeStaticDataNLS1922;
- nonLinearSystemData[75].getIterationVars = getIterationVarsNLS1922;
- nonLinearSystemData[75].checkConstraints = NULL;
-
-
- nonLinearSystemData[76].equationIndex = 1948;
- nonLinearSystemData[76].size = 1;
- nonLinearSystemData[76].homotopySupport = 0;
- nonLinearSystemData[76].mixedSystem = 0;
- nonLinearSystemData[76].residualFunc = residualFunc1948;
- nonLinearSystemData[76].strictTearingFunctionCall = NULL;
- nonLinearSystemData[76].analyticalJacobianColumn = NULL;
- nonLinearSystemData[76].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[76].jacobianIndex = -1;
- nonLinearSystemData[76].initializeStaticNLSData = initializeStaticDataNLS1948;
- nonLinearSystemData[76].getIterationVars = getIterationVarsNLS1948;
- nonLinearSystemData[76].checkConstraints = NULL;
-
-
- nonLinearSystemData[77].equationIndex = 1974;
- nonLinearSystemData[77].size = 1;
- nonLinearSystemData[77].homotopySupport = 0;
- nonLinearSystemData[77].mixedSystem = 0;
- nonLinearSystemData[77].residualFunc = residualFunc1974;
- nonLinearSystemData[77].strictTearingFunctionCall = NULL;
- nonLinearSystemData[77].analyticalJacobianColumn = NULL;
- nonLinearSystemData[77].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[77].jacobianIndex = -1;
- nonLinearSystemData[77].initializeStaticNLSData = initializeStaticDataNLS1974;
- nonLinearSystemData[77].getIterationVars = getIterationVarsNLS1974;
- nonLinearSystemData[77].checkConstraints = NULL;
-
-
- nonLinearSystemData[78].equationIndex = 2000;
- nonLinearSystemData[78].size = 1;
- nonLinearSystemData[78].homotopySupport = 0;
- nonLinearSystemData[78].mixedSystem = 0;
- nonLinearSystemData[78].residualFunc = residualFunc2000;
- nonLinearSystemData[78].strictTearingFunctionCall = NULL;
- nonLinearSystemData[78].analyticalJacobianColumn = NULL;
- nonLinearSystemData[78].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[78].jacobianIndex = -1;
- nonLinearSystemData[78].initializeStaticNLSData = initializeStaticDataNLS2000;
- nonLinearSystemData[78].getIterationVars = getIterationVarsNLS2000;
- nonLinearSystemData[78].checkConstraints = NULL;
-
-
- nonLinearSystemData[79].equationIndex = 2012;
- nonLinearSystemData[79].size = 1;
- nonLinearSystemData[79].homotopySupport = 0;
- nonLinearSystemData[79].mixedSystem = 0;
- nonLinearSystemData[79].residualFunc = residualFunc2012;
- nonLinearSystemData[79].strictTearingFunctionCall = NULL;
- nonLinearSystemData[79].analyticalJacobianColumn = NULL;
- nonLinearSystemData[79].initialAnalyticalJacobian = NULL;
- nonLinearSystemData[79].jacobianIndex = -1;
- nonLinearSystemData[79].initializeStaticNLSData = initializeStaticDataNLS2012;
- nonLinearSystemData[79].getIterationVars = getIterationVarsNLS2012;
- nonLinearSystemData[79].checkConstraints = NULL;
-}
-
-#if defined(__cplusplus)
-}
-#endif
-