Name | Description |
---|---|
batchReacLiqAtoP | Batch reactor physical model |
![]() | Liquid-phase chemical reaction A -> P [1]: A, [2]: agua, [3]: P |
![]() | Liquid source |
![]() | Source of temperature |
![]() | Thermal resistor |
The batch reactor model has been extracted from (Froment, G. F. and K. B. Bischoff 1979).
The model is composed of a CV containig the liquid stored in the reactor, a TP modeling the reaction inside the reactor,
a pump model and the model of the heat exchanger.
The heat exchanger model is composed of a temperature source and a resistor.
The input of liquid water is placed at the boiler bottom, and the vapor output valve is placed at the top. The output valve has the following constitutive equation: Fm = (F0)*sqrt(p(p-p0)), where p0 is the valve output pressure. The water contained in the boiler is continually heated. Two control volumes are considered:
The vapor volume is equal to the difference between the boiler-recipient inner volume and the water volume. The boiling is a transport phenomena represented by a model connecting both control volumes. The heat-flow into the boiler, the pressure at the valve output and the water pump are modeled using JARA2i source models.
Froment, G. F. and K. B. Bischoff (1979): Chemical Reactor Analysis and Design. John Wiley & Sons, New York, USA.
Type | Name | Default | Description |
---|---|---|---|
Integer | nComp | 3 | Component number of the liqid mixture |
Integer | numChR | 1 | Number of irreversible chemical reactions |
Boolean | Ejs | true | |
Boolean | Sysquake | false | |
Real | CpCoefMInitial[nComp, 7] | [4.5E3, 0, 0, 0, 0, 0, 0; 4.... | [J/(Kg*K)] |
Real | massEnthalpyRefInitial[nComp] | {167E4,0,0} | Specific (per mass) enthalpy at reference temperature [J/Kg] |
Real | tempRefInitial | 300 | Reference temperature [K] |
Real | molecWeightInitial[nComp] | {0.1,0.018,0.1} | Molecular weight [Kg/mol] |
Real | densityInitial[nComp] | {1E3,1E3,1E3} | Components density [Kg/m3] |
Real | vesselVinitial | 5 | Initial reactor volume [m3] |
Real | vesselSinitial | 3 | Initial reactor section [m2] |
Real | stoichCoefInitial[numChR, nComp] | [-1, 0, 1] | Stoich coeffs. |
Real | kCoefInitial[2] | {4E6,-7.9E3} | Reaction velocity coeffs. [{s-1,K}] |
Real | heatExchAreaInitial | 3.3 | Exchanger area [m2] |
Real | hTSteamInitial | 1360 | Heat-transfer coeff. of the vapor [W/(m2.K)] |
Real | hTWaterInitial | 1180 | Heat-transfer coeff. of the water [W/(m2.K)] |
Real | tempSteam | 393 | Vapor temperature [K] |
Real | tempWater | 288 | Water temperature [K] |
Real | pmax | 1.05*3*vesselVinitial*liq.li... | |
Real | pcodo | pmax/1.05 | Source parameter |
Real | pmin | 1 | Source parameter |
Real | peps | 0.2 | Source parameter |
Real | massLinitial[:] | {0,1,0} | Initial condition [M] |
Real | tempLinitial | 300 | Initial condition [T] |
model batchReacLiqAtoP "Batch reactor physical model" // [1]: A, [2]: agua, [3]: P parameter Integer nComp = 3 "Component number of the liqid mixture"; parameter Integer numChR = 1 "Number of irreversible chemical reactions"; // Interactivity inner parameter Boolean Ejs = true; inner parameter Boolean Sysquake = false; parameter Real CpCoefMInitial[ nComp,7]( unit="J/(Kg*K)") = [ 4.5E3, 0, 0, 0, 0, 0, 0; 4.2E3, 0, 0, 0, 0, 0, 0; 4.5E3, 0, 0, 0, 0, 0, 0]; parameter Real massEnthalpyRefInitial[nComp]( unit="J/Kg") = {167E4, 0, 0} "Specific (per mass) enthalpy at reference temperature"; parameter Real tempRefInitial( unit="K") = 300 "Reference temperature"; parameter Real molecWeightInitial[nComp]( unit="Kg/mol") = {0.1, 0.018, 0.1} "Molecular weight"; parameter Real densityInitial[nComp]( unit="Kg/m3") = {1E3, 1E3, 1E3} "Components density"; parameter Real vesselVinitial( unit="m3") = 5 "Initial reactor volume"; parameter Real vesselSinitial( unit="m2") = 3 "Initial reactor section"; parameter Real stoichCoefInitial[ numChR,nComp] = [-1, 0, 1] "Stoich coeffs."; parameter Real kCoefInitial[ 2]( unit="{s-1,K}") = { 4E6, -7.9E3} "Reaction velocity coeffs."; parameter Real heatExchAreaInitial( unit="m2") = 3.3 "Exchanger area"; parameter Real hTSteamInitial( unit="W/(m2.K)") = 1360 "Heat-transfer coeff. of the vapor"; parameter Real hTWaterInitial( unit="W/(m2.K)") = 1180 "Heat-transfer coeff. of the water"; parameter Real tempSteam( unit="K") = 393 "Vapor temperature"; parameter Real tempWater( unit="K") = 288 "Water temperature"; parameter Real pmax = 1.05*3*vesselVinitial*liq.liquid.g* max(densityInitial[1],max(densityInitial[2],densityInitial[3])) / (0.5*vesselSinitial); parameter Real pcodo = pmax / 1.05 "Source parameter"; parameter Real pmin = 1 "Source parameter"; parameter Real peps = 0.2 "Source parameter"; parameter Real massLinitial[ :]( unit="M") = { 0, 1, 0} "Initial condition"; parameter Real tempLinitial( unit="T") = 300 "Initial condition"; JARA2i.liq.liquidCp6PrefVB liq( nComp=nComp,CpCoefMInitial=CpCoefMInitial, vesselVolumeInitial=vesselVinitial, densityInitial = densityInitial, sectionInitial=vesselSinitial, massEnthalpyRefInitial = massEnthalpyRefInitial, tempRefInitial=tempRefInitial, massLinitial=massLinitial,tempLinitial=tempLinitial); chReacAtoP chRAtoP( nComp=nComp,numChR=numChR,stoichCoefInitial=stoichCoefInitial, kCoefInitial = kCoefInitial, molecWeightInitial=molecWeightInitial, densityInitial = densityInitial); JARA2i.liq.sourceVolLiqFB liqSource( nComp=nComp,densityInitial=densityInitial, CpCoefMInitial = CpCoefMInitial, pmax=pmax,pcodo=pcodo,pmin=pmin,peps=peps, massEnthalpyRefInitial=massEnthalpyRefInitial, tempRefInitial = tempRefInitial); thermalResist resistTherm( nCompI=nComp,heatExchAreaInitial=heatExchAreaInitial, hTSteamInitial=hTSteamInitial, hTWaterInitial=hTWaterInitial); sourceOfTemp fluidTemp( tempHeatInitial=tempSteam,tempCoolInitial=tempWater); sourceLiqCntrl sourceLiqCtrl( nComp=nComp); equation // Liquid flow connect( liqSource.inMass, liq.inMassBot); connect( liq.inMassBot, chRAtoP.inMass); connect( liq.inHeat, resistTherm.inHeat); connect( fluidTemp.inHeat, resistTherm.outHeat); connect( liqSource.setPointSignal, sourceLiqCtrl.setPointSignal); // Chemical reaction // Heat flow // Control signal end batchReacLiqAtoP;
Class modeling the chemical reaction A ==> P. [1]: A, [2]: agua, [3]: P. This class inherits from chReac.chReacLiqB. The interactive variables of the model are shown in Table 1.
Table 1. Interactive variables.stoichCoefInitial[numChR,nComp] | Stoichometric coefficients of the chemical reactions. Sign criterium: Reactives are negative. Products are positive. |
density[nComp] | Density of the pure components. |
molecWeigth[nComp] | Molecular weight of the components. |
kCoef[2] | Rate of reaction coefficients. |
calcConversion | 1: conversion calculation. |
Froment, G. F. and K. B. Bischoff (1979): Chemical Reactor Analysis and Design. John Wiley & Sons, New York, USA.
Type | Name | Default | Description |
---|---|---|---|
Integer | nComp | 1 | Number of components |
Boolean | Ejs | false | Global parameter - Runtime interactivity |
Boolean | Sysquake | false | Global parameter - Batch interactivity |
Integer | numChR | 1 | Number of chemical reactions |
Real | stoichCoefInitial[numChR, nComp] | Stoichometric coefficients of the chemical reactions. Sign criterium: Reactives are negative. Products are positive. | |
Real | densityInitial[nComp] | Density of the pure components [M.L-3] | |
Real | molecWeightInitial[nComp] | Molecular weigth of the components [M.mol-1] | |
Real | calcConversionInitial | 0 | |
Real | kCoefInitial[2] | Rate of reaction coefs [{t-1,T}] | |
Real | eps | 1E-8 | Small constant to avoid by-zero division |
Type | Name | Description |
---|---|---|
cutLiquidR | inMass | Connector for the liquid flow |
model chReacAtoP "Liquid-phase chemical reaction A -> P [1]: A, [2]: agua, [3]: P " // Liquid-phase chemical reaction A -> P // [1]: A, [2]: agua, [3]: P extends chReac.chReacLiqB; Real conversion( unit="") "Fractional conversion"; Real calcConversion( start=calcConversionInitial) "1: conversion calculation"; parameter Real calcConversionInitial = 0; Real kCoef[2]( unit="{t-1,T}", start=kCoefInitial, fixed=true) "Rate of reaction coefs"; parameter Real kCoefInitial[ 2]( unit="{t-1,T}") "Rate of reaction coefs"; parameter Real eps( unit="") = 1E-8 "Small constant to avoid by-zero division"; protected Real kReactionRate( unit="t-1") "Coeff. rate of reaction vs temp."; Real concMolL[ nComp]( unit="mol.L-3") "Molar concentration"; Real molL[ nComp]( unit="mol") "Number of mols"; Real massL1Initial( start = 1, fixed=true) "Mass of A at time = time0"; equation if (Ejs) then // Interactive parameters der(kCoef) = {0,0}; // Interactive variable der(calcConversion) = 0; end if; if (Sysquake) then // Interactive parameters kCoef = kCoefInitial; // Interactive variable //calcConversion = calcConversionInitial; end if; // Number of moles of the components for i in 1:nComp loop inMass.massL[i] = molecWeight[i] * molL[i]; end for; // Arrhenius equation kReactionRate = kCoef[1] * exp( kCoef[2] / ( inMass.tempL + eps)); // Molar concentration of the components concMolL = molL / ( fluidV + eps); // Conversion when calcConversion > 0.5 then massL1Initial = inMass.massL[1]; end when; conversion = if calcConversion < 0.5 then 0 else ( massL1Initial - inMass.massL[1]) / massL1Initial; // Rate of reaction reactionRate[1] = kReactionRate * concMolL[1]^ (-stoichCoef[1,1]); end chReacAtoP;
Class modeling the input liquid source. [1]: A, [2]: agua, [3]: P. This class inherits from interf.sourceVolLiqSignalI. The interactive variables of the model are shown in Table 1.
Table 1. Interactive variables.flowVSP | Setpoint of the volumetric flow. |
tempSP | Setpoint of the flow temperature. |
fractVSP[nComp] | Volumetric fraction of the components. |
Type | Name | Default | Description |
---|---|---|---|
Integer | nComp | 1 | Number of components |
Real | flowVSPInitial | 0 | Setpoint of the volumetric flow |
Real | tempSPInitial | 297 | Setpoint of the flow temperature |
Real | fractVSPInitial[nComp] | {0.1,0.9,0} | Volumetric fraction of the components |
Boolean | Ejs | false | Global parameter - Runtime interactivity |
Boolean | Sysquake | false | Global parameter - Batch interactivity |
Type | Name | Description |
---|---|---|
cutEmitter | setPointSignal | Set-point of the total volumetric flow, component volume fraction and temperature |
model sourceLiqCntrl "Liquid source" extends interf.sourceVolLiqSignalI(nComp=nComp); parameter Real flowVSPInitial = 0 "Setpoint of the volumetric flow"; parameter Real tempSPInitial = 297 "Setpoint of the flow temperature"; parameter Real fractVSPInitial[nComp] = {0.1, 0.9, 0} "Volumetric fraction of the components"; Real flowVSP( unit="L3.t-1", start=flowVSPInitial) "Setpoint of the volumetric flow"; Real tempSP( unit="T", start=tempSPInitial) "Setpoint of the flow temperature"; Real fractVSP[nComp]( unit="", start=fractVSPInitial) "Volumetric fraction of the components"; outer parameter Boolean Ejs = false "Global parameter - Runtime interactivity"; outer parameter Boolean Sysquake = false "Global parameter - Batch interactivity"; equation totalVolFSP = flowVSP; volFractSP = fractVSP; tempFSP = tempSP; if (Ejs) then // Interactive variables der(flowVSP) = 0; der(tempSP) = 0; der(fractVSP) = zeros(size(fractVSP,1)); end if; if (Sysquake) then end if; end sourceLiqCntrl;
Class modeling the temperature source. This class inherits from heat.sourceTempB. The interactive variables of the model are shown in Table 1.
Table 1. Interactive variables.tempHeat | Heater temperature. |
tempCool | Chiller temperature. |
isHeater | 1: isHeater. |
isChiller | 1: isChiller. |
Type | Name | Default | Description |
---|---|---|---|
Integer | nComp | 1 | Number of components |
Real | isHeaterInitial | 0 | 1: heater |
Real | isChillerInitial | 0 | 1: chiller |
Real | tempHeatInitial | 300 | Heater temperature [T] |
Real | tempCoolInitial | 300 | Chiller temperature [T] |
Real | tempOff | 300 | Off temperature [T] |
Boolean | Ejs | false | Global parameter - Runtime interactivity |
Boolean | Sysquake | false | Global parameter - Batch interactivity |
Type | Name | Description |
---|---|---|
cutHeatMC | inHeat | Connector for the heat conduction. |
model sourceOfTemp "Source of temperature" extends heat.sourceTempB; parameter Real isHeaterInitial = 0 "1: heater"; parameter Real isChillerInitial = 0 "1: chiller"; Real isHeater( start=isHeaterInitial) "1: heater"; Real isChiller( start=isChillerInitial) "1: chiller"; parameter Real tempHeatInitial( unit="T") = 300 "Heater temperature"; parameter Real tempCoolInitial( unit="T") = 300 "Chiller temperature"; parameter Real tempOff( unit="T") = 300 "Off temperature"; Real tempHeat( unit="T", start=tempHeatInitial, fixed=true) "Heater temperature"; Real tempCool( unit="T", start=tempCoolInitial, fixed=true) "Chiller temperature"; Real consumHeater( unit="", start=0, fixed=true) "Heater: normalized amount of fluid"; Real consumChiller( unit="", start=0, fixed=true) "Chiller: normalized amount of fluid"; outer parameter Boolean Ejs = false "Global parameter - Runtime interactivity"; outer parameter Boolean Sysquake = false "Global parameter - Batch interactivity"; equation // Interactive parameters if (Ejs) then der(tempHeat) = 0; der(tempCool) = 0; der(isHeater) = 0; der(isChiller) = 0; end if; if (Sysquake) then end if; // Source temperature sourceTemp = if isHeater > 0.5 then tempHeat else if isChiller > 0.5 then tempCool else tempOff; // Normalized amount of fluid der(consumHeater) = if isHeater > 0.5 then 1 else 0; der(consumChiller) = if isChiller > 0.5 then 1 else 0; end sourceOfTemp;
Class modeling the thermal resistor. This class inherits from heat.resistThermB. The interactive variables of the model are shown in Table 1.
Table 1. Interactive variables.hTSteam | Heat transfer coefficient of the steam. |
hTWater | Heat transfer coefficient of the water. |
isHeater | 1: isHeater. |
isChiller | 1: isChiller. |
heatExchArea | Heat-exchanger area. |
Type | Name | Default | Description |
---|---|---|---|
Integer | nCompI | 1 | Number of components of inHeat |
Integer | nCompO | 1 | Number of components of outHeat |
Boolean | Ejs | false | Global parameter - Runtime interactivity |
Boolean | Sysquake | false | Global parameter - Batch interactivity |
Real | eps | 1.E-10 | Small parameter to avoid by-zero division [T.M-1.L-2.t3] |
Real | RthOff | 1E20 | Off thermal resistance [T.M-1.L-2.t3] |
Real | heatExchAreaInitial | 3.3 | Exchanger area [L2] |
Real | hTSteamInitial | Heat transfer coefficient | |
Real | hTWaterInitial | Heat transfer coefficient | |
Real | isHeaterInitial | 0 | 1: heater |
Real | isChillerInitial | 0 | 1: chiller |
Type | Name | Description |
---|---|---|
cutHeatMR | inHeat | Heat flow |
cutHeatMR | outHeat | Heat flow |
model thermalResist "Thermal resistor" extends heat.resistThermB; parameter Real RthOff( unit="T.M-1.L-2.t3") = 1E20 "Off thermal resistance"; Real RthHeater( unit="T.M-1.L-2.t3") "Thermal resistance of the heater"; Real RthCooler( unit="T.M-1.L-2.t3") "Thermal resistance of the chiller"; parameter Real heatExchAreaInitial( unit="L2") = 3.3 "Exchanger area"; parameter Real hTSteamInitial "Heat transfer coefficient"; parameter Real hTWaterInitial "Heat transfer coefficient"; parameter Real isHeaterInitial = 0 "1: heater"; parameter Real isChillerInitial = 0 "1: chiller"; // Interactive variables Real isHeater( start=isHeaterInitial) "1: heater"; Real isChiller( start=isChillerInitial) "1: chiller"; Real hTSteam( start=hTSteamInitial, fixed=true); Real hTWater( start=hTWaterInitial, fixed=true); Real heatExchArea( start=heatExchAreaInitial, fixed=true, unit="L2") "Exchanger area"; equation // Interactive variables if (Ejs) then der(hTSteam) = 0; der(hTWater) = 0; der(isHeater) = 0; der(isChiller) = 0; der(heatExchArea) = 0; end if; if (Sysquake) then hTSteam = hTSteamInitial; hTWater = hTWaterInitial; heatExchArea = heatExchAreaInitial; end if; // Thermal resistance Rtherm = if isHeater > 0.5 then RthHeater else if isChiller > 0.5 then RthCooler else RthOff; RthHeater = 1/(heatExchArea*hTSteam+1e-10); RthCooler = 1/(heatExchArea*hTWater+1e-10); end thermalResist;