Model { Name "GDLModel" Version 6.5 MdlSubVersion 0 GraphicalInterface { NumRootInports 16 Inport { SignalName "P_CA_IN" Name "P_CA_IN" } Inport { SignalName "T_CA_IN" Name "T_CA_IN" } Inport { SignalName "RH_CA_IN" Name "RH_CA_IN" } Inport { SignalName "P_AN_IN" Name "P_AN_IN" } Inport { SignalName "T_AN_IN" Name "T_AN_IN" } Inport { Name "RH_AN_IN" } Inport { SignalName "P_CA_OUT" Name "P_CA_OUT" } Inport { SignalName "T_CA_OUT" Name "T_CA_OUT" } Inport { Name "RH_CA_OUT" } Inport { SignalName "P_AN_OUT" Name "P_AN_OUT" } Inport { SignalName "T_AN_OUT" Name "T_AN_OUT" } Inport { Name "RH_AN_OUT" } Inport { SignalName "W_a_CA_IN" Name "W_a_CA_IN" } Inport { SignalName "I_st" Name "I_st" } Inport { SignalName "T_st" Name "T_st" } Inport { SignalName "Purge" Name "Purge State" } NumRootOutports 3 Outport { BusObject "" BusOutputAsStruct "off" Name "Voltage" } Outport { BusObject "" BusOutputAsStruct "off" Name "Voltage_inputs" } Outport { BusObject "" BusOutputAsStruct "off" Name "s_ca" } ParameterArgumentNames "" ComputedModelVersion "1.1992" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "UTF-8" SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines on ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip on BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Sun Dec 23 23:36:04 2001" Creator "Jay Tawee Pukrushpan" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Admin" ModifiedDateFormat "%" LastModifiedDate "Wed Jul 18 12:38:29 2007" ModelVersionFormat "1.%" ConfigurationManager "none" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on ExtModeBatchMode off ExtModeEnableFloating on ExtModeTrigType "manual" ExtModeTrigMode "oneshot" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigDurationFloating "auto" ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect off ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock off BufferReuse on ProdHWDeviceType "32-bit Generic" ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 3 Simulink.ConfigSet { $ObjectID 1 Version "1.2.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 2 Version "1.2.0" StartTime "0" StopTime "944" AbsTol "auto" FixedStep "1e-3" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "10000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "0.05" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "auto" SolverMode "Auto" Solver "ode15s" SolverName "ode15s" ZeroCrossControl "UseLocalSettings" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 3 Version "1.2.0" Decimation "1" ExternalInput "[tr, ur]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints off MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput off SaveState off SignalLogging off InspectSignalLogs off SaveTime off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "sigsOut" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Array { Type "Cell" Dimension 5 Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "InitFltsAndDblsToZero" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" PropName "DisabledProps" } Version "1.2.0" BlockReduction off BooleanDataType off ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnforceIntegerDowncast on ExpressionFolding on FoldNonRolledExpr on LocalBlockOutputs on ParameterPooling on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero on NoFixptDivByZeroProtection off EfficientFloat2IntCast off OptimizeModelRefInitCode off LifeSpan "inf" BufferReusableBoundary on } Simulink.DebuggingCC { $ObjectID 5 Version "1.2.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" CheckSSInitialOutputMsg on CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "TryResolveAllWithWarning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" SolverPrmCheckMsg "none" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "warning" MultiTaskCondExecSysMsg "none" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" ModelReferenceSimTargetVerbose off UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StrictBusMsg "None" } Simulink.HardwareCC { $ObjectID 6 Version "1.2.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "LittleEndian" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "MATLAB Host" TargetUnknown off ProdEqTarget off } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.2.0" UpdateModelReferenceTargets "Force" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 8 Array { Type "Cell" Dimension 1 Cell "IncludeHyperlinkInReport" PropName "DisabledProps" } Version "1.2.0" SystemTargetFile "grt.tlc" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on TemplateMakefile "grt_default_tmf" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ConfigAtBuild off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime on Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 9 Array { Type "Cell" Dimension 16 Cell "IgnoreCustomStorageClasses" Cell "InsertBlockDesc" Cell "SFDataObjDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InlinedPrmAccess" Cell "CustomSymbolStr" Cell "CustomSymbolStrGlobalVar" Cell "CustomSymbolStrType" Cell "CustomSymbolStrField" Cell "CustomSymbolStrFcn" Cell "CustomSymbolStrBlkIO" Cell "CustomSymbolStrTmpVar" Cell "CustomSymbolStrMacro" PropName "DisabledProps" } Version "1.2.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses on IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off PrefixModelToSubsysFcnNames on MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off SimulinkBlockComments on EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 10 Array { Type "Cell" Dimension 13 Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "SupportNonFinite" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" Cell "SupportNonInlinedSFcns" PropName "DisabledProps" } Version "1.2.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging on MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on EnableShiftOperators on ParenthesesLevel "Nominal" ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off GenerateASAP2 off } PropName "Components" } } PropName "Components" } Name "Configuration" SimulationMode "normal" CurrentDlgPage "Data Import//Export" } Simulink.ConfigSet { $ObjectID 11 Version "1.2.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 12 Version "1.2.0" StartTime "0" StopTime "944" AbsTol "auto" FixedStep "1e-3" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "10000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "100" RelTol "auto" SolverMode "Auto" Solver "ode23s" SolverName "ode23s" ZeroCrossControl "DisableAll" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Robust" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 13 Version "1.2.0" Decimation "1" ExternalInput "[tr, ur]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints off MaxDataPoints "1000" LoadExternalInput on LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput off SaveState off SignalLogging off InspectSignalLogs off SaveTime off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "sigsOut" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 14 Array { Type "Cell" Dimension 5 Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "InitFltsAndDblsToZero" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" PropName "DisabledProps" } Version "1.2.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnforceIntegerDowncast on ExpressionFolding on FoldNonRolledExpr on LocalBlockOutputs on ParameterPooling on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero on NoFixptDivByZeroProtection off EfficientFloat2IntCast off OptimizeModelRefInitCode off LifeSpan "inf" BufferReusableBoundary on } Simulink.DebuggingCC { $ObjectID 15 Version "1.2.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" CheckSSInitialOutputMsg on CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "TryResolveAllWithWarning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "warning" SolverPrmCheckMsg "none" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "warning" MultiTaskCondExecSysMsg "none" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" ModelReferenceSimTargetVerbose off UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StrictBusMsg "None" } Simulink.HardwareCC { $ObjectID 16 Version "1.2.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "LittleEndian" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "MATLAB Host" TargetUnknown off ProdEqTarget off } Simulink.ModelReferenceCC { $ObjectID 17 Version "1.2.0" UpdateModelReferenceTargets "Force" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 18 Array { Type "Cell" Dimension 1 Cell "IncludeHyperlinkInReport" PropName "DisabledProps" } Version "1.2.0" SystemTargetFile "grt.tlc" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on TemplateMakefile "grt_default_tmf" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ConfigAtBuild off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime on Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 19 Array { Type "Cell" Dimension 16 Cell "IgnoreCustomStorageClasses" Cell "InsertBlockDesc" Cell "SFDataObjDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InlinedPrmAccess" Cell "CustomSymbolStr" Cell "CustomSymbolStrGlobalVar" Cell "CustomSymbolStrType" Cell "CustomSymbolStrField" Cell "CustomSymbolStrFcn" Cell "CustomSymbolStrBlkIO" Cell "CustomSymbolStrTmpVar" Cell "CustomSymbolStrMacro" PropName "DisabledProps" } Version "1.2.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses on IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off PrefixModelToSubsysFcnNames on MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off SimulinkBlockComments on EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 20 Array { Type "Cell" Dimension 15 Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlComp" "liant" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "SupportNonFinite" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" Cell "SupportNonInlinedSFcns" Cell "PortableWordSizes" PropName "DisabledProps" } Version "1.2.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging on MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on EnableShiftOperators on ParenthesesLevel "Nominal" ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off GenerateASAP2 off } PropName "Components" } } PropName "Components" } Name "Tmp_ConfigSet_0" SimulationMode "normal" CurrentDlgPage "Solver" } Simulink.ConfigSet { $ObjectID 21 Version "1.2.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 22 Version "1.2.0" StartTime "0" StopTime "994" AbsTol "auto" FixedStep "1e-3" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "10000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "100" RelTol "auto" SolverMode "Auto" Solver "ode23s" SolverName "ode23s" ZeroCrossControl "UseLocalSettings" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Robust" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 23 Version "1.2.0" Decimation "1" ExternalInput "[tr, ur]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints off MaxDataPoints "1000" LoadExternalInput on LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput off SaveState off SignalLogging off InspectSignalLogs off SaveTime off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "sigsOut" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 24 Array { Type "Cell" Dimension 5 Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "InitFltsAndDblsToZero" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" PropName "DisabledProps" } Version "1.2.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnforceIntegerDowncast on ExpressionFolding on FoldNonRolledExpr on LocalBlockOutputs on ParameterPooling on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero on NoFixptDivByZeroProtection off EfficientFloat2IntCast off OptimizeModelRefInitCode off LifeSpan "inf" BufferReusableBoundary on } Simulink.DebuggingCC { $ObjectID 25 Version "1.2.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" CheckSSInitialOutputMsg on CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "TryResolveAllWithWarning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "warning" SolverPrmCheckMsg "none" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "warning" MultiTaskCondExecSysMsg "none" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" ModelReferenceSimTargetVerbose off UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StrictBusMsg "None" } Simulink.HardwareCC { $ObjectID 26 Version "1.2.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "LittleEndian" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "MATLAB Host" TargetUnknown off ProdEqTarget off } Simulink.ModelReferenceCC { $ObjectID 27 Version "1.2.0" UpdateModelReferenceTargets "Force" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 28 Array { Type "Cell" Dimension 1 Cell "IncludeHyperlinkInReport" PropName "DisabledProps" } Version "1.2.0" SystemTargetFile "grt.tlc" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on TemplateMakefile "grt_default_tmf" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ConfigAtBuild off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime on Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 29 Array { Type "Cell" Dimension 16 Cell "IgnoreCustomStorageClasses" Cell "InsertBlockDesc" Cell "SFDataObjDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InlinedPrmAccess" Cell "CustomSymbolStr" Cell "CustomSymbolStrGlobalVar" Cell "CustomSymbolStrType" Cell "CustomSymbolStrField" Cell "CustomSymbolStrFcn" Cell "CustomSymbolStrBlkIO" Cell "CustomSymbolStrTmpVar" Cell "CustomSymbolStrMacro" PropName "DisabledProps" } Version "1.2.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses on IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off PrefixModelToSubsysFcnNames on MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off SimulinkBlockComments on EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 30 Array { Type "Cell" Dimension 15 Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlComp" "liant" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "SupportNonFinite" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" Cell "SupportNonInlinedSFcns" Cell "PortableWordSizes" PropName "DisabledProps" } Version "1.2.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging on MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on EnableShiftOperators on ParenthesesLevel "Nominal" ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off GenerateASAP2 off } PropName "Components" } } PropName "Components" } Name "Tmp_ConfigSet_1" SimulationMode "normal" CurrentDlgPage "Solver" } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 21 } BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Clock DisplayTime off } Block { BlockType Constant } Block { BlockType Demux Outputs "4" DisplayOption "none" BusSelectionMode off } Block { BlockType Display Format "short" Decimation "10" Floating off SampleTime "-1" } Block { BlockType From IconDisplay "Tag" } Block { BlockType Fcn Expr "sin(u[1])" SampleTime "-1" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParameterDataTypeMode "Same as input" ParameterDataType "sfix(16)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "2^0" OutDataTypeMode "Same as input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Goto IconDisplay "Tag" } Block { BlockType Inport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" LatchByDelayingOutsideSignal off LatchByCopyingInsideSignal off Interpolate on } Block { BlockType Integrator ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" IgnoreLimit off ZeroCross on } Block { BlockType Math Operator "exp" OutputSignalType "auto" SampleTime "-1" OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType MinMax Function "min" Inputs "1" InputSameDT on OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on SampleTime "-1" } Block { BlockType Mux Inputs "4" DisplayOption "none" UseBusObject off BusObject "BusObject" NonVirtualBus off } Block { BlockType Outport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Saturate UpperLimit "0.5" LowerLimit "-0.5" LinearizeAsGain on ZeroCross on SampleTime "-1" } Block { BlockType Scope ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "-1" } Block { BlockType SubSystem ShowPortLabels on Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Switch Criteria "u2 >= Threshold" Threshold "0" InputSameDT on OutDataTypeMode "Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on SampleTime "-1" } Block { BlockType Terminator } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" FixptAsFi off } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "GDLModel" Location [197, 99, 1076, 750] Open on ModelBrowserVisibility off ModelBrowserWidth 212 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType Inport Name "P_CA_IN" Position [95, 428, 125, 442] IconDisplay "Port number" Port { PortNumber 1 Name "P_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "T_CA_IN" Position [95, 458, 125, 472] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "T_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "RH_CA_IN" Position [95, 488, 125, 502] Port "3" IconDisplay "Port number" Port { PortNumber 1 Name "RH_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "P_AN_IN" Position [115, 33, 145, 47] Port "4" IconDisplay "Port number" Port { PortNumber 1 Name "P_AN_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "T_AN_IN" Position [115, 63, 145, 77] Port "5" IconDisplay "Port number" Port { PortNumber 1 Name "T_AN_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "RH_AN_IN" Position [115, 93, 145, 107] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "P_CA_OUT" Position [95, 548, 125, 562] Port "7" IconDisplay "Port number" Port { PortNumber 1 Name "P_CA_OUT" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "T_CA_OUT" Position [95, 578, 125, 592] Port "8" IconDisplay "Port number" Port { PortNumber 1 Name "T_CA_OUT" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "RH_CA_OUT" Position [105, 663, 135, 677] ForegroundColor "gray" Port "9" IconDisplay "Port number" } Block { BlockType Inport Name "P_AN_OUT" Position [115, 153, 145, 167] Port "10" IconDisplay "Port number" Port { PortNumber 1 Name "P_AN_OUT" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "T_AN_OUT" Position [115, 183, 145, 197] Port "11" IconDisplay "Port number" Port { PortNumber 1 Name "T_AN_OUT" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "RH_AN_OUT" Position [105, 703, 135, 717] ForegroundColor "gray" Port "12" IconDisplay "Port number" } Block { BlockType Inport Name "W_a_CA_IN" Position [95, 518, 125, 532] Port "13" IconDisplay "Port number" Port { PortNumber 1 Name "W_a_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "I_st" Position [75, 343, 105, 357] Port "14" IconDisplay "Port number" Port { PortNumber 1 Name "I_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "T_st" Position [20, 378, 50, 392] ForegroundColor "blue" Port "15" IconDisplay "Port number" Port { PortNumber 1 Name "T_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "Purge State" Position [115, 123, 145, 137] Port "16" IconDisplay "Port number" Interpolate off Port { PortNumber 1 Name "Purge" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Anode" Ports [4, 2] Position [370, 117, 485, 188] ForegroundColor "red" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Anode" Location [130, 474, 1149, 844] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Anode Inputs" Position [40, 38, 70, 52] IconDisplay "Port number" } Block { BlockType Inport Name "Tst" Position [690, 258, 720, 272] ForegroundColor "blue" Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "W,H2,rct" Position [690, 188, 720, 202] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Wv,mb" Position [690, 223, 720, 237] Port "4" IconDisplay "Port number" } Block { BlockType Terminator Name " 1" Position [290, 245, 310, 265] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name " 2" Position [275, 185, 295, 205] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name " 3" Position [300, 165, 320, 185] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name " 4" Position [290, 285, 310, 305] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType SubSystem Name "Anode Channel" Ports [3, 2] Position [130, 34, 280, 96] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Anode Channel" Location [223, 74, 1146, 536] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Anode Inputs" Position [20, 103, 50, 117] ForegroundColor "orange" IconDisplay "Port number" } Block { BlockType Inport Name "W_L+v_an,GDL,CH" Position [335, 198, 365, 212] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "W_H2_an,GDL,CH" Position [340, 158, 370, 172] Port "3" IconDisplay "Port number" } Block { BlockType Constant Name "Constant4" Position [785, 341, 810, 359] Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Demux Name "Demux" Ports [1, 7] Position [105, 26, 110, 194] ForegroundColor "orange" BackgroundColor "black" ShowName off Outputs "7" DisplayOption "bar" Port { PortNumber 1 Name "P,an,in" PropagatedSignals "P_AN_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "T_AN_IN" PropagatedSignals "T_AN_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "RH_AN_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Purge_STATE" PropagatedSignals "Purge" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "P_AN_OUT" PropagatedSignals "P_AN_OUT" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "T_AN_OUT" PropagatedSignals "T_AN_OUT" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "T_ST" PropagatedSignals "T_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Goto Name "Goto1" Position [420, 55, 485, 85] ForegroundColor "magenta" GotoTag "W_H2_IN" TagVisibility "global" } Block { BlockType SubSystem Name "H2 Mass Balance, om" Ports [5, 3] Position [260, 316, 390, 424] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "H2 Mass Balance, om" Location [148, 501, 1049, 837] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "w_an" Position [675, 63, 705, 77] IconDisplay "Port number" } Block { BlockType Inport Name "p_an" Position [675, 123, 705, 137] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [20, 108, 50, 122] Port "3" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "T_ST" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "Purge_state" Position [630, 353, 660, 367] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "P_an,out" Position [630, 318, 660, 332] Port "5" IconDisplay "Port number" } Block { BlockType Product Name " 2" Ports [2, 1] Position [890, 122, 920, 153] Inputs "/*" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name " 4" Ports [2, 1] Position [510, 212, 540, 243] Inputs "/*" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name " 5" Ports [2, 1] Position [880, 312, 910, 343] Inputs "/*" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Constant1" Position [765, 120, 785, 140] NamePlacement "alternate" ShowName off Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "Humidity_Ratio_ch1" Position [565, 215, 595, 245] Gain "(VAPORMOLARMASS/HYDROGENMOLARMASS)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [185, 232, 190, 288] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux6" Ports [2, 1] Position [350, 252, 355, 308] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux7" Ports [2, 1] Position [375, 112, 380, 168] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "P,H2,an,om" Position [400, 125, 460, 155] Expr "u(1)*u(2)/HYDROGENMOLARMASS*R_G_U/F" "C_ANODE_VOLUME" } Block { BlockType Gain Name "Purge Valve" Position [720, 310, 750, 340] Gain "Purge_K" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Purgeflow" Ports [2, 1] Position [785, 317, 815, 348] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pv,om" Position [380, 265, 440, 295] Expr "u(1)*u(2)/VAPORMOLARMASS*R_G_U/FC_A" "NODE_OM_VOLUME" } Block { BlockType Sum Name "Sum10" Ports [2, 1] Position [30, 195, 50, 215] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum11" Ports [2, 1] Position [470, 270, 490, 290] ShowName off IconShape "round" Inputs "++|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum12" Ports [2, 1] Position [225, 115, 245, 135] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum13" Ports [2, 1] Position [710, 155, 730, 175] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [680, 315, 700, 335] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum7" Ports [2, 1] Position [805, 120, 825, 140] ShowName off IconShape "round" Inputs "++|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" Position [760, 65, 790, 95] InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType Gain Name "W_AN_OUT" Position [755, 150, 785, 180] Gain "FC_ANODE_OUTLET_FLOW_CONSTANT" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "W_v_AN_OUT" Ports [2, 1] Position [1000, 72, 1030, 103] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "W_v_AN_OUT1" Ports [2, 1] Position [952, 355, 983, 385] Orientation "down" NamePlacement "alternate" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType MinMax Name "m,v,an1" Ports [2, 1] Position [295, 197, 325, 228] Function "min" Inputs "2" InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "mH2,om" Ports [1, 1] Position [265, 110, 295, 140] ForegroundColor "red" InitialCondition "mH2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "mv,an,max1" Position [210, 245, 270, 275] Expr "u(1)/u(2)*VAPORMOLARMASS/R_G_U*FC_A" "NODE_OM_VOLUME" } Block { BlockType Integrator Name "mw,om" Ports [1, 1] Position [75, 190, 105, 220] ForegroundColor "blue" InitialCondition "mWIC_AN" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "sat_pressure" Position [105, 230, 165, 260] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u) )" } Block { BlockType Outport Name "W_v,an,out" Position [1065, 83, 1095, 97] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_h2,an,out" Position [1005, 133, 1035, 147] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "p_an,om" Position [730, 273, 760, 287] Port "3" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "P_an,out" SrcPort 1 DstBlock "Sum5" DstPort 2 } Line { Name "Tst" SrcBlock "T_st" SrcPort 1 Points [0, 50] Branch { Points [305, 0] DstBlock "Mux7" DstPort 2 } Branch { Points [0, 80] Branch { DstBlock "sat_pressure" DstPort 1 } Branch { Labels [1, 0] Points [0, 30] Branch { Points [0, 20] DstBlock "Mux6" DstPort 2 } Branch { DstBlock "Mux1" DstPort 2 } } } } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "mv,an,max1" DstPort 1 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "Purge Valve" DstPort 1 } Line { SrcBlock "Purge Valve" SrcPort 1 DstBlock "Purgeflow" DstPort 1 } Line { SrcBlock " 2" SrcPort 1 Points [0, 0] Branch { DstBlock "W_h2,an,out" DstPort 1 } Branch { Points [0, -45] Branch { DstBlock "W_v_AN_OUT" DstPort 2 } Branch { Points [0, -45; -735, 0; 0, 75] DstBlock "Sum12" DstPort 1 } } } Line { SrcBlock "Purge_state" SrcPort 1 Points [105, 0] DstBlock "Purgeflow" DstPort 2 } Line { SrcBlock "Purgeflow" SrcPort 1 DstBlock " 5" DstPort 2 } Line { SrcBlock "mw,om" SrcPort 1 DstBlock "m,v,an1" DstPort 1 } Line { SrcBlock "m,v,an1" SrcPort 1 Points [5, 0] DstBlock "Mux6" DstPort 1 } Line { SrcBlock "Mux6" SrcPort 1 DstBlock "Pv,om" DstPort 1 } Line { SrcBlock "Sum10" SrcPort 1 DstBlock "mw,om" DstPort 1 } Line { SrcBlock "mH2,om" SrcPort 1 DstBlock "Mux7" DstPort 1 } Line { SrcBlock "Mux7" SrcPort 1 DstBlock "P,H2,an,om" DstPort 1 } Line { SrcBlock "Sum12" SrcPort 1 DstBlock "mH2,om" DstPort 1 } Line { SrcBlock "Pv,om" SrcPort 1 Points [10, 0] Branch { DstBlock "Sum11" DstPort 2 } Branch { Points [0, -45] DstBlock " 4" DstPort 2 } } Line { SrcBlock "P,H2,an,om" SrcPort 1 Points [15, 0; -10, 80; 0, 0] Branch { DstBlock "Sum11" DstPort 1 } Branch { DstBlock " 4" DstPort 1 } } Line { SrcBlock "Sum13" SrcPort 1 Points [5, 0] Branch { DstBlock "W_AN_OUT" DstPort 1 } Branch { Points [0, -85] DstBlock "Switch" DstPort 2 } } Line { SrcBlock "W_AN_OUT" SrcPort 1 Points [45, 0; 0, -20] DstBlock " 2" DstPort 2 } Line { SrcBlock " 4" SrcPort 1 DstBlock "Humidity_Ratio_ch1" DstPort 1 } Line { SrcBlock "Humidity_Ratio_ch1" SrcPort 1 Points [10, 0; 0, -140] DstBlock "Switch" DstPort 3 } Line { SrcBlock "mv,an,max1" SrcPort 1 Points [5, 0] DstBlock "m,v,an1" DstPort 2 } Line { SrcBlock " 5" SrcPort 1 Points [15, 0] Branch { Points [30, 0] DstBlock "W_v_AN_OUT1" DstPort 1 } Branch { Points [0, 55; -695, 0] DstBlock "Sum12" DstPort 2 } } Line { SrcBlock "W_v_AN_OUT1" SrcPort 1 Points [0, 5; -965, 0; 0, -190] DstBlock "Sum10" DstPort 2 } Line { SrcBlock "sat_pressure" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Sum11" SrcPort 1 Points [195, 0] Branch { DstBlock "Sum5" DstPort 1 } Branch { Points [0, -115] DstBlock "Sum13" DstPort 2 } Branch { DstBlock "p_an,om" DstPort 1 } } Line { SrcBlock "Sum7" SrcPort 1 Points [35, 0] Branch { DstBlock " 5" DstPort 1 } Branch { DstBlock " 2" DstPort 1 } } Line { SrcBlock "p_an" SrcPort 1 Points [10, 0] DstBlock "Sum13" DstPort 1 } Line { SrcBlock "w_an" SrcPort 1 DstBlock "Switch" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Sum7" DstPort 2 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { DstBlock "Sum7" DstPort 1 } Branch { Points [160, 0] Branch { DstBlock "W_v_AN_OUT" DstPort 1 } Branch { DstBlock "W_v_AN_OUT1" DstPort 2 } } } Line { SrcBlock "W_v_AN_OUT" SrcPort 1 Points [10, 0] Branch { DstBlock "W_v,an,out" DstPort 1 } Branch { Points [0, -80; -1035, 0; 0, 170] DstBlock "Sum10" DstPort 1 } } } } Block { BlockType SubSystem Name "Inlet Conditions" Ports [4, 2] Position [270, 28, 380, 102] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Inlet Conditions" Location [108, 713, 1116, 982] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "P_an,in" Position [25, 118, 55, 132] IconDisplay "Port number" } Block { BlockType Inport Name "T_an,in" Position [25, 23, 55, 37] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "T_AN_IN" PropagatedSignals "T_AN_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "RH_an,in" Position [25, 63, 55, 77] Port "3" IconDisplay "Port number" Port { PortNumber 1 Name "RH_AN_IN" PropagatedSignals "RH_AN_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "P_an" Position [500, 108, 530, 122] Port "4" IconDisplay "Port number" } Block { BlockType Product Name " 1" Ports [2, 1] Position [345, 102, 375, 133] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name " 3" Ports [2, 1] Position [880, 112, 910, 143] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Constant2" Position [810, 155, 840, 185] Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "Humidity_Ratio_AN_in" Position [415, 105, 445, 135] Gain "(VAPORMOLARMASS/HYDROGENMOLARMASS)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P,v,an,in" Ports [2, 1] Position [240, 22, 270, 53] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [540, 80, 560, 100] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum6" Ports [2, 1] Position [285, 115, 305, 135] ShowName off IconShape "round" Inputs "-+|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum8" Ports [2, 1] Position [845, 125, 865, 145] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "W,v,an,in" Ports [2, 1] Position [590, 147, 620, 178] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "W_AN_IN" Position [710, 75, 740, 105] Gain "FC_ANODE_INLET_FLOW_CONSTANT" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure1" Position [150, 15, 210, 45] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u) )" } Block { BlockType Outport Name "W_h2,an,in" Position [940, 123, 970, 137] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_v,an,in" Position [660, 158, 690, 172] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { Name "T_AN_IN" Labels [0, 0] SrcBlock "T_an,in" SrcPort 1 DstBlock "sat_pressure1" DstPort 1 } Line { Name "RH_AN_IN" Labels [0, 0] SrcBlock "RH_an,in" SrcPort 1 Points [165, 0] DstBlock "P,v,an,in" DstPort 2 } Line { SrcBlock "P,v,an,in" SrcPort 1 Points [20, 0] Branch { DstBlock "Sum6" DstPort 1 } Branch { Points [35, 0] DstBlock " 1" DstPort 1 } } Line { SrcBlock "sat_pressure1" SrcPort 1 DstBlock "P,v,an,in" DstPort 1 } Line { SrcBlock "P_an,in" SrcPort 1 Points [200, 0] Branch { DstBlock "Sum6" DstPort 2 } Branch { Points [0, -35] DstBlock "Sum2" DstPort 1 } } Line { SrcBlock "Sum6" SrcPort 1 DstBlock " 1" DstPort 2 } Line { SrcBlock " 1" SrcPort 1 DstBlock "Humidity_Ratio_AN_in" DstPort 1 } Line { SrcBlock "Humidity_Ratio_AN_in" SrcPort 1 Points [45, 0; 0, 15] Branch { Points [0, 20] DstBlock "W,v,an,in" DstPort 1 } Branch { DstBlock "Sum8" DstPort 1 } } Line { SrcBlock "W,v,an,in" SrcPort 1 DstBlock "W_v,an,in" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "W_AN_IN" DstPort 1 } Line { SrcBlock "Constant2" SrcPort 1 Points [10, 0] DstBlock "Sum8" DstPort 2 } Line { SrcBlock "W_AN_IN" SrcPort 1 Points [70, 0; 0, 30] DstBlock " 3" DstPort 1 } Line { SrcBlock "Sum8" SrcPort 1 DstBlock " 3" DstPort 2 } Line { SrcBlock "P_an" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { SrcBlock " 3" SrcPort 1 Points [0, 0] Branch { DstBlock "W_h2,an,in" DstPort 1 } Branch { Points [0, 90; -355, 0; 0, -50] DstBlock "W,v,an,in" DstPort 2 } } } } Block { BlockType SubSystem Name "Mass Balance, ch" Ports [7, 7] Position [430, 110, 560, 260] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 4 Name "P_AN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Mass Balance, ch" Location [182, 419, 1151, 831] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_h2_in" Position [35, 83, 65, 97] IconDisplay "Port number" } Block { BlockType Inport Name "W_v,an,in" Position [140, 188, 170, 202] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "W_H2_an,GDL,CH" Position [40, 48, 70, 62] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [35, 158, 65, 172] Port "4" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "T_ST" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "W_L+v_an,GDL,CH" Position [140, 223, 170, 237] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "W_v,an,out" Position [140, 258, 170, 272] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "W_h2_out" Position [35, 118, 65, 132] Port "7" IconDisplay "Port number" } Block { BlockType Product Name " " Ports [2, 1] Position [750, 112, 780, 143] Inputs "/*" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Constant" Position [335, 345, 365, 375] Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "Humidity_Ratio_ch" Position [825, 115, 855, 145] Gain "(VAPORMOLARMASS/HYDROGENMOLARMASS)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [235, 307, 240, 363] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [2, 1] Position [600, 302, 605, 358] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux3" Ports [2, 1] Position [290, 100, 295, 135] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "P,H2,an" Position [340, 125, 400, 155] Expr "u(1)*u(2)/HYDROGENMOLARMASS*R_G_U/F" "C_ANODE_VOLUME" } Block { BlockType Fcn Name "Pv,an" Position [640, 295, 700, 325] Expr "u(1)*u(2)/VAPORMOLARMASS*R_G_U/FC_A" "NODE_VOLUME" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [400, 335, 420, 355] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [790, 190, 810, 210] ShowName off IconShape "round" Inputs "++|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [3, 1] Position [210, 220, 230, 240] ShowName off IconShape "round" Inputs "+--" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [3, 1] Position [165, 70, 185, 90] ShowName off IconShape "round" Inputs "-+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "c,H2,an" Position [340, 70, 400, 100] Expr "u(1)/HYDROGENMOLARMASS/FC_ANODE_VOL" "UME" } Block { BlockType Fcn Name "cv,an" Position [640, 345, 700, 375] Expr "u(1)/VAPORMOLARMASS/FC_ANODE_VOLUME" } Block { BlockType MinMax Name "m,l,an " Ports [2, 1] Position [440, 337, 470, 368] Function "max" Inputs "2" InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType MinMax Name "m,v,an" Ports [2, 1] Position [440, 267, 470, 298] Function "min" Inputs "2" InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "mH2" Ports [1, 1] Position [210, 65, 240, 95] ForegroundColor "red" InitialCondition "mH2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "mv,an,max" Position [270, 320, 330, 350] Expr "u(1)/u(2)*VAPORMOLARMASS/R_G_U*FC_A" "NODE_VOLUME" } Block { BlockType Integrator Name "mw" Ports [1, 1] Position [260, 215, 290, 245] ForegroundColor "blue" InitialCondition "mWIC_AN" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off Port { PortNumber 1 Name "m_w,an" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "sat_pressure" Position [130, 305, 190, 335] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u) )" } Block { BlockType Outport Name "c_h2,an" Position [440, 78, 470, 92] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "c_v,an" Position [730, 353, 760, 367] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "m_l,an" Position [510, 348, 540, 362] Port "3" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "p_an" Position [840, 193, 870, 207] Port "4" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "p_h2,an" Position [435, 133, 465, 147] Port "5" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "p_v,an" Position [730, 303, 760, 317] Port "6" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "w_an" Position [900, 123, 930, 137] Port "7" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Mux3" SrcPort 1 Points [15, 0] Branch { Points [0, 20] DstBlock "P,H2,an" DstPort 1 } Branch { Points [0, -35] DstBlock "c,H2,an" DstPort 1 } } Line { SrcBlock "c,H2,an" SrcPort 1 DstBlock "c_h2,an" DstPort 1 } Line { SrcBlock "P,H2,an" SrcPort 1 Points [5, 0] Branch { DstBlock "p_h2,an" DstPort 1 } Branch { Points [0, 35] DstBlock "Sum1" DstPort 1 } Branch { Points [0, -20] DstBlock " " DstPort 1 } } Line { SrcBlock "mH2" SrcPort 1 Points [10, 0; 0, 30] DstBlock "Mux3" DstPort 1 } Line { Name "Tst" Labels [0, 0] SrcBlock "T_st" SrcPort 1 Points [15, 0] Branch { Labels [1, 0] Points [170, 0; 0, -40] DstBlock "Mux3" DstPort 2 } Branch { Labels [1, 0] Points [0, 185] Branch { Points [0, -30] DstBlock "sat_pressure" DstPort 1 } Branch { Points [0, 0] Branch { DstBlock "Mux1" DstPort 2 } Branch { Points [0, 45; 490, 0; 0, -50] DstBlock "Mux2" DstPort 2 } } } } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "mH2" DstPort 1 } Line { SrcBlock "W_H2_an,GDL,CH" SrcPort 1 DstBlock "Sum4" DstPort 1 } Line { SrcBlock "W_h2_in" SrcPort 1 Points [30, 0; 0, -10] DstBlock "Sum4" DstPort 2 } Line { SrcBlock "W_h2_out" SrcPort 1 Points [105, 0] DstBlock "Sum4" DstPort 3 } Line { SrcBlock "mv,an,max" SrcPort 1 Points [45, 0] Branch { Points [0, -45] DstBlock "m,v,an" DstPort 2 } Branch { Points [0, 10] DstBlock "Sum" DstPort 2 } } Line { SrcBlock "Constant" SrcPort 1 DstBlock "m,l,an " DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "m,l,an " DstPort 1 } Line { SrcBlock "sat_pressure" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "m,l,an " SrcPort 1 DstBlock "m_l,an" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "mv,an,max" DstPort 1 } Line { SrcBlock "Mux2" SrcPort 1 Points [10, 0] Branch { Points [0, -20] DstBlock "Pv,an" DstPort 1 } Branch { Points [0, 30] DstBlock "cv,an" DstPort 1 } } Line { SrcBlock "m,v,an" SrcPort 1 Points [55, 0; 0, 30] DstBlock "Mux2" DstPort 1 } Line { SrcBlock "Pv,an" SrcPort 1 Points [0, 0] Branch { Points [0, 0] DstBlock "p_v,an" DstPort 1 } Branch { Points [0, -110] Branch { DstBlock "Sum1" DstPort 2 } Branch { Points [0, -65] DstBlock " " DstPort 2 } } } Line { SrcBlock "cv,an" SrcPort 1 DstBlock "c_v,an" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "p_an" DstPort 1 } Line { SrcBlock " " SrcPort 1 DstBlock "Humidity_Ratio_ch" DstPort 1 } Line { SrcBlock "Humidity_Ratio_ch" SrcPort 1 DstBlock "w_an" DstPort 1 } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "mw" DstPort 1 } Line { Name "m_w,an" Labels [1, 0] SrcBlock "mw" SrcPort 1 Points [115, 0; 0, 20] Branch { DstBlock "m,v,an" DstPort 1 } Branch { DstBlock "Sum" DstPort 1 } } Line { SrcBlock "W_L+v_an,GDL,CH" SrcPort 1 DstBlock "Sum3" DstPort 2 } Line { SrcBlock "W_v,an,in" SrcPort 1 Points [45, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "W_v,an,out" SrcPort 1 Points [45, 0] DstBlock "Sum3" DstPort 3 } } } Block { BlockType Mux Name "Mux4" Ports [4, 1] Position [630, 284, 635, 341] ShowName off DisplayOption "bar" } Block { BlockType Mux Name "Mux5" Ports [4, 1] Position [835, 298, 840, 357] ShowName off DisplayOption "bar" } Block { BlockType Terminator Name "T_AN_OUT" Position [150, 150, 170, 170] ShowName off } Block { BlockType ToWorkspace Name "To Workspace1" Position [430, 357, 590, 383] ForegroundColor "lightBlue" ShowName off VariableName "WH2_AN_OUT_CALCULATED" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace2" Position [655, 302, 750, 328] ForegroundColor "lightBlue" ShowName off VariableName "ANODE_Pressure" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace5" Position [415, 16, 560, 44] ForegroundColor "lightBlue" ShowName off VariableName "WH2_AN_IN_CALCULATED" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType Outport Name "m,l,an" Position [580, 158, 610, 172] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Anode_ch" Position [870, 323, 900, 337] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Anode Inputs" SrcPort 1 DstBlock "Demux" DstPort 1 } Line { Name "P,an,in" Labels [1, 0] SrcBlock "Demux" SrcPort 1 DstBlock "Inlet Conditions" DstPort 1 } Line { Name "P_AN_OUT" Labels [0, 0] SrcBlock "Demux" SrcPort 5 Points [65, 0; 0, 275] DstBlock "H2 Mass Balance, om" DstPort 5 } Line { Name "T_AN_OUT" Labels [0, 0] SrcBlock "Demux" SrcPort 6 DstBlock "T_AN_OUT" DstPort 1 } Line { Name "T_ST" Labels [0, 0] SrcBlock "Demux" SrcPort 7 Points [45, 0] Branch { Points [-10, 185; 0, 0] Branch { Points [0, 75; 610, 0; 0, -110] DstBlock "Mux5" DstPort 3 } Branch { DstBlock "H2 Mass Balance, om" DstPort 3 } } Branch { DstBlock "Mass Balance, ch" DstPort 4 } } Line { SrcBlock "Mass Balance, ch" SrcPort 6 Points [25, 0; 0, 95] DstBlock "Mux4" DstPort 3 } Line { SrcBlock "Mass Balance, ch" SrcPort 5 Points [30, 0; 0, 100] DstBlock "Mux4" DstPort 2 } Line { SrcBlock "Mass Balance, ch" SrcPort 2 Points [205, 0; 0, 175] DstBlock "Mux5" DstPort 2 } Line { SrcBlock "Mass Balance, ch" SrcPort 1 Points [215, 0; 0, 180] DstBlock "Mux5" DstPort 1 } Line { SrcBlock "W_H2_an,GDL,CH" SrcPort 1 DstBlock "Mass Balance, ch" DstPort 3 } Line { SrcBlock "Mux5" SrcPort 1 DstBlock "Anode_ch" DstPort 1 } Line { SrcBlock "H2 Mass Balance, om" SrcPort 2 Points [15, 0] Branch { Points [0, -125] DstBlock "Mass Balance, ch" DstPort 7 } Branch { DstBlock "To Workspace1" DstPort 1 } } Line { Name "Purge_STATE" Labels [0, 0] SrcBlock "Demux" SrcPort 4 Points [80, 0; 0, 280] DstBlock "H2 Mass Balance, om" DstPort 4 } Line { SrcBlock "Mux4" SrcPort 1 DstBlock "To Workspace2" DstPort 1 } Line { SrcBlock "H2 Mass Balance, om" SrcPort 3 Points [200, 0; 0, -70] DstBlock "Mux4" DstPort 4 } Line { SrcBlock "Constant4" SrcPort 1 DstBlock "Mux5" DstPort 4 } Line { SrcBlock "Mass Balance, ch" SrcPort 3 DstBlock "m,l,an" DstPort 1 } Line { Name "P_AN" Labels [2, 0] SrcBlock "Mass Balance, ch" SrcPort 4 Points [45, 0; 0, 105] Branch { Points [-375, 0] Branch { Points [0, 60] DstBlock "H2 Mass Balance, om" DstPort 2 } Branch { Points [0, -195] DstBlock "Inlet Conditions" DstPort 4 } } Branch { DstBlock "Mux4" DstPort 1 } } Line { SrcBlock "W_L+v_an,GDL,CH" SrcPort 1 DstBlock "Mass Balance, ch" DstPort 5 } Line { Name "T_AN_IN" Labels [0, 0] SrcBlock "Demux" SrcPort 2 Points [140, 0] DstBlock "Inlet Conditions" DstPort 2 } Line { Name "RH_AN_IN" Labels [0, 0] SrcBlock "Demux" SrcPort 3 Points [85, 0; 0, -10] DstBlock "Inlet Conditions" DstPort 3 } Line { SrcBlock "Inlet Conditions" SrcPort 1 Points [15, 0] Branch { Points [0, 75] DstBlock "Mass Balance, ch" DstPort 1 } Branch { Points [0, 20] Branch { DstBlock "Goto1" DstPort 1 } Branch { Labels [1, 0] DstBlock "To Workspace5" DstPort 1 } } } Line { SrcBlock "Inlet Conditions" SrcPort 2 Points [0, 60] DstBlock "Mass Balance, ch" DstPort 2 } Line { SrcBlock "H2 Mass Balance, om" SrcPort 1 Points [5, 0; 0, -110] DstBlock "Mass Balance, ch" DstPort 6 } Line { SrcBlock "Mass Balance, ch" SrcPort 7 Points [5, 0; 0, 60; -325, 0] DstBlock "H2 Mass Balance, om" DstPort 1 } Annotation { Name "Anode Inputs \n1. P_an_in\n2. T_an_in\n" "3. RH_an_in\n4. PurgeState\n5. P_an_out\n6. T_an_out\n7. T_st" Position [20, 206] HorizontalAlignment "left" ForegroundColor "red" UseDisplayTextAsClickCallback off } Annotation { Name "ANODE_Pressure\n1. p_an,ch\n2. p_h2,ch" "\n3. p_v,an,ch\n4. p_an,om " Position [700, 263] ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType Demux Name "Demux" Ports [1, 7] Position [340, 166, 345, 304] Orientation "left" BackgroundColor "black" NamePlacement "alternate" ShowName off Outputs "7" DisplayOption "bar" } Block { BlockType SubSystem Name "GDL_Section 1" Ports [4, 1] Position [780, 90, 875, 155] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "GDL_Section 1" Location [219, 485, 1101, 986] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Anode_(k+1)" Position [15, 253, 45, 267] ForegroundColor "orange" IconDisplay "Port number" } Block { BlockType Inport Name "W,H2,rct" Position [110, 13, 140, 27] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Wv,mb" Position [205, 93, 235, 107] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Tst" Position [275, 208, 305, 222] Port "4" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "T_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Calc R_evap" Ports [3, 1] Position [545, 188, 625, 242] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Revap" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc R_evap" Location [362, 108, 943, 317] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "cv" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [35, 108, 65, 122] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "s_k" Position [35, 168, 65, 182] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " 5" Ports [2, 1] Position [145, 62, 175, 93] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Pv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [250, 72, 280, 103] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "No Evap" Position [360, 127, 380, 153] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "RGU" Position [75, 13, 110, 47] Gain "R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum7" Ports [2, 1] Position [205, 70, 225, 90] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" Position [470, 95, 500, 125] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Switch Name "Switch3" Position [400, 85, 430, 115] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Gain Name "gamma/R" Position [305, 75, 335, 105] Gain "0.9*Alg_V/R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure1" Position [170, 102, 205, 128] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "R_evap" Position [525, 103, 555, 117] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "Tst" SrcBlock "T_st" SrcPort 1 Points [25, 0] Branch { DstBlock "sat_pressure1" DstPort 1 } Branch { Points [0, 35; 140, 0] DstBlock "Divide" DstPort 2 } Branch { Points [0, -30] DstBlock " 5" DstPort 2 } } Line { SrcBlock "RGU" SrcPort 1 Points [0, 40] DstBlock " 5" DstPort 1 } Line { Name "Pv" Labels [0, 0] SrcBlock " 5" SrcPort 1 DstBlock "Sum7" DstPort 1 } Line { SrcBlock "Sum7" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { SrcBlock "sat_pressure1" SrcPort 1 Points [5, 0] DstBlock "Sum7" DstPort 2 } Line { SrcBlock "Divide" SrcPort 1 DstBlock "gamma/R" DstPort 1 } Line { SrcBlock "gamma/R" SrcPort 1 Points [35, 0] Branch { DstBlock "Switch3" DstPort 1 } Branch { Points [0, -25; 70, 0; 0, 45] Branch { DstBlock "Switch" DstPort 2 } Branch { Points [0, 10] DstBlock "Switch" DstPort 3 } } } Line { SrcBlock "No Evap" SrcPort 1 DstBlock "Switch3" DstPort 3 } Line { SrcBlock "Switch3" SrcPort 1 DstBlock "Switch" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 DstBlock "R_evap" DstPort 1 } Line { SrcBlock "cv" SrcPort 1 DstBlock "RGU" DstPort 1 } Line { SrcBlock "s_k" SrcPort 1 Points [280, 0; 0, -75] DstBlock "Switch3" DstPort 2 } } } Block { BlockType SubSystem Name "Calc W_H2" Ports [3, 2] Position [420, 13, 525, 67] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 2 Name "WH2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc W_H2" Location [210, 529, 1115, 784] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_h2(k-1)" Position [15, 113, 45, 127] IconDisplay "Port number" Port { PortNumber 1 Name "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "c_h2(k+1)" Position [15, 158, 45, 172] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_k" Position [15, 198, 45, 212] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " " Ports [2, 1] Position [520, 77, 550, 108] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "NH2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-1/dy" Position [415, 70, 445, 100] Gain "-1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "d/dy(ch2)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "Gain" Position [240, 70, 270, 100] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "H2_FlowtoFlux" Position [130, 103, 165, 137] Gain "1/GDL_AREA/HYDROGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "H2_FluxtoFlow" Position [680, 53, 715, 87] Gain "GDL_AREA*HYDROGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [195, 75, 215, 95] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [375, 75, 395, 95] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cH2" Ports [1, 1] Position [310, 70, 340, 100] ForegroundColor "red" InitialCondition "cH2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [380, 190, 440, 220] Expr "D_H2*GDL_POR*((GDL_POR-0.11)/(1-0.1" "1))^0.785*(1-u)^2" } Block { BlockType Outport Name "c_h2(k)" Position [775, 128, 805, 142] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_h2(k)" Position [765, 63, 795, 77] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "cH2" DstPort 1 } Line { SrcBlock "cH2" SrcPort 1 Points [10, 0] Branch { DstBlock "Sum1" DstPort 1 } Branch { Points [0, 50] DstBlock "c_h2(k)" DstPort 1 } } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "-1/dy" DstPort 1 } Line { Name "d/dy(ch2)" Labels [0, 0] SrcBlock "-1/dy" SrcPort 1 DstBlock " " DstPort 1 } Line { Name "NH2" Labels [1, 0] SrcBlock " " SrcPort 1 Points [105, 0; 0, -25] Branch { Labels [1, 0] Points [0, -15; -495, 0; 0, 30] DstBlock "Sum" DstPort 1 } Branch { DstBlock "H2_FluxtoFlow" DstPort 1 } } Line { SrcBlock "H2_FlowtoFlux" SrcPort 1 Points [35, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "H2_FluxtoFlow" SrcPort 1 DstBlock "W_h2(k)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [60, 0] DstBlock " " DstPort 2 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "c_h2(k+1)" SrcPort 1 Points [335, 0] DstBlock "Sum1" DstPort 2 } Line { Name "Tst" Labels [0, 0] SrcBlock "W_h2(k-1)" SrcPort 1 DstBlock "H2_FlowtoFlux" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wl" Ports [2, 1] Position [390, 419, 450, 461] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc Wl" Location [411, 158, 883, 299] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "s_k" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "s_k+1" Position [20, 73, 50, 87] Port "2" IconDisplay "Port number" } Block { BlockType Product Name " 6" Ports [2, 1] Position [365, 42, 395, 73] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain3" Position [295, 65, 325, 95] Gain "1/(delta_y)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "S" Position [70, 17, 110, 43] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S1" Position [85, 67, 125, 93] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S2" Position [285, 17, 325, 43] Expr "-GDL_AREA/H20_L_VISC*WATERDENSITY*K" "_PERM*u^3*(1.417-2*2.12*u+3*1.263*u^2)*(H20_SURF_T*0.5)/sqrt(K_PERM/GDL_POR)" } Block { BlockType Saturate Name "Saturation" Position [125, 15, 155, 45] UpperLimit "inf" LowerLimit "0" Port { PortNumber 1 Name "S(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Saturate Name "Saturation1" Position [150, 65, 180, 95] UpperLimit "inf" LowerLimit "0" Port { PortNumber 1 Name "S(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [240, 70, 260, 90] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Wl" Position [425, 53, 455, 67] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock " 6" SrcPort 1 DstBlock "Wl" DstPort 1 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "S" DstPort 1 } Line { SrcBlock "Gain3" SrcPort 1 Points [10, 0; 0, -15] DstBlock " 6" DstPort 2 } Line { SrcBlock "S2" SrcPort 1 Points [10, 0; 0, 20] DstBlock " 6" DstPort 1 } Line { Name "S(k)" Labels [0, 0] SrcBlock "Saturation" SrcPort 1 Points [90, 0] Branch { DstBlock "S2" DstPort 1 } Branch { DstBlock "Sum2" DstPort 1 } } Line { SrcBlock "S" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "Gain3" DstPort 1 } Line { SrcBlock "s_k+1" SrcPort 1 DstBlock "S1" DstPort 1 } Line { SrcBlock "S1" SrcPort 1 DstBlock "Saturation1" DstPort 1 } Line { Name "S(k+1)" Labels [0, 0] SrcBlock "Saturation1" SrcPort 1 DstBlock "Sum2" DstPort 2 } } } Block { BlockType SubSystem Name "Calc Wv_(k)" Ports [4, 2] Position [415, 93, 515, 152] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc Wv_(k)" Location [132, 74, 879, 357] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wv_(k-1)" Position [15, 38, 45, 52] IconDisplay "Port number" } Block { BlockType Inport Name "cv_(k+1)" Position [70, 183, 100, 197] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_(k)" Position [70, 218, 100, 232] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [70, 143, 100, 157] Port "4" IconDisplay "Port number" } Block { BlockType Product Name " 1" Ports [2, 1] Position [490, 107, 520, 138] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Nv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-1/dy" Position [380, 100, 410, 130] Gain "-1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain2" Position [180, 100, 210, 130] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [140, 105, 160, 125] ShowName off IconShape "round" Inputs "+|-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [335, 105, 355, 125] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [235, 105, 255, 125] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FlowtoFlux" Position [90, 28, 125, 62] Gain "1/GDL_AREA/VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FluxtoFlow" Position [620, 108, 655, 142] Gain "GDL_AREA*VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cv1" Ports [1, 1] Position [270, 100, 300, 130] ForegroundColor "blue" InitialCondition "cv_IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [250, 210, 310, 240] Expr "D_V*GDL_POR*((GDL_POR-0.11)/(1-0.11" "))^0.785*(1-u)^2" } Block { BlockType Outport Name "Wv_(k)" Position [700, 118, 730, 132] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "cv_(k)" Position [700, 53, 730, 67] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Gain2" DstPort 1 } Line { SrcBlock "cv1" SrcPort 1 Points [5, 0] Branch { DstBlock "Sum4" DstPort 1 } Branch { Points [0, -55] DstBlock "cv_(k)" DstPort 1 } } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "-1/dy" DstPort 1 } Line { Labels [0, 0] SrcBlock "-1/dy" SrcPort 1 DstBlock " 1" DstPort 1 } Line { Name "Nv" Labels [1, 0] SrcBlock " 1" SrcPort 1 Points [45, 0] Branch { Labels [1, 0] DstBlock "V_FluxtoFlow" DstPort 1 } Branch { Points [0, 45; -420, 0] DstBlock "Sum3" DstPort 2 } } Line { SrcBlock "Gain2" SrcPort 1 DstBlock "Sum5" DstPort 1 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "cv1" DstPort 1 } Line { SrcBlock "V_FluxtoFlow" SrcPort 1 DstBlock "Wv_(k)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [140, 0; 0, -95] DstBlock " 1" DstPort 2 } Line { SrcBlock "s_(k)" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "cv_(k+1)" SrcPort 1 Points [240, 0] DstBlock "Sum4" DstPort 2 } Line { SrcBlock "R_evap" SrcPort 1 Points [140, 0] DstBlock "Sum5" DstPort 2 } Line { SrcBlock "V_FlowtoFlux" SrcPort 1 Points [20, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Wv_(k-1)" SrcPort 1 DstBlock "V_FlowtoFlux" DstPort 1 } Annotation { Name "d/dy(cv)" Position [445, 107] UseDisplayTextAsClickCallback off } } } Block { BlockType Demux Name "Demux1" Ports [1, 7] Position [105, 183, 110, 337] ForegroundColor "orange" BackgroundColor "black" ShowName off Outputs "7" DisplayOption "bar" Port { PortNumber 1 Name "CH2_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CV (k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "WH2_(k+1)" PropagatedSignals "W_h2(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Wv_(k+1)" PropagatedSignals "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "s_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Wl_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Mass Balance" Ports [3, 1] Position [280, 334, 360, 386] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Mass Balance" Location [426, 344, 771, 525] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wl_k-1" Position [20, 13, 50, 27] IconDisplay "Port number" } Block { BlockType Inport Name "Wl_k" Position [20, 68, 50, 82] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [20, 118, 50, 132] Port "3" IconDisplay "Port number" } Block { BlockType Gain Name "1/(rho*Vp)" Position [165, 58, 180, 92] Gain "1/(WATERDENSITY*V_P)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Mv*Vp" Position [80, 110, 110, 140] Gain "VAPORMOLARMASS*V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum6" Ports [3, 1] Position [125, 65, 145, 85] ShowName off IconShape "round" Inputs "-+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "s" Ports [1, 1] Position [200, 60, 230, 90] ForegroundColor "green" InitialCondition "sIC1" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "s_k" Position [265, 68, 295, 82] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum6" SrcPort 1 DstBlock "1/(rho*Vp)" DstPort 1 } Line { SrcBlock "Mv*Vp" SrcPort 1 Points [20, 0] DstBlock "Sum6" DstPort 3 } Line { SrcBlock "1/(rho*Vp)" SrcPort 1 DstBlock "s" DstPort 1 } Line { SrcBlock "R_evap" SrcPort 1 DstBlock "Mv*Vp" DstPort 1 } Line { SrcBlock "Wl_k-1" SrcPort 1 Points [80, 0] DstBlock "Sum6" DstPort 1 } Line { SrcBlock "Wl_k" SrcPort 1 DstBlock "Sum6" DstPort 2 } Line { SrcBlock "s" SrcPort 1 DstBlock "s_k" DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [750, 158, 755, 312] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Constant Name "No Evap" Position [235, 332, 255, 358] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Terminator Name "Terminator" Position [180, 310, 200, 330] ShowName off } Block { BlockType Terminator Name "Terminator1" Position [180, 250, 200, 270] ShowName off } Block { BlockType Terminator Name "Terminator2" Position [180, 230, 200, 250] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator3" Position [180, 290, 200, 310] ShowName off } Block { BlockType Outport Name "Anode_k" Position [790, 228, 820, 242] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "WH2_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 3 DstBlock "Terminator2" DstPort 1 } Line { Name "Wv_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 4 DstBlock "Terminator1" DstPort 1 } Line { Name "s_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 5 Points [100, 0; 0, 170] DstBlock "Calc Wl" DstPort 2 } Line { Name "Wl_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 6 DstBlock "Terminator3" DstPort 1 } Line { SrcBlock "Mass Balance" SrcPort 1 Points [10, 0] Branch { Points [315, 0; 0, -105] DstBlock "Mux" DstPort 5 } Branch { Points [0, -125] Branch { Points [0, -105] Branch { Points [0, -70] DstBlock "Calc W_H2" DstPort 3 } Branch { DstBlock "Calc Wv_(k)" DstPort 3 } } Branch { DstBlock "Calc R_evap" DstPort 3 } } Branch { DstBlock "Calc Wl" DstPort 1 } } Line { Name "WH2" Labels [0, 0] SrcBlock "Calc W_H2" SrcPort 2 Points [175, 0; 0, 160] DstBlock "Mux" DstPort 3 } Line { Name "Wv" Labels [0, 0] SrcBlock "Calc Wv_(k)" SrcPort 1 Points [170, 0; 0, 125] DstBlock "Mux" DstPort 4 } Line { Name "Revap" Labels [0, 1] SrcBlock "Calc R_evap" SrcPort 1 Points [40, 0] Branch { Points [0, -45; -270, 0] DstBlock "Calc Wv_(k)" DstPort 4 } Branch { Points [0, 195; -405, 0] DstBlock "Mass Balance" DstPort 3 } } Line { Name "Tst" Labels [0, 0] SrcBlock "Demux1" SrcPort 7 DstBlock "Terminator" DstPort 1 } Line { Name "Tst" Labels [0, 0] SrcBlock "Tst" SrcPort 1 Points [0, 0] Branch { DstBlock "Calc R_evap" DstPort 2 } Branch { Labels [1, 0] Points [0, 80] DstBlock "Mux" DstPort 7 } } Line { SrcBlock "Anode_(k+1)" SrcPort 1 DstBlock "Demux1" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Anode_k" DstPort 1 } Line { SrcBlock "Calc Wl" SrcPort 1 Points [15, 0] Branch { Points [235, 0; 0, -165] DstBlock "Mux" DstPort 6 } Branch { Points [0, 40; -215, 0; 0, -120] DstBlock "Mass Balance" DstPort 2 } } Line { SrcBlock "W,H2,rct" SrcPort 1 DstBlock "Calc W_H2" DstPort 1 } Line { SrcBlock "Wv,mb" SrcPort 1 DstBlock "Calc Wv_(k)" DstPort 1 } Line { Name "CH2_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 1 Points [55, 0; 0, -160] DstBlock "Calc W_H2" DstPort 2 } Line { SrcBlock "Calc W_H2" SrcPort 1 Points [200, 0; 0, 145] DstBlock "Mux" DstPort 1 } Line { Name "CV (k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 2 Points [125, 0; 0, -105] DstBlock "Calc Wv_(k)" DstPort 2 } Line { SrcBlock "Calc Wv_(k)" SrcPort 2 Points [5, 0] Branch { Points [190, 0; 0, 55] DstBlock "Mux" DstPort 2 } Branch { Points [0, 55] DstBlock "Calc R_evap" DstPort 1 } } Line { SrcBlock "No Evap" SrcPort 1 DstBlock "Mass Balance" DstPort 1 } Annotation { Name "Variables in ANODE_k \n1. c_h2(k)\n2. c" "_v(k)\n3. W_h2 (k)\n4. W_v(k)\n5. s_an(k)\n6. W_l_an(k)\n7. T_an(k)" Position [765, 321] HorizontalAlignment "left" ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType SubSystem Name "GDL_Section 2" Ports [2, 1] Position [600, 78, 700, 122] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "GDL_Section 2" Location [116, 74, 1007, 565] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Anode_(k+1)" Position [20, 303, 50, 317] ForegroundColor "orange" IconDisplay "Port number" } Block { BlockType Inport Name "Anode_(k-1)" Position [15, 113, 45, 127] Port "2" IconDisplay "Port number" } Block { BlockType Terminator Name " 2" Position [170, 70, 190, 90] ShowName off } Block { BlockType Terminator Name " 3" Position [170, 50, 190, 70] ShowName off } Block { BlockType SubSystem Name "Calc R_evap" Ports [3, 1] Position [535, 253, 615, 307] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Revap" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc R_evap" Location [362, 108, 943, 317] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "cv" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [35, 108, 65, 122] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "s_k" Position [35, 168, 65, 182] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " 5" Ports [2, 1] Position [145, 62, 175, 93] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Pv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [250, 72, 280, 103] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "No Evap" Position [360, 127, 380, 153] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "RGU" Position [75, 13, 110, 47] Gain "R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum7" Ports [2, 1] Position [205, 70, 225, 90] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" Position [470, 95, 500, 125] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Switch Name "Switch3" Position [400, 85, 430, 115] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Gain Name "gamma/R" Position [305, 75, 335, 105] Gain "0.9*Alg_V/R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure1" Position [170, 102, 205, 128] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "R_evap" Position [525, 103, 555, 117] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "Tst" SrcBlock "T_st" SrcPort 1 Points [25, 0] Branch { DstBlock "sat_pressure1" DstPort 1 } Branch { Points [0, 35; 140, 0] DstBlock "Divide" DstPort 2 } Branch { Points [0, -30] DstBlock " 5" DstPort 2 } } Line { SrcBlock "RGU" SrcPort 1 Points [0, 40] DstBlock " 5" DstPort 1 } Line { Name "Pv" Labels [0, 0] SrcBlock " 5" SrcPort 1 DstBlock "Sum7" DstPort 1 } Line { SrcBlock "Sum7" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { SrcBlock "sat_pressure1" SrcPort 1 Points [5, 0] DstBlock "Sum7" DstPort 2 } Line { SrcBlock "Divide" SrcPort 1 DstBlock "gamma/R" DstPort 1 } Line { SrcBlock "gamma/R" SrcPort 1 Points [35, 0] Branch { DstBlock "Switch3" DstPort 1 } Branch { Points [0, -25; 70, 0; 0, 45] Branch { DstBlock "Switch" DstPort 2 } Branch { Points [0, 10] DstBlock "Switch" DstPort 3 } } } Line { SrcBlock "No Evap" SrcPort 1 DstBlock "Switch3" DstPort 3 } Line { SrcBlock "Switch3" SrcPort 1 DstBlock "Switch" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 DstBlock "R_evap" DstPort 1 } Line { SrcBlock "cv" SrcPort 1 DstBlock "RGU" DstPort 1 } Line { SrcBlock "s_k" SrcPort 1 Points [280, 0; 0, -75] DstBlock "Switch3" DstPort 2 } } } Block { BlockType SubSystem Name "Calc W_H2" Ports [3, 2] Position [405, 48, 510, 102] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 2 Name "W_h2(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc W_H2" Location [166, 75, 1071, 330] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_h2(k-1)" Position [15, 113, 45, 127] IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "WH2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "c_h2(k+1)" Position [15, 158, 45, 172] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_k" Position [15, 198, 45, 212] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " " Ports [2, 1] Position [520, 77, 550, 108] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "NH2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-1/dy" Position [415, 70, 445, 100] Gain "-1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "d/dy(ch2)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "Gain" Position [240, 70, 270, 100] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "H2_FlowtoFlux" Position [130, 103, 165, 137] Gain "1/GDL_AREA/HYDROGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "H2_FluxtoFlow" Position [680, 53, 715, 87] Gain "GDL_AREA*HYDROGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [195, 75, 215, 95] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [375, 75, 395, 95] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cH2" Ports [1, 1] Position [310, 70, 340, 100] ForegroundColor "red" InitialCondition "cH2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [380, 190, 440, 220] Expr "D_H2*GDL_POR*((GDL_POR-0.11)/(1-0.1" "1))^0.785*(1-u)^2" } Block { BlockType Outport Name "c_h2(k)" Position [775, 128, 805, 142] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_h2(k)" Position [765, 63, 795, 77] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "cH2" DstPort 1 } Line { SrcBlock "cH2" SrcPort 1 Points [10, 0] Branch { DstBlock "Sum1" DstPort 1 } Branch { Points [0, 50] DstBlock "c_h2(k)" DstPort 1 } } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "-1/dy" DstPort 1 } Line { Name "d/dy(ch2)" Labels [0, 0] SrcBlock "-1/dy" SrcPort 1 DstBlock " " DstPort 1 } Line { Name "NH2" Labels [1, 0] SrcBlock " " SrcPort 1 Points [105, 0; 0, -25] Branch { Labels [1, 0] Points [0, -15; -495, 0; 0, 30] DstBlock "Sum" DstPort 1 } Branch { DstBlock "H2_FluxtoFlow" DstPort 1 } } Line { SrcBlock "H2_FlowtoFlux" SrcPort 1 Points [35, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "H2_FluxtoFlow" SrcPort 1 DstBlock "W_h2(k)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [60, 0] DstBlock " " DstPort 2 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "c_h2(k+1)" SrcPort 1 Points [335, 0] DstBlock "Sum1" DstPort 2 } Line { Name "Tst" Labels [0, 0] SrcBlock "W_h2(k-1)" SrcPort 1 DstBlock "H2_FlowtoFlux" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wl" Ports [2, 1] Position [400, 404, 460, 446] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc Wl" Location [187, 454, 659, 595] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "s_k" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "s_k+1" Position [20, 73, 50, 87] Port "2" IconDisplay "Port number" } Block { BlockType Product Name " 6" Ports [2, 1] Position [365, 42, 395, 73] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain3" Position [295, 65, 325, 95] Gain "1/(delta_y)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "S" Position [70, 17, 110, 43] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S1" Position [85, 67, 125, 93] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S2" Position [285, 17, 325, 43] Expr "-GDL_AREA/H20_L_VISC*WATERDENSITY*K" "_PERM*u^3*(1.417-2*2.12*u+3*1.263*u^2)*(H20_SURF_T*0.5)/sqrt(K_PERM/GDL_POR)" } Block { BlockType Saturate Name "Saturation" Position [125, 15, 155, 45] UpperLimit "inf" LowerLimit "0" Port { PortNumber 1 Name "S(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Saturate Name "Saturation1" Position [150, 65, 180, 95] UpperLimit "inf" LowerLimit "0" Port { PortNumber 1 Name "S(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [240, 70, 260, 90] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Wl" Position [425, 53, 455, 67] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock " 6" SrcPort 1 DstBlock "Wl" DstPort 1 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "S" DstPort 1 } Line { SrcBlock "Gain3" SrcPort 1 Points [10, 0; 0, -15] DstBlock " 6" DstPort 2 } Line { SrcBlock "S2" SrcPort 1 Points [10, 0; 0, 20] DstBlock " 6" DstPort 1 } Line { Name "S(k)" Labels [0, 0] SrcBlock "Saturation" SrcPort 1 Points [90, 0] Branch { DstBlock "S2" DstPort 1 } Branch { DstBlock "Sum2" DstPort 1 } } Line { SrcBlock "S" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "Gain3" DstPort 1 } Line { SrcBlock "s_k+1" SrcPort 1 DstBlock "S1" DstPort 1 } Line { SrcBlock "S1" SrcPort 1 DstBlock "Saturation1" DstPort 1 } Line { Name "S(k+1)" Labels [0, 0] SrcBlock "Saturation1" SrcPort 1 DstBlock "Sum2" DstPort 2 } } } Block { BlockType SubSystem Name "Calc Wv_(k)" Ports [4, 2] Position [405, 158, 505, 217] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc Wv_(k)" Location [197, 176, 944, 459] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wv_(k-1)" Position [15, 38, 45, 52] IconDisplay "Port number" } Block { BlockType Inport Name "cv_(k+1)" Position [70, 183, 100, 197] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_(k)" Position [70, 218, 100, 232] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [70, 143, 100, 157] Port "4" IconDisplay "Port number" } Block { BlockType Product Name " 1" Ports [2, 1] Position [490, 107, 520, 138] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Nv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-1/dy" Position [380, 100, 410, 130] Gain "-1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain2" Position [180, 100, 210, 130] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [140, 105, 160, 125] ShowName off IconShape "round" Inputs "+|-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [335, 105, 355, 125] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [235, 105, 255, 125] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FlowtoFlux" Position [90, 28, 125, 62] Gain "1/GDL_AREA/VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FluxtoFlow" Position [620, 108, 655, 142] Gain "GDL_AREA*VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cv1" Ports [1, 1] Position [270, 100, 300, 130] ForegroundColor "blue" InitialCondition "cv_IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [250, 210, 310, 240] Expr "D_V*GDL_POR*((GDL_POR-0.11)/(1-0.11" "))^0.785*(1-u)^2" } Block { BlockType Outport Name "Wv_(k)" Position [700, 118, 730, 132] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "cv_(k)" Position [700, 53, 730, 67] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Gain2" DstPort 1 } Line { SrcBlock "cv1" SrcPort 1 Points [5, 0] Branch { DstBlock "Sum4" DstPort 1 } Branch { Points [0, -55] DstBlock "cv_(k)" DstPort 1 } } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "-1/dy" DstPort 1 } Line { Labels [0, 0] SrcBlock "-1/dy" SrcPort 1 DstBlock " 1" DstPort 1 } Line { Name "Nv" Labels [1, 0] SrcBlock " 1" SrcPort 1 Points [45, 0] Branch { Labels [1, 0] DstBlock "V_FluxtoFlow" DstPort 1 } Branch { Points [0, 45; -420, 0] DstBlock "Sum3" DstPort 2 } } Line { SrcBlock "Gain2" SrcPort 1 DstBlock "Sum5" DstPort 1 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "cv1" DstPort 1 } Line { SrcBlock "V_FluxtoFlow" SrcPort 1 DstBlock "Wv_(k)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [140, 0; 0, -95] DstBlock " 1" DstPort 2 } Line { SrcBlock "s_(k)" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "cv_(k+1)" SrcPort 1 Points [240, 0] DstBlock "Sum4" DstPort 2 } Line { SrcBlock "R_evap" SrcPort 1 Points [140, 0] DstBlock "Sum5" DstPort 2 } Line { SrcBlock "V_FlowtoFlux" SrcPort 1 Points [20, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Wv_(k-1)" SrcPort 1 DstBlock "V_FlowtoFlux" DstPort 1 } Annotation { Name "d/dy(cv)" Position [445, 107] UseDisplayTextAsClickCallback off } } } Block { BlockType Demux Name "Demux1" Ports [1, 7] Position [110, 233, 115, 387] ForegroundColor "orange" BackgroundColor "black" ShowName off Outputs "7" DisplayOption "bar" Port { PortNumber 1 Name "CH2_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CV (k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "WH2_(k+1)" PropagatedSignals "WH2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Wv_(k+1)" PropagatedSignals "Wv_(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "s_(k+1)" PropagatedSignals "s_k" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Wl_(k+1)" PropagatedSignals "Wl" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Demux Name "Demux2" Ports [1, 7] Position [95, 43, 100, 197] BackgroundColor "black" ShowName off Outputs "7" DisplayOption "bar" Port { PortNumber 1 Name "CH2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CV (k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "WH2_(k-1)" PropagatedSignals "WH2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Wv_(k-1)" PropagatedSignals "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "S_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Wl_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Mass Balance" Ports [3, 1] Position [290, 309, 370, 361] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Mass Balance" Location [426, 344, 771, 525] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wl_k-1" Position [20, 13, 50, 27] IconDisplay "Port number" } Block { BlockType Inport Name "Wl_k" Position [20, 68, 50, 82] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [20, 118, 50, 132] Port "3" IconDisplay "Port number" } Block { BlockType Gain Name "1/(rho*Vp)" Position [165, 58, 180, 92] Gain "1/(WATERDENSITY*V_P)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Mv*Vp" Position [80, 110, 110, 140] Gain "VAPORMOLARMASS*V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum6" Ports [3, 1] Position [125, 65, 145, 85] ShowName off IconShape "round" Inputs "-+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "s" Ports [1, 1] Position [200, 60, 230, 90] ForegroundColor "green" InitialCondition "sIC2" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "s_k" Position [265, 68, 295, 82] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum6" SrcPort 1 DstBlock "1/(rho*Vp)" DstPort 1 } Line { SrcBlock "Mv*Vp" SrcPort 1 Points [20, 0] DstBlock "Sum6" DstPort 3 } Line { SrcBlock "1/(rho*Vp)" SrcPort 1 DstBlock "s" DstPort 1 } Line { SrcBlock "R_evap" SrcPort 1 DstBlock "Mv*Vp" DstPort 1 } Line { SrcBlock "Wl_k-1" SrcPort 1 Points [80, 0] DstBlock "Sum6" DstPort 1 } Line { SrcBlock "Wl_k" SrcPort 1 DstBlock "Sum6" DstPort 2 } Line { SrcBlock "s" SrcPort 1 DstBlock "s_k" DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [755, 208, 760, 362] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Terminator Name "Terminator" Position [210, 360, 230, 380] ShowName off } Block { BlockType Terminator Name "Terminator1" Position [210, 300, 230, 320] ShowName off } Block { BlockType Terminator Name "Terminator2" Position [210, 280, 230, 300] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator3" Position [210, 340, 230, 360] ShowName off } Block { BlockType Terminator Name "Terminator4" Position [170, 130, 190, 150] NamePlacement "alternate" ShowName off } Block { BlockType Outport Name "Anode_(k)" Position [795, 278, 825, 292] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "CV (k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 2 Points [170, 0; 0, -90] DstBlock "Calc Wv_(k)" DstPort 2 } Line { Name "WH2_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 3 DstBlock "Terminator2" DstPort 1 } Line { Name "Wv_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 4 DstBlock "Terminator1" DstPort 1 } Line { Name "s_(k+1)" Labels [0, 0; 3, 0] SrcBlock "Demux1" SrcPort 5 Points [120, 0; 0, 105] DstBlock "Calc Wl" DstPort 2 } Line { Name "Wl_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 6 DstBlock "Terminator3" DstPort 1 } Line { SrcBlock "Anode_(k-1)" SrcPort 1 DstBlock "Demux2" DstPort 1 } Line { SrcBlock "Mass Balance" SrcPort 1 Points [5, 0] Branch { Points [0, 80] DstBlock "Calc Wl" DstPort 1 } Branch { Points [0, 0] Branch { Points [305, 0; 0, -30] DstBlock "Mux" DstPort 5 } Branch { Points [0, -35] Branch { DstBlock "Calc R_evap" DstPort 3 } Branch { Points [0, -105] Branch { DstBlock "Calc Wv_(k)" DstPort 3 } Branch { Points [0, -100] DstBlock "Calc W_H2" DstPort 3 } } } } } Line { Name "W_h2(k)" Labels [0, 0] SrcBlock "Calc W_H2" SrcPort 2 Points [195, 0; 0, 175] DstBlock "Mux" DstPort 3 } Line { Name "Wv" Labels [0, 0] SrcBlock "Calc Wv_(k)" SrcPort 1 Points [190, 0; 0, 110] DstBlock "Mux" DstPort 4 } Line { Name "Revap" Labels [0, 1] SrcBlock "Calc R_evap" SrcPort 1 Points [40, 15; 0, 0] Branch { Points [0, 110; -385, 0] DstBlock "Mass Balance" DstPort 3 } Branch { Points [0, -40; -270, 0] DstBlock "Calc Wv_(k)" DstPort 4 } } Line { Name "Tst" Labels [0, 0] SrcBlock "Demux1" SrcPort 7 DstBlock "Terminator" DstPort 1 } Line { Name "CH2_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 1 DstBlock " 3" DstPort 1 } Line { Name "CV (k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 2 DstBlock " 2" DstPort 1 } Line { Name "WH2_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 3 Points [110, 0; 0, -45] DstBlock "Calc W_H2" DstPort 1 } Line { Name "Wv_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 4 Points [265, 0; 0, 45] DstBlock "Calc Wv_(k)" DstPort 1 } Line { Name "S_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 5 DstBlock "Terminator4" DstPort 1 } Line { Name "Wl_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 6 Points [170, 0] DstBlock "Mass Balance" DstPort 1 } Line { Name "Tst" Labels [0, 0] SrcBlock "Demux2" SrcPort 7 Points [150, 0; 0, 100] Branch { DstBlock "Calc R_evap" DstPort 2 } Branch { Points [0, 190; 460, 0; 0, -125] DstBlock "Mux" DstPort 7 } } Line { SrcBlock "Anode_(k+1)" SrcPort 1 DstBlock "Demux1" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Anode_(k)" DstPort 1 } Line { SrcBlock "Calc Wl" SrcPort 1 Points [10, 0] Branch { Points [225, 0; 0, -100] DstBlock "Mux" DstPort 6 } Branch { Points [0, 35; -210, 0; 0, -125] DstBlock "Mass Balance" DstPort 2 } } Line { SrcBlock "Calc Wv_(k)" SrcPort 2 Points [10, 0] Branch { DstBlock "Calc R_evap" DstPort 1 } Branch { Points [205, 0; 0, 40] DstBlock "Mux" DstPort 2 } } Line { Name "CH2_(k+1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 1 Points [105, 0; 0, -175] DstBlock "Calc W_H2" DstPort 2 } Line { SrcBlock "Calc W_H2" SrcPort 1 Points [225, 0] DstBlock "Mux" DstPort 1 } Annotation { Name "Variables in ANODE_k \n1. c_h2(k)\n2. c" "_v(k)\n3. W_h2 (k)\n4. W_v(k)\n5. s_an(k)\n6. W_l_an(k)\n7. T_an(k)" Position [775, 366] HorizontalAlignment "left" ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType SubSystem Name "GDL_Section 3" Ports [2, 1] Position [380, 69, 480, 116] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "GDL_Section 3" Location [163, 414, 1089, 924] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Channel" Position [15, 233, 45, 247] ForegroundColor "orange" IconDisplay "Port number" } Block { BlockType Inport Name "Anode_k-1" Position [15, 83, 45, 97] Port "2" IconDisplay "Port number" } Block { BlockType Terminator Name " 2" Position [150, 40, 170, 60] ShowName off } Block { BlockType Terminator Name " 3" Position [150, 20, 170, 40] ShowName off } Block { BlockType Terminator Name " 4" Position [135, 235, 155, 255] ShowName off } Block { BlockType SubSystem Name "Calc R_evap" Ports [3, 1] Position [485, 253, 565, 307] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc R_evap" Location [362, 108, 943, 317] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "cv" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [35, 108, 65, 122] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "s_k" Position [35, 168, 65, 182] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " 5" Ports [2, 1] Position [145, 62, 175, 93] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Pv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [250, 72, 280, 103] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "No Evap" Position [360, 127, 380, 153] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "RGU" Position [75, 13, 110, 47] Gain "R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum7" Ports [2, 1] Position [205, 70, 225, 90] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" Position [470, 95, 500, 125] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Switch Name "Switch3" Position [400, 85, 430, 115] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Gain Name "gamma/R" Position [305, 75, 335, 105] Gain "0.9*Alg_V/R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure1" Position [170, 102, 205, 128] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "R_evap" Position [525, 103, 555, 117] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "Tst" SrcBlock "T_st" SrcPort 1 Points [25, 0] Branch { DstBlock "sat_pressure1" DstPort 1 } Branch { Points [0, 35; 140, 0] DstBlock "Divide" DstPort 2 } Branch { Points [0, -30] DstBlock " 5" DstPort 2 } } Line { SrcBlock "RGU" SrcPort 1 Points [0, 40] DstBlock " 5" DstPort 1 } Line { Name "Pv" Labels [0, 0] SrcBlock " 5" SrcPort 1 DstBlock "Sum7" DstPort 1 } Line { SrcBlock "Sum7" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { SrcBlock "sat_pressure1" SrcPort 1 Points [5, 0] DstBlock "Sum7" DstPort 2 } Line { SrcBlock "Divide" SrcPort 1 DstBlock "gamma/R" DstPort 1 } Line { SrcBlock "gamma/R" SrcPort 1 Points [35, 0] Branch { DstBlock "Switch3" DstPort 1 } Branch { Points [0, -25; 70, 0; 0, 45] Branch { DstBlock "Switch" DstPort 2 } Branch { Points [0, 10] DstBlock "Switch" DstPort 3 } } } Line { SrcBlock "No Evap" SrcPort 1 DstBlock "Switch3" DstPort 3 } Line { SrcBlock "Switch3" SrcPort 1 DstBlock "Switch" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 DstBlock "R_evap" DstPort 1 } Line { SrcBlock "cv" SrcPort 1 DstBlock "RGU" DstPort 1 } Line { SrcBlock "s_k" SrcPort 1 Points [280, 0; 0, -75] DstBlock "Switch3" DstPort 2 } } } Block { BlockType SubSystem Name "Calc W_H2" Ports [3, 2] Position [355, 28, 460, 82] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 2 Name "WH2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc W_H2" Location [166, 75, 1071, 330] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_h2(k-1)" Position [15, 113, 45, 127] IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "WH2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "c_h2(k+1)" Position [15, 158, 45, 172] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_k" Position [15, 198, 45, 212] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " " Ports [2, 1] Position [520, 77, 550, 108] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "NH2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-1/dy" Position [415, 70, 445, 100] Gain "-1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "d/dy(ch2)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "Gain" Position [240, 70, 270, 100] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "H2_FlowtoFlux" Position [130, 103, 165, 137] Gain "1/GDL_AREA/HYDROGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "H2_FluxtoFlow" Position [680, 53, 715, 87] Gain "GDL_AREA*HYDROGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [195, 75, 215, 95] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [375, 75, 395, 95] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cH2" Ports [1, 1] Position [310, 70, 340, 100] ForegroundColor "red" InitialCondition "cH2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [380, 190, 440, 220] Expr "D_H2*GDL_POR*((GDL_POR-0.11)/(1-0.1" "1))^0.785*(1-u)^2" } Block { BlockType Outport Name "c_h2(k)" Position [775, 128, 805, 142] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_h2(k)" Position [765, 63, 795, 77] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "cH2" DstPort 1 } Line { SrcBlock "cH2" SrcPort 1 Points [10, 0] Branch { DstBlock "Sum1" DstPort 1 } Branch { Points [0, 50] DstBlock "c_h2(k)" DstPort 1 } } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "-1/dy" DstPort 1 } Line { Name "d/dy(ch2)" Labels [0, 0] SrcBlock "-1/dy" SrcPort 1 DstBlock " " DstPort 1 } Line { Name "NH2" Labels [1, 0] SrcBlock " " SrcPort 1 Points [105, 0; 0, -25] Branch { Labels [1, 0] Points [0, -15; -495, 0; 0, 30] DstBlock "Sum" DstPort 1 } Branch { DstBlock "H2_FluxtoFlow" DstPort 1 } } Line { SrcBlock "H2_FlowtoFlux" SrcPort 1 Points [35, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "H2_FluxtoFlow" SrcPort 1 DstBlock "W_h2(k)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [60, 0] DstBlock " " DstPort 2 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "c_h2(k+1)" SrcPort 1 Points [335, 0] DstBlock "Sum1" DstPort 2 } Line { Name "Tst" Labels [0, 0] SrcBlock "W_h2(k-1)" SrcPort 1 DstBlock "H2_FlowtoFlux" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wl" Ports [2, 1] Position [365, 399, 425, 441] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Wl" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc Wl" Location [411, 158, 1002, 452] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "s_k" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "S_k+1" Position [110, 73, 140, 87] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "S_CHAN" PropagatedSignals "S_ch" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name " 6" Ports [2, 1] Position [325, 42, 355, 73] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "1/dy" Position [255, 65, 285, 95] Gain "1/(delta_y)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "S" Position [70, 17, 110, 43] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S2" Position [245, 17, 285, 43] Expr "-GDL_AREA/H20_L_VISC*WATERDENSITY*K" "_PERM*u^3*(1.417-2*2.12*u+3*1.263*u^2)*(H20_SURF_T*0.5)/sqrt(K_PERM/GDL_POR)" } Block { BlockType Saturate Name "Saturation" Position [125, 15, 155, 45] UpperLimit "inf" LowerLimit "0" Port { PortNumber 1 Name "S(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [200, 70, 220, 90] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Wl" Position [385, 53, 415, 67] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "1/dy" DstPort 1 } Line { SrcBlock "S" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { Name "S_CHAN" Labels [0, 0] SrcBlock "S_k+1" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { Name "S(k)" Labels [0, 0] SrcBlock "Saturation" SrcPort 1 Points [50, 0] Branch { DstBlock "Sum2" DstPort 1 } Branch { DstBlock "S2" DstPort 1 } } Line { SrcBlock "S2" SrcPort 1 Points [10, 0; 0, 20] DstBlock " 6" DstPort 1 } Line { SrcBlock "1/dy" SrcPort 1 Points [10, 0; 0, -15] DstBlock " 6" DstPort 2 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "S" DstPort 1 } Line { SrcBlock " 6" SrcPort 1 DstBlock "Wl" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wv_(k)" Ports [4, 2] Position [355, 123, 455, 182] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Wv_(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc Wv_(k)" Location [160, 452, 907, 735] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wv_(k-1)" Position [15, 38, 45, 52] IconDisplay "Port number" } Block { BlockType Inport Name "cv_(k+1)" Position [70, 183, 100, 197] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_(k)" Position [70, 218, 100, 232] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [70, 143, 100, 157] Port "4" IconDisplay "Port number" } Block { BlockType Product Name " 1" Ports [2, 1] Position [490, 107, 520, 138] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Nv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-1/dy" Position [380, 100, 410, 130] Gain "-1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain2" Position [180, 100, 210, 130] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [140, 105, 160, 125] ShowName off IconShape "round" Inputs "+|-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [335, 105, 355, 125] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [235, 105, 255, 125] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FlowtoFlux" Position [90, 28, 125, 62] Gain "1/GDL_AREA/VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FluxtoFlow" Position [620, 108, 655, 142] Gain "GDL_AREA*VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cv1" Ports [1, 1] Position [270, 100, 300, 130] ForegroundColor "blue" InitialCondition "cv_IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [250, 210, 310, 240] Expr "D_V*GDL_POR*((GDL_POR-0.11)/(1-0.11" "))^0.785*(1-u)^2" } Block { BlockType Outport Name "Wv_(k)" Position [700, 118, 730, 132] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "cv_(k)" Position [700, 53, 730, 67] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Gain2" DstPort 1 } Line { SrcBlock "cv1" SrcPort 1 Points [5, 0] Branch { DstBlock "Sum4" DstPort 1 } Branch { Points [0, -55] DstBlock "cv_(k)" DstPort 1 } } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "-1/dy" DstPort 1 } Line { Labels [0, 0] SrcBlock "-1/dy" SrcPort 1 DstBlock " 1" DstPort 1 } Line { Name "Nv" Labels [1, 0] SrcBlock " 1" SrcPort 1 Points [45, 0] Branch { Labels [1, 0] DstBlock "V_FluxtoFlow" DstPort 1 } Branch { Points [0, 45; -420, 0] DstBlock "Sum3" DstPort 2 } } Line { SrcBlock "Gain2" SrcPort 1 DstBlock "Sum5" DstPort 1 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "cv1" DstPort 1 } Line { SrcBlock "V_FluxtoFlow" SrcPort 1 DstBlock "Wv_(k)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [140, 0; 0, -95] DstBlock " 1" DstPort 2 } Line { SrcBlock "s_(k)" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "cv_(k+1)" SrcPort 1 Points [240, 0] DstBlock "Sum4" DstPort 2 } Line { SrcBlock "R_evap" SrcPort 1 Points [140, 0] DstBlock "Sum5" DstPort 2 } Line { SrcBlock "V_FlowtoFlux" SrcPort 1 Points [20, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Wv_(k-1)" SrcPort 1 DstBlock "V_FlowtoFlux" DstPort 1 } Annotation { Name "d/dy(cv)" Position [445, 107] UseDisplayTextAsClickCallback off } } } Block { BlockType Demux Name "Demux" Ports [1, 4] Position [75, 191, 80, 284] ForegroundColor "orange" BackgroundColor "black" ShowName off DisplayOption "bar" Port { PortNumber 1 Name "CH2_CH" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CV_CH" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "Tan_ch" PropagatedSignals "T_ST" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "S_ch" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Demux Name "Demux2" Ports [1, 7] Position [75, 13, 80, 167] BackgroundColor "black" ShowName off Outputs "7" DisplayOption "bar" Port { PortNumber 1 Name "CH2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CV (k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "WH2_(k-1)" PropagatedSignals "W_h2(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Wv_(k-1)" PropagatedSignals "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "S_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Wl_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Display Name "Display2" Ports [1] Position [595, 267, 675, 293] ShowName off Decimation "1" Lockdown off } Block { BlockType Display Name "Display7" Ports [1] Position [600, 352, 680, 378] ShowName off Decimation "1" Lockdown off } Block { BlockType SubSystem Name "Mass Balance" Ports [3, 1] Position [215, 309, 295, 361] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "s_k" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Mass Balance" Location [212, 510, 557, 691] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wl_k-1" Position [20, 13, 50, 27] IconDisplay "Port number" } Block { BlockType Inport Name "Wl_k" Position [20, 68, 50, 82] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [20, 118, 50, 132] Port "3" IconDisplay "Port number" } Block { BlockType Gain Name "1/(rho*Vp)" Position [165, 58, 180, 92] Gain "1/(WATERDENSITY*V_P)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Mv*Vp" Position [80, 110, 110, 140] Gain "VAPORMOLARMASS*V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum6" Ports [3, 1] Position [125, 65, 145, 85] ShowName off IconShape "round" Inputs "-+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "s" Ports [1, 1] Position [200, 60, 230, 90] ForegroundColor "green" InitialCondition "sIC3" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "s_k" Position [265, 68, 295, 82] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum6" SrcPort 1 DstBlock "1/(rho*Vp)" DstPort 1 } Line { SrcBlock "Mv*Vp" SrcPort 1 Points [20, 0] DstBlock "Sum6" DstPort 3 } Line { SrcBlock "1/(rho*Vp)" SrcPort 1 DstBlock "s" DstPort 1 } Line { SrcBlock "R_evap" SrcPort 1 DstBlock "Mv*Vp" DstPort 1 } Line { SrcBlock "Wl_k-1" SrcPort 1 Points [80, 0] DstBlock "Sum6" DstPort 1 } Line { SrcBlock "Wl_k" SrcPort 1 DstBlock "Sum6" DstPort 2 } Line { SrcBlock "s" SrcPort 1 DstBlock "s_k" DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [755, 178, 760, 332] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Terminator Name "Terminator4" Position [150, 100, 170, 120] NamePlacement "alternate" ShowName off } Block { BlockType Display Name "Wl_k" Ports [1] Position [470, 447, 550, 473] Decimation "1" Lockdown off } Block { BlockType Display Name "Wl_k-1" Ports [1] Position [200, 117, 280, 143] Decimation "1" Lockdown off } Block { BlockType Outport Name "Anode_k" Position [780, 248, 810, 262] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "Tan_ch" Labels [-1, 0] SrcBlock "Demux" SrcPort 3 Points [0, -5] DstBlock " 4" DstPort 1 } Line { SrcBlock "Channel" SrcPort 1 DstBlock "Demux" DstPort 1 } Line { SrcBlock "Anode_k-1" SrcPort 1 DstBlock "Demux2" DstPort 1 } Line { Name "s_k" Labels [0, 0] SrcBlock "Mass Balance" SrcPort 1 Points [20, 0] Branch { Points [0, 0] Branch { Labels [1, 0] Points [265, 0] Branch { Points [115, 0; 0, -60] DstBlock "Mux" DstPort 5 } Branch { DstBlock "Display7" DstPort 1 } } Branch { Points [0, 75] DstBlock "Calc Wl" DstPort 1 } } Branch { Points [0, -40] Branch { Points [150, 0] DstBlock "Calc R_evap" DstPort 3 } Branch { Points [0, -135] Branch { DstBlock "Calc Wv_(k)" DstPort 3 } Branch { Points [0, -85] DstBlock "Calc W_H2" DstPort 3 } } } } Line { Name "WH2" Labels [0, 0] SrcBlock "Calc W_H2" SrcPort 2 Points [250, 0; 0, 165] DstBlock "Mux" DstPort 3 } Line { SrcBlock "Calc Wv_(k)" SrcPort 2 Points [5, 0; 0, 45] Branch { DstBlock "Mux" DstPort 2 } Branch { Points [0, 45] DstBlock "Calc R_evap" DstPort 1 } } Line { Name "Wv_(k)" Labels [0, 0] SrcBlock "Calc Wv_(k)" SrcPort 1 Points [240, 0; 0, 115] DstBlock "Mux" DstPort 4 } Line { Name "CH2_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 1 DstBlock " 3" DstPort 1 } Line { Name "CV (k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 2 DstBlock " 2" DstPort 1 } Line { Name "WH2_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 3 Points [200, 0; 0, -35] DstBlock "Calc W_H2" DstPort 1 } Line { Name "Wv_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 4 Points [225, 0; 0, 40] DstBlock "Calc Wv_(k)" DstPort 1 } Line { Name "S_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 5 DstBlock "Terminator4" DstPort 1 } Line { Name "Wl_(k-1)" Labels [0, 0] SrcBlock "Demux2" SrcPort 6 Points [100, 0] Branch { Points [0, 190] DstBlock "Mass Balance" DstPort 1 } Branch { DstBlock "Wl_k-1" DstPort 1 } } Line { Name "Tst" Labels [0, 0] SrcBlock "Demux2" SrcPort 7 Points [85, 0; 0, 130] Branch { Points [0, 215; 565, 0; 0, -180] DstBlock "Mux" DstPort 7 } Branch { Labels [1, 0] DstBlock "Calc R_evap" DstPort 2 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Anode_k" DstPort 1 } Line { Name "Wl" Labels [0, 0] SrcBlock "Calc Wl" SrcPort 1 Points [20, 0] Branch { Labels [1, 0] Points [270, 0; 0, -125] DstBlock "Mux" DstPort 6 } Branch { Points [0, 40] Branch { DstBlock "Wl_k" DstPort 1 } Branch { Points [-265, 0; 0, -125] DstBlock "Mass Balance" DstPort 2 } } } Line { SrcBlock "Calc R_evap" SrcPort 1 Points [5, 0] Branch { DstBlock "Display2" DstPort 1 } Branch { Labels [2, 0] Points [0, 100; -380, 0; 0, -30] DstBlock "Mass Balance" DstPort 3 } Branch { Points [0, -50; -240, 0; 0, -55] DstBlock "Calc Wv_(k)" DstPort 4 } } Line { Name "CV_CH" Labels [0, 0] SrcBlock "Demux" SrcPort 2 Points [225, 0; 0, -80] DstBlock "Calc Wv_(k)" DstPort 2 } Line { Name "CH2_CH" Labels [0, 0] SrcBlock "Demux" SrcPort 1 Points [210, 0; 0, -145] DstBlock "Calc W_H2" DstPort 2 } Line { SrcBlock "Calc W_H2" SrcPort 1 Points [270, 0; 0, 150] DstBlock "Mux" DstPort 1 } Line { Name "S_ch" Labels [0, 0] SrcBlock "Demux" SrcPort 4 Points [25, 0; 0, 155] DstBlock "Calc Wl" DstPort 2 } Annotation { Name "Variables in ANODE_k \n1. c_h2(k)\n2. c" "_v(k)\n3. W_h2 (k)\n4. W_v(k)\n5. s_an(k)\n6. W_l_an(k)\n7. T_an(k)" Position [775, 341] HorizontalAlignment "left" ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType Gain Name "N_cells" Position [120, 220, 150, 250] Orientation "left" Gain "FC_NUMBEROFCELLS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "N_cells1" Position [160, 200, 190, 230] Orientation "left" NamePlacement "alternate" Gain "FC_NUMBEROFCELLS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [205, 225, 225, 245] Orientation "left" NamePlacement "alternate" ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType ToWorkspace Name "To Workspace1" Position [930, 158, 990, 182] ForegroundColor "lightBlue" VariableName "ANODE_1" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace2" Position [735, 42, 805, 68] ForegroundColor "lightBlue" VariableName "ANODE_2" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace3" Position [310, 26, 375, 54] ForegroundColor "lightBlue" VariableName "ANODE_CH" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace4" Position [570, 37, 635, 63] ForegroundColor "lightBlue" VariableName "ANODE_3" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType Outport Name "Anode_1" Position [925, 118, 955, 132] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "m,l,an" Position [920, 13, 950, 27] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Anode Inputs" SrcPort 1 DstBlock "Anode Channel" DstPort 1 } Line { SrcBlock "GDL_Section 3" SrcPort 1 Points [0, -5; 15, 0] Branch { Points [0, -40] DstBlock "To Workspace4" DstPort 1 } Branch { Points [0, 145] DstBlock "Demux" DstPort 1 } Branch { DstBlock "GDL_Section 2" DstPort 1 } } Line { SrcBlock "Wv,mb" SrcPort 1 Points [20, 0; 0, -100] DstBlock "GDL_Section 1" DstPort 3 } Line { SrcBlock "N_cells" SrcPort 1 Points [-20, 0; 0, -170] DstBlock "Anode Channel" DstPort 2 } Line { SrcBlock "Anode Channel" SrcPort 1 Points [0, -30] DstBlock "m,l,an" DstPort 1 } Line { SrcBlock "N_cells1" SrcPort 1 Points [-40, 0] DstBlock "Anode Channel" DstPort 3 } Line { SrcBlock "GDL_Section 2" SrcPort 1 Points [10, 10; 0, 0] Branch { Points [0, 55] Branch { Points [0, -100] DstBlock "To Workspace2" DstPort 1 } Branch { Points [-350, 0] DstBlock "GDL_Section 3" DstPort 2 } } Branch { DstBlock "GDL_Section 1" DstPort 1 } } Line { SrcBlock "GDL_Section 1" SrcPort 1 Points [25, -15; 0, 0] Branch { DstBlock "Anode_1" DstPort 1 } Branch { Points [0, 45] Branch { Labels [1, 0] DstBlock "To Workspace1" DstPort 1 } Branch { Labels [2, 0] Points [-320, 0] DstBlock "GDL_Section 2" DstPort 2 } } } Line { SrcBlock "W,H2,rct" SrcPort 1 Points [10, 0; 0, -80] DstBlock "GDL_Section 1" DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "N_cells" DstPort 1 } Line { SrcBlock "Tst" SrcPort 1 Points [40, 0] DstBlock "GDL_Section 1" DstPort 4 } Line { SrcBlock "Demux" SrcPort 3 DstBlock "N_cells1" DstPort 1 } Line { SrcBlock "Demux" SrcPort 4 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Demux" SrcPort 6 Points [-120, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Demux" SrcPort 1 DstBlock " 3" DstPort 1 } Line { SrcBlock "Demux" SrcPort 2 DstBlock " 2" DstPort 1 } Line { SrcBlock "Demux" SrcPort 5 DstBlock " 1" DstPort 1 } Line { SrcBlock "Demux" SrcPort 7 DstBlock " 4" DstPort 1 } Line { SrcBlock "Anode Channel" SrcPort 2 Points [10, 0] Branch { DstBlock "To Workspace3" DstPort 1 } Branch { DstBlock "GDL_Section 3" DstPort 1 } } Annotation { Name "Variables in ANODE_k \n1. c_h2(k)\n2. c_v(k" ")\n3. W_h2 (k)\n4. W_v(k)\n5. s_an(k)\n6. W_l_an(k)\n7. T_an(k)" Position [355, 296] HorizontalAlignment "left" ForegroundColor "red" UseDisplayTextAsClickCallback off } Annotation { Name "Anode Inputs \n1. P_an_in\n2. T_an_in\n3. R" "H_an_in\n4. PurgeState\n5. P_an_out\n6. T_an_out\n7. T_st" Position [15, 146] HorizontalAlignment "left" ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType SubSystem Name "Cathode" Ports [4, 2] Position [375, 478, 490, 552] ForegroundColor "green" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Cathode" Location [151, 466, 1122, 812] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W,O2,rct" Position [615, 238, 645, 252] IconDisplay "Port number" } Block { BlockType Inport Name "Tst" Position [615, 318, 645, 332] ForegroundColor "blue" Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Cathode Inputs" Position [30, 58, 60, 72] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Wv,mb" Position [615, 278, 645, 292] Port "4" IconDisplay "Port number" } Block { BlockType SubSystem Name "Cathode Channel" Ports [3, 2] Position [105, 57, 270, 113] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Cathode Channel" Location [70, 549, 922, 1034] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Cathode Inputs" Position [65, 183, 95, 197] IconDisplay "Port number" } Block { BlockType Inport Name "W_(L+v)_ca,GDL,CH" Position [350, 243, 380, 257] ForegroundColor "blue" Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "W_O2_ca,GDL,CH" Position [360, 203, 390, 217] ForegroundColor "green" Port "3" IconDisplay "Port number" } Block { BlockType Demux Name "Demux" Ports [1, 7] Position [125, 106, 130, 274] BackgroundColor "black" ShowName off Outputs "7" DisplayOption "bar" Port { PortNumber 1 Name "P_CA_IN" PropagatedSignals "P_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "T_CA_IN" PropagatedSignals "T_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "RH_CA_IN" PropagatedSignals "RH_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "W_A_CA_iIN" PropagatedSignals "W_a_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "P_CA_OUT" PropagatedSignals "P_CA_OUT" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "T_CA_OUT" PropagatedSignals "T_CA_OUT" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "T_ST" PropagatedSignals "T_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Goto Name "Goto" Position [715, 160, 755, 190] ForegroundColor "magenta" GotoTag "P_ca" TagVisibility "global" } Block { BlockType SubSystem Name "Inlet Conditions" Ports [5, 1] Position [260, 13, 370, 87] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Inlet Conditions" Location [107, 635, 1071, 981] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_a_ca,in" Position [55, 118, 85, 132] IconDisplay "Port number" Port { PortNumber 1 Name "W_A_CA_IN" PropagatedSignals "W_A_CA_iIN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "T_ca,in" Position [55, 23, 85, 37] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "RH_ca,in" Position [55, 58, 85, 72] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "P_ca" Position [190, 93, 220, 107] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "P_ca,in" Position [275, 133, 305, 147] Port "5" IconDisplay "Port number" Port { PortNumber 1 Name "P,ca,in" PropagatedSignals "P_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name " 1" Ports [2, 1] Position [645, 92, 675, 123] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name " 2" Ports [2, 1] Position [465, 257, 495, 288] Inputs "/*" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name " 3" Ports [2, 1] Position [715, 227, 745, 258] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "W_air_CA_IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Constant Name "Constant2" Position [640, 300, 670, 330] Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "Humidity_Ratio_CA_in" Position [695, 95, 725, 125] Gain "(VAPORMOLARMASS/AIRMOLARMASS)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Humidity_Ratio_CA_in1" Position [540, 260, 570, 290] Gain "(VAPORMOLARMASS/AIRMOLARMASS)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Mux Name "Mux4" Ports [3, 1] Position [300, 51, 305, 109] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Product Name "P,v,ca,in" Ports [2, 1] Position [205, 22, 235, 53] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [445, 210, 465, 230] ShowName off IconShape "round" Inputs "-+|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [435, 70, 455, 90] NamePlacement "alternate" ShowName off IconShape "round" Inputs "++|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "P,ca,in" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [365, 255, 385, 275] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "P,AIR,CA,IN" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum6" Ports [2, 1] Position [595, 130, 615, 150] ShowName off IconShape "round" Inputs "-+|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "p_a,ca,in" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum8" Ports [2, 1] Position [665, 265, 685, 285] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType ToWorkspace Name "To Workspace1" Position [480, 66, 595, 94] ForegroundColor "lightBlue" ShowName off VariableName "P_CA_IN_ESTIMATED" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace2" Position [825, 231, 960, 259] ForegroundColor "lightBlue" ShowName off VariableName "W_CA_IN_CALCULATED" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType Product Name "W,v,ca,inx" Ports [2, 1] Position [780, 102, 810, 133] ForegroundColor "blue" ShowName off InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "W_AN_IN" Position [485, 205, 515, 235] Gain "FC_CATHODE_INLET_FLOW_CONSTANT" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "estimated P,a,CA,IN" Position [340, 65, 400, 95] Expr "-1/2*(-u[3]-u[2]/FC_CATHODE_INLET_F" "LOW_CONSTANT+u[1])+1/2*sqrt( (-u[3]-u[2]/FC_CATHODE_INLET_FLOW_CONSTANT+u[1] " " )^2+4*u[1]*(VAPORMOLARMASS/AIRMOLARMASS)*u[2]/FC_CATHODE_INLET_FLOW_CONSTANT" " )" } Block { BlockType Fcn Name "sat_pressure1" Position [105, 15, 165, 45] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "W_w,ca,in" Position [830, 113, 860, 127] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "W_air_CA_IN" Labels [0, 0] SrcBlock " 3" SrcPort 1 DstBlock "To Workspace2" DstPort 1 } Line { Name "P,AIR,CA,IN" Labels [0, 0] SrcBlock "Sum3" SrcPort 1 DstBlock " 2" DstPort 1 } Line { SrcBlock "W_AN_IN" SrcPort 1 Points [180, 0] DstBlock " 3" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "W_AN_IN" DstPort 1 } Line { SrcBlock "Constant2" SrcPort 1 DstBlock "Sum8" DstPort 2 } Line { SrcBlock " 2" SrcPort 1 DstBlock "Humidity_Ratio_CA_in1" DstPort 1 } Line { SrcBlock "Sum8" SrcPort 1 Points [10, 0] DstBlock " 3" DstPort 2 } Line { SrcBlock "Humidity_Ratio_CA_in1" SrcPort 1 DstBlock "Sum8" DstPort 1 } Line { SrcBlock "Humidity_Ratio_CA_in" SrcPort 1 DstBlock "W,v,ca,inx" DstPort 1 } Line { Name "p_a,ca,in" Labels [1, 0] SrcBlock "Sum6" SrcPort 1 Points [5, 0; 0, -25] DstBlock " 1" DstPort 2 } Line { Name "P,ca,in" Labels [0, 0] SrcBlock "P_ca,in" SrcPort 1 Points [35, 0] Branch { Labels [1, 0] Points [0, 80] Branch { DstBlock "Sum1" DstPort 2 } Branch { Points [0, 45] DstBlock "Sum3" DstPort 1 } } Branch { DstBlock "Sum6" DstPort 2 } } Line { SrcBlock "P_ca" SrcPort 1 Points [15, 0] Branch { Points [0, 95] DstBlock "Sum1" DstPort 1 } Branch { DstBlock "Mux4" DstPort 3 } } Line { SrcBlock "W,v,ca,inx" SrcPort 1 DstBlock "W_w,ca,in" DstPort 1 } Line { SrcBlock " 1" SrcPort 1 DstBlock "Humidity_Ratio_CA_in" DstPort 1 } Line { SrcBlock "T_ca,in" SrcPort 1 DstBlock "sat_pressure1" DstPort 1 } Line { SrcBlock "RH_ca,in" SrcPort 1 Points [100, 0] DstBlock "P,v,ca,in" DstPort 2 } Line { Name "W_A_CA_IN" Labels [0, 0] SrcBlock "W_a_ca,in" SrcPort 1 Points [80, 0] Branch { Points [0, 45; 595, 0] DstBlock "W,v,ca,inx" DstPort 2 } Branch { Points [0, -45] DstBlock "Mux4" DstPort 2 } } Line { SrcBlock "P,v,ca,in" SrcPort 1 Points [15, 0; 0, 0] Branch { Points [0, 20] Branch { Points [0, 240; 120, 0] Branch { Points [75, 0] DstBlock " 2" DstPort 2 } Branch { DstBlock "Sum3" DstPort 2 } } Branch { DstBlock "Mux4" DstPort 1 } } Branch { Points [0, -20; 190, 0] Branch { DstBlock "Sum2" DstPort 1 } Branch { Points [160, 0; 0, 80] Branch { DstBlock "Sum6" DstPort 1 } Branch { Labels [1, 0] DstBlock " 1" DstPort 1 } } } } Line { SrcBlock "Mux4" SrcPort 1 DstBlock "estimated P,a,CA,IN" DstPort 1 } Line { SrcBlock "estimated P,a,CA,IN" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { Name "P,ca,in" Labels [1, 0] SrcBlock "Sum2" SrcPort 1 DstBlock "To Workspace1" DstPort 1 } Line { SrcBlock "sat_pressure1" SrcPort 1 DstBlock "P,v,ca,in" DstPort 1 } } } Block { BlockType SubSystem Name "Mass Balance, ch" Ports [8, 6] Position [430, 134, 560, 306] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 2 Name "P_CA" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Ma" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Mass Balance, ch" Location [109, 679, 1125, 998] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_A_CA,IN" Position [15, 58, 45, 72] IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [95, 143, 125, 157] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "T_ST" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "W_o2,ca,out" Position [95, 113, 125, 127] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "W_O2_ca,GDL,CH" Position [105, 13, 135, 27] ForegroundColor "green" Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "W_n2,ca,out" Position [150, 233, 180, 247] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "W_(L+v)_ca,GDL,CH" Position [185, 308, 215, 322] ForegroundColor "blue" Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "W_w,ca,in" Position [185, 268, 215, 282] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "W_v,ca,out" Position [185, 353, 215, 367] ForegroundColor "blue" Port "8" IconDisplay "Port number" } Block { BlockType Product Name " " Ports [3, 1] Position [930, 209, 960, 241] Inputs "/*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name " 3" Ports [2, 1] Position [765, 342, 795, 373] ShowName off Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "y_o2,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Constant Name "Constant" Position [460, 424, 485, 446] Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Goto Name "Goto1" Position [220, 75, 290, 105] ForegroundColor "magenta" GotoTag "W_O2_IN" TagVisibility "global" } Block { BlockType Gain Name "Humidity_Ratio" Position [980, 210, 1010, 240] Gain "VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Ma" Position [845, 345, 905, 375] Expr "u*OXYGENMOLARMASS+(1-u)*NITROGENMOL" "ARMASS" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [330, 377, 335, 433] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [2, 1] Position [570, 487, 575, 543] ForegroundColor "blue" ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux3" Ports [2, 1] Position [425, 32, 430, 88] ForegroundColor "green" ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux5" Ports [5, 1] Position [760, 53, 765, 127] ShowName off Inputs "5" DisplayOption "bar" } Block { BlockType Mux Name "Mux6" Ports [2, 1] Position [380, 182, 385, 238] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux7" Ports [4, 1] Position [805, 411, 810, 474] ShowName off DisplayOption "bar" } Block { BlockType Fcn Name "P,N2,ca" Position [450, 230, 510, 260] Expr "u(1)*u(2)/NITROGENMOLARMASS*R_G_U/F" "C_CATHODE_VOLUME" Port { PortNumber 1 Name "p_n2,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "P,O2,ca" Position [460, 80, 520, 110] ForegroundColor "green" Expr "u(1)*u(2)/OXYGENMOLARMASS*R_G_U/FC_" "CATHODE_VOLUME" Port { PortNumber 1 Name "p_o2,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "Pv,ca" Position [600, 480, 660, 510] ForegroundColor "blue" Expr "u(1)*u(2)/VAPORMOLARMASS*R_G_U/FC_C" "ATHODE_VOLUME" Port { PortNumber 1 Name "p_v,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Constant Name "S_ch" Position [700, 110, 725, 130] Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [460, 395, 480, 415] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [690, 265, 710, 285] ShowName off IconShape "round" Inputs "++|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [3, 1] Position [275, 305, 295, 325] ForegroundColor "blue" ShowName off IconShape "round" Inputs "++-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [3, 1] Position [285, 35, 305, 55] ForegroundColor "green" ShowName off IconShape "round" Inputs "++-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum8" Ports [2, 1] Position [605, 165, 625, 185] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "p_a,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum9" Ports [2, 1] Position [275, 185, 295, 205] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType ToWorkspace Name "To Workspace4" Position [825, 429, 925, 461] ForegroundColor "lightBlue" VariableName "CATHODE_Pressure" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType Gain Name "W_N2_in" Position [210, 180, 240, 210] Gain "(1-OMF_ca_in)*NITROGENMOLARMASS/(OM" "F_ca_in*OXYGENMOLARMASS+(1-OMF_ca_in)*NITROGENMOLARMASS )" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "W_O2_in" Position [155, 50, 185, 80] ForegroundColor "green" Gain "OMF_ca_in*OXYGENMOLARMASS/AIRMOLARM" "ASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "c,N2,ca" Position [450, 175, 510, 205] Expr "u(1)/NITROGENMOLARMASS/FC_CATHODE_V" "OLUME" Port { PortNumber 1 Name "c_n2,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "c,O2,ca" Position [460, 25, 520, 55] ForegroundColor "green" Expr "u(1)/OXYGENMOLARMASS/FC_CATHODE_VOL" "UME" Port { PortNumber 1 Name "c_o2,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "cv,ca" Position [600, 530, 660, 560] ForegroundColor "blue" Expr "u(1)/VAPORMOLARMASS/FC_CATHODE_VOLU" "ME" Port { PortNumber 1 Name "c_v,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType MinMax Name "m,l,ca " Ports [2, 1] Position [510, 397, 540, 428] ForegroundColor "blue" Function "max" Inputs "2" InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType MinMax Name "m,v,ca" Ports [2, 1] Position [500, 342, 530, 373] ForegroundColor "blue" Function "min" Inputs "2" InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "mN2" Ports [1, 1] Position [315, 180, 345, 210] InitialCondition "mO2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Integrator Name "mO2" Ports [1, 1] Position [355, 30, 385, 60] ForegroundColor "green" InitialCondition "mO2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "mv,ca,max" Position [365, 390, 425, 420] Expr "u(1)/u(2)*VAPORMOLARMASS/R_G_U*FC_C" "ATHODE_VOLUME" } Block { BlockType Integrator Name "mw" Ports [1, 1] Position [320, 300, 350, 330] ForegroundColor "blue" InitialCondition "mWIC_CA" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "sat_pressure2" Position [245, 375, 305, 405] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "m,l,ca" Position [570, 408, 600, 422] ForegroundColor "blue" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "p_ca" Position [745, 268, 775, 282] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "w_ca" Position [1040, 218, 1070, 232] Port "3" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Ma1" Position [945, 353, 975, 367] Port "4" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Cathode_ch" Position [790, 83, 820, 97] Port "5" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "y_o2,ca" Position [850, 308, 880, 322] Port "6" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "S_ch" SrcPort 1 DstBlock "Mux5" DstPort 5 } Line { SrcBlock "Mux5" SrcPort 1 DstBlock "Cathode_ch" DstPort 1 } Line { SrcBlock "Mux7" SrcPort 1 DstBlock "To Workspace4" DstPort 1 } Line { SrcBlock "Humidity_Ratio" SrcPort 1 DstBlock "w_ca" DstPort 1 } Line { SrcBlock " " SrcPort 1 DstBlock "Humidity_Ratio" DstPort 1 } Line { SrcBlock "Ma" SrcPort 1 Points [0, 0] Branch { DstBlock "Ma1" DstPort 1 } Branch { Points [0, -125] DstBlock " " DstPort 3 } } Line { Name "y_o2,ca" Labels [1, 0] SrcBlock " 3" SrcPort 1 Points [20, 0] Branch { Points [0, -45] DstBlock "y_o2,ca" DstPort 1 } Branch { DstBlock "Ma" DstPort 1 } } Line { SrcBlock "Sum1" SrcPort 1 Points [0, 0] Branch { Points [0, 145] DstBlock "Mux7" DstPort 1 } Branch { DstBlock "p_ca" DstPort 1 } } Line { Name "p_a,ca" Labels [0, 0] SrcBlock "Sum8" SrcPort 1 Points [70, 0; 0, 40] Branch { Points [0, 0; 25, 0] Branch { Points [0, 150] DstBlock " 3" DstPort 2 } Branch { DstBlock " " DstPort 1 } } Branch { DstBlock "Sum1" DstPort 1 } } Line { Name "c_v,ca" Labels [3, 0] SrcBlock "cv,ca" SrcPort 1 Points [15, 0; 0, -455] DstBlock "Mux5" DstPort 3 } Line { Name "p_v,ca" Labels [0, 0] SrcBlock "Pv,ca" SrcPort 1 Points [5, 0; 0, -60] Branch { Labels [1, 0] DstBlock "Mux7" DstPort 2 } Branch { Points [0, -115] Branch { Points [120, 0; 0, -95] DstBlock " " DstPort 2 } Branch { Points [0, -45] DstBlock "Sum1" DstPort 2 } } } Line { SrcBlock "Mux2" SrcPort 1 Points [0, 0] Branch { Points [0, 30] DstBlock "cv,ca" DstPort 1 } Branch { Points [0, -20] DstBlock "Pv,ca" DstPort 1 } } Line { SrcBlock "m,l,ca " SrcPort 1 DstBlock "m,l,ca" DstPort 1 } Line { SrcBlock "Constant" SrcPort 1 Points [5, 0] DstBlock "m,l,ca " DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "m,l,ca " DstPort 1 } Line { SrcBlock "m,v,ca" SrcPort 1 Points [20, 0] DstBlock "Mux2" DstPort 1 } Line { SrcBlock "mw" SrcPort 1 Points [115, 0; 0, 35] Branch { DstBlock "Sum" DstPort 1 } Branch { DstBlock "m,v,ca" DstPort 1 } } Line { SrcBlock "mv,ca,max" SrcPort 1 Points [10, 0] Branch { Points [0, -40] DstBlock "m,v,ca" DstPort 2 } Branch { DstBlock "Sum" DstPort 2 } } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "mv,ca,max" DstPort 1 } Line { SrcBlock "sat_pressure2" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "mw" DstPort 1 } Line { SrcBlock "W_v,ca,out" SrcPort 1 Points [65, 0] DstBlock "Sum3" DstPort 3 } Line { SrcBlock "W_w,ca,in" SrcPort 1 Points [65, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "W_(L+v)_ca,GDL,CH" SrcPort 1 DstBlock "Sum3" DstPort 2 } Line { SrcBlock "W_n2,ca,out" SrcPort 1 Points [100, 0] DstBlock "Sum9" DstPort 2 } Line { Name "p_n2,ca" Labels [0, 0] SrcBlock "P,N2,ca" SrcPort 1 Points [100, 0] Branch { Labels [2, 0] Points [0, 220] DstBlock "Mux7" DstPort 4 } Branch { DstBlock "Sum8" DstPort 2 } } Line { Name "c_n2,ca" Labels [3, 0] SrcBlock "c,N2,ca" SrcPort 1 Points [55, 0; 0, -115] DstBlock "Mux5" DstPort 2 } Line { SrcBlock "Sum9" SrcPort 1 DstBlock "mN2" DstPort 1 } Line { SrcBlock "W_N2_in" SrcPort 1 DstBlock "Sum9" DstPort 1 } Line { SrcBlock "Mux6" SrcPort 1 Points [20, 0] Branch { Points [0, 35] DstBlock "P,N2,ca" DstPort 1 } Branch { Points [0, -20] DstBlock "c,N2,ca" DstPort 1 } } Line { SrcBlock "mN2" SrcPort 1 DstBlock "Mux6" DstPort 1 } Line { Name "c_o2,ca" Labels [1, 0] SrcBlock "c,O2,ca" SrcPort 1 Points [180, 0; 0, 20] DstBlock "Mux5" DstPort 1 } Line { Name "p_o2,ca" Labels [0, 0] SrcBlock "P,O2,ca" SrcPort 1 Points [55, 0; 0, 80] Branch { Points [0, 175; 160, 0] Branch { Labels [2, 0] Points [0, 100] DstBlock "Mux7" DstPort 3 } Branch { DstBlock " 3" DstPort 1 } } Branch { DstBlock "Sum8" DstPort 1 } } Line { SrcBlock "W_o2,ca,out" SrcPort 1 Points [165, 0] DstBlock "Sum4" DstPort 3 } Line { SrcBlock "W_A_CA,IN" SrcPort 1 Points [15, 0] Branch { Points [0, 130] DstBlock "W_N2_in" DstPort 1 } Branch { DstBlock "W_O2_in" DstPort 1 } } Line { SrcBlock "W_O2_in" SrcPort 1 Points [15, 0] Branch { DstBlock "Goto1" DstPort 1 } Branch { Points [-5, 0; 0, -20] DstBlock "Sum4" DstPort 2 } } Line { SrcBlock "mO2" SrcPort 1 DstBlock "Mux3" DstPort 1 } Line { SrcBlock "Mux3" SrcPort 1 Points [10, 0] Branch { DstBlock "P,O2,ca" DstPort 1 } Branch { DstBlock "c,O2,ca" DstPort 1 } } Line { SrcBlock "W_O2_ca,GDL,CH" SrcPort 1 DstBlock "Sum4" DstPort 1 } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "mO2" DstPort 1 } Line { Name "Tst" Labels [0, 0] SrcBlock "T_st" SrcPort 1 Points [0, 0] Branch { Points [0, 240] Branch { Points [0, 30] Branch { Points [0, 110] DstBlock "Mux2" DstPort 2 } Branch { DstBlock "Mux1" DstPort 2 } } Branch { DstBlock "sat_pressure2" DstPort 1 } } Branch { Labels [1, 0] Points [225, 0] Branch { Labels [3, 0] Points [340, 0; 0, -45] DstBlock "Mux5" DstPort 4 } Branch { Points [0, 75] DstBlock "Mux6" DstPort 2 } Branch { Points [0, -75] DstBlock "Mux3" DstPort 2 } } } } } Block { BlockType SubSystem Name "Outlet Conditions" Ports [5, 3] Position [680, 343, 790, 417] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Outlet Conditions" Location [105, 646, 723, 997] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "w_ca" Position [15, 13, 45, 27] IconDisplay "Port number" Port { PortNumber 1 Name "w_ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "p_ca" Position [15, 103, 45, 117] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "p_ca,out" Position [50, 128, 80, 142] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Ma" Position [275, 228, 305, 242] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "y_o2,ca" Position [215, 253, 245, 267] Port "5" IconDisplay "Port number" } Block { BlockType Product Name " 2" Ports [2, 1] Position [280, 82, 310, 113] NamePlacement "alternate" ShowName off Inputs "/*" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "W_a,ca,out" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name " 4" Ports [2, 1] Position [350, 237, 380, 268] ShowName off Inputs "/*" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Constant1" Position [145, 50, 175, 80] Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Constant Name "Constant2" Position [380, 315, 410, 345] NamePlacement "alternate" ShowName off Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Sum Name "Sum10" Ports [2, 1] Position [435, 320, 455, 340] NamePlacement "alternate" ShowName off IconShape "round" Inputs "-+|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [130, 125, 150, 145] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum7" Ports [2, 1] Position [205, 55, 225, 75] ShowName off IconShape "round" Inputs "++|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "W,N2,ca,out" Ports [2, 1] Position [490, 287, 520, 318] NamePlacement "alternate" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "W,O2,ca,out" Ports [2, 1] Position [470, 197, 500, 228] NamePlacement "alternate" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "W_CA_OUT" Position [180, 120, 210, 150] Gain "FC_CATHODE_OUTLET_FLOW_CONSTANT" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "W_v_CA_OUT" Ports [2, 1] Position [410, 77, 440, 108] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "xO2" Position [400, 240, 430, 270] NamePlacement "alternate" Gain "OXYGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "xO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Outport Name "W_v,ca,out" Position [495, 88, 525, 102] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_n2,ca,out" Position [555, 298, 585, 312] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_o2,ca,out" Position [540, 208, 570, 222] Port "3" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "W,N2,ca,out" SrcPort 1 DstBlock "W_n2,ca,out" DstPort 1 } Line { SrcBlock "W,O2,ca,out" SrcPort 1 DstBlock "W_o2,ca,out" DstPort 1 } Line { SrcBlock "y_o2,ca" SrcPort 1 DstBlock " 4" DstPort 2 } Line { SrcBlock "Ma" SrcPort 1 Points [0, 10] DstBlock " 4" DstPort 1 } Line { SrcBlock "Sum10" SrcPort 1 Points [5, 0; 0, -20] DstBlock "W,N2,ca,out" DstPort 2 } Line { SrcBlock "Constant2" SrcPort 1 DstBlock "Sum10" DstPort 2 } Line { Name "xO2" Labels [0, 0] SrcBlock "xO2" SrcPort 1 Points [10, -15; 0, 0] Branch { Points [0, -50] DstBlock "W,O2,ca,out" DstPort 1 } Branch { DstBlock "Sum10" DstPort 1 } } Line { SrcBlock " 4" SrcPort 1 DstBlock "xO2" DstPort 1 } Line { SrcBlock "W_v_CA_OUT" SrcPort 1 DstBlock "W_v,ca,out" DstPort 1 } Line { Name "W_a,ca,out" Labels [0, 0] SrcBlock " 2" SrcPort 1 Points [5, 0] Branch { Labels [1, 0] Points [0, 120] Branch { Labels [1, 0] DstBlock "W,O2,ca,out" DstPort 2 } Branch { Points [0, 75] DstBlock "W,N2,ca,out" DstPort 1 } } Branch { DstBlock "W_v_CA_OUT" DstPort 2 } } Line { Name "w_ca" Labels [0, 0] SrcBlock "w_ca" SrcPort 1 Points [165, 0] Branch { Points [180, 0] DstBlock "W_v_CA_OUT" DstPort 1 } Branch { DstBlock "Sum7" DstPort 1 } } Line { SrcBlock "Sum7" SrcPort 1 Points [15, 0; 0, 25] DstBlock " 2" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Sum7" DstPort 2 } Line { SrcBlock "W_CA_OUT" SrcPort 1 Points [30, 0; 0, -30] DstBlock " 2" DstPort 2 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "W_CA_OUT" DstPort 1 } Line { SrcBlock "p_ca,out" SrcPort 1 DstBlock "Sum5" DstPort 2 } Line { SrcBlock "p_ca" SrcPort 1 DstBlock "Sum5" DstPort 1 } } } Block { BlockType Terminator Name "T_CA_OUT" Position [175, 230, 195, 250] } Block { BlockType Outport Name "m,l,ca" Position [590, 138, 620, 152] ForegroundColor "blue" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Cathode_ch" Position [610, 258, 640, 272] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Mass Balance, ch" SrcPort 6 Points [5, 0; 0, 115] DstBlock "Outlet Conditions" DstPort 5 } Line { Name "P_CA" SrcBlock "Mass Balance, ch" SrcPort 2 Points [80, 0] Branch { Labels [1, 0] DstBlock "Goto" DstPort 1 } Branch { Points [0, -65; -405, 0; 0, -45] DstBlock "Inlet Conditions" DstPort 4 } Branch { Points [0, 190] DstBlock "Outlet Conditions" DstPort 2 } } Line { SrcBlock "W_(L+v)_ca,GDL,CH" SrcPort 1 DstBlock "Mass Balance, ch" DstPort 6 } Line { SrcBlock "Outlet Conditions" SrcPort 2 Points [30, 0; 0, 85; -505, 0; 0, -235] DstBlock "Mass Balance, ch" DstPort 5 } Line { SrcBlock "W_O2_ca,GDL,CH" SrcPort 1 DstBlock "Mass Balance, ch" DstPort 4 } Line { Name "RH_CA_IN" Labels [0, 0] SrcBlock "Demux" SrcPort 3 Points [60, 0; 0, -115] DstBlock "Inlet Conditions" DstPort 3 } Line { SrcBlock "Inlet Conditions" SrcPort 1 Points [0, 220] DstBlock "Mass Balance, ch" DstPort 7 } Line { SrcBlock "Outlet Conditions" SrcPort 3 Points [15, 0; 0, 45; -480, 0; 0, -260] DstBlock "Mass Balance, ch" DstPort 3 } Line { Name "Ma" SrcBlock "Mass Balance, ch" SrcPort 4 Points [30, 0; 0, 160] DstBlock "Outlet Conditions" DstPort 4 } Line { SrcBlock "Cathode Inputs" SrcPort 1 DstBlock "Demux" DstPort 1 } Line { Name "P_CA_IN" Labels [0, 0] SrcBlock "Demux" SrcPort 1 Points [15, 0; 0, -35] DstBlock "Inlet Conditions" DstPort 5 } Line { Name "T_CA_IN" Labels [0, 0] SrcBlock "Demux" SrcPort 2 Points [50, 0; 0, -105] DstBlock "Inlet Conditions" DstPort 2 } Line { Name "W_A_CA_iIN" Labels [0, 0] SrcBlock "Demux" SrcPort 4 Points [80, 0; 0, -40] Branch { DstBlock "Mass Balance, ch" DstPort 1 } Branch { Points [0, -130] DstBlock "Inlet Conditions" DstPort 1 } } Line { Name "P_CA_OUT" Labels [0, 0] SrcBlock "Demux" SrcPort 5 Points [140, 0; 0, 165] DstBlock "Outlet Conditions" DstPort 3 } Line { Name "T_CA_OUT" Labels [0, 0] SrcBlock "Demux" SrcPort 6 DstBlock "T_CA_OUT" DstPort 1 } Line { Name "T_ST" Labels [0, 0] SrcBlock "Demux" SrcPort 7 Points [170, 0; 0, -95] DstBlock "Mass Balance, ch" DstPort 2 } Line { SrcBlock "Mass Balance, ch" SrcPort 1 DstBlock "m,l,ca" DstPort 1 } Line { SrcBlock "Mass Balance, ch" SrcPort 3 Points [95, 0; 0, 145] DstBlock "Outlet Conditions" DstPort 1 } Line { SrcBlock "Mass Balance, ch" SrcPort 5 DstBlock "Cathode_ch" DstPort 1 } Line { SrcBlock "Outlet Conditions" SrcPort 1 Points [20, 0; 0, -20; -400, 0] DstBlock "Mass Balance, ch" DstPort 8 } } } Block { BlockType Demux Name "Demux" Ports [1, 9] Position [280, 194, 285, 316] Orientation "left" BackgroundColor "black" NamePlacement "alternate" ShowName off Outputs "9" DisplayOption "bar" } Block { BlockType SubSystem Name "GDL_Section 1" Ports [4, 1] Position [765, 112, 860, 173] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "GDL_Section 1" Location [300, 587, 1157, 1036] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Cathode_k+1" Position [15, 238, 45, 252] ForegroundColor "orange" IconDisplay "Port number" } Block { BlockType Inport Name "W,O2,rct" Position [70, 13, 100, 27] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "WO2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "Wv,mb" Position [70, 58, 100, 72] Port "3" IconDisplay "Port number" Port { PortNumber 1 Name "Wv_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "Tst" Position [70, 118, 100, 132] Port "4" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "T_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Calc R_evap" Ports [3, 1] Position [465, 213, 545, 267] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Revap" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc R_evap" Location [152, 777, 733, 986] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "cv" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [35, 108, 65, 122] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "s_k" Position [35, 168, 65, 182] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " 5" Ports [2, 1] Position [145, 62, 175, 93] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Pv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [250, 72, 280, 103] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "No Evap" Position [360, 127, 380, 153] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "RGU" Position [75, 13, 110, 47] Gain "R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum7" Ports [2, 1] Position [205, 70, 225, 90] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" Position [470, 95, 500, 125] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Switch Name "Switch3" Position [400, 85, 430, 115] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Gain Name "gamma/R" Position [305, 75, 335, 105] Gain "0.9*Alg_V/R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure1" Position [170, 102, 205, 128] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "R_evap" Position [525, 103, 555, 117] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "s_k" SrcPort 1 Points [280, 0; 0, -75] DstBlock "Switch3" DstPort 2 } Line { SrcBlock "cv" SrcPort 1 DstBlock "RGU" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 DstBlock "R_evap" DstPort 1 } Line { SrcBlock "Switch3" SrcPort 1 DstBlock "Switch" DstPort 1 } Line { SrcBlock "No Evap" SrcPort 1 DstBlock "Switch3" DstPort 3 } Line { SrcBlock "gamma/R" SrcPort 1 Points [35, 0] Branch { Points [0, -25; 70, 0; 0, 45] Branch { Points [0, 10] DstBlock "Switch" DstPort 3 } Branch { DstBlock "Switch" DstPort 2 } } Branch { DstBlock "Switch3" DstPort 1 } } Line { SrcBlock "Divide" SrcPort 1 DstBlock "gamma/R" DstPort 1 } Line { SrcBlock "sat_pressure1" SrcPort 1 Points [5, 0] DstBlock "Sum7" DstPort 2 } Line { SrcBlock "Sum7" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { Name "Pv" Labels [0, 0] SrcBlock " 5" SrcPort 1 DstBlock "Sum7" DstPort 1 } Line { SrcBlock "RGU" SrcPort 1 Points [0, 40] DstBlock " 5" DstPort 1 } Line { Name "Tst" SrcBlock "T_st" SrcPort 1 Points [25, 0] Branch { Points [0, -30] DstBlock " 5" DstPort 2 } Branch { Points [0, 35; 140, 0] DstBlock "Divide" DstPort 2 } Branch { DstBlock "sat_pressure1" DstPort 1 } } } } Block { BlockType SubSystem Name "Calc W_O2" Ports [3, 2] Position [365, 13, 470, 67] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc W_O2" Location [184, 774, 1021, 1029] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_O2(k-1)" Position [15, 113, 45, 127] IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "WO2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "c_O2(k+1)" Position [15, 158, 45, 172] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_k" Position [15, 198, 45, 212] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " " Ports [2, 1] Position [520, 77, 550, 108] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "NO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-A_gdl/Vp" Position [245, 70, 275, 100] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "1/dy" Position [415, 70, 445, 100] Gain "1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "d/dy(cO2)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "O2_FlowtoFlux" Position [130, 103, 165, 137] Gain "1/GDL_AREA/OXYGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "O2_FluxtoFlow" Position [680, 53, 715, 87] Gain "GDL_AREA*OXYGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [195, 75, 215, 95] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [375, 75, 395, 95] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cO2" Ports [1, 1] Position [305, 70, 335, 100] ForegroundColor "green" InitialCondition "cO2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [380, 190, 440, 220] Expr "-D_O2*GDL_POR*((GDL_POR-0.11)/(1-0." "11))^0.785*(1-u)^2" } Block { BlockType Outport Name "c_O2(k)" Position [775, 128, 805, 142] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_O2(k)" Position [765, 63, 795, 77] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { Name "Tst" Labels [0, 0] SrcBlock "W_O2(k-1)" SrcPort 1 DstBlock "O2_FlowtoFlux" DstPort 1 } Line { SrcBlock "c_O2(k+1)" SrcPort 1 Points [335, 0] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [60, 0] DstBlock " " DstPort 2 } Line { SrcBlock "O2_FluxtoFlow" SrcPort 1 DstBlock "W_O2(k)" DstPort 1 } Line { SrcBlock "O2_FlowtoFlux" SrcPort 1 Points [35, 0] DstBlock "Sum" DstPort 2 } Line { Name "NO2" Labels [1, 0] SrcBlock " " SrcPort 1 Points [105, 0; 0, -25] Branch { DstBlock "O2_FluxtoFlow" DstPort 1 } Branch { Labels [1, 0] Points [0, -15; -485, 0; 0, 30] DstBlock "Sum" DstPort 1 } } Line { Name "d/dy(cO2)" Labels [0, 0] SrcBlock "1/dy" SrcPort 1 DstBlock " " DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "1/dy" DstPort 1 } Line { SrcBlock "cO2" SrcPort 1 Points [15, 0] Branch { Points [0, 50] DstBlock "c_O2(k)" DstPort 1 } Branch { DstBlock "Sum1" DstPort 1 } } Line { SrcBlock "-A_gdl/Vp" SrcPort 1 DstBlock "cO2" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "-A_gdl/Vp" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wl" Ports [2, 1] Position [375, 339, 435, 381] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc Wl" Location [261, 851, 852, 996] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "s_k" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "s_k+1" Position [15, 73, 45, 87] Port "2" IconDisplay "Port number" } Block { BlockType Product Name " 6" Ports [2, 1] Position [325, 42, 355, 73] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "1/dy" Position [255, 65, 285, 95] Gain "1/(delta_y)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "S" Position [70, 17, 110, 43] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S1" Position [70, 67, 110, 93] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S2" Position [245, 17, 285, 43] Expr "-GDL_AREA/H20_L_VISC*WATERDENSITY*K" "_PERM*u^3*(1.417-2*2.12*u+3*1.263*u^2)*(H20_SURF_T*0.5)/sqrt(K_PERM/GDL_POR)" } Block { BlockType Saturate Name "Saturation" Position [125, 15, 155, 45] UpperLimit "inf" LowerLimit "0" Port { PortNumber 1 Name "S(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Saturate Name "Saturation1" Position [125, 65, 155, 95] UpperLimit "inf" LowerLimit "0" } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [200, 70, 220, 90] ShowName off IconShape "round" Inputs "-+|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Wl" Position [385, 53, 415, 67] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Saturation1" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { SrcBlock "s_k+1" SrcPort 1 DstBlock "S1" DstPort 1 } Line { SrcBlock "S1" SrcPort 1 DstBlock "Saturation1" DstPort 1 } Line { SrcBlock " 6" SrcPort 1 DstBlock "Wl" DstPort 1 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "S" DstPort 1 } Line { SrcBlock "1/dy" SrcPort 1 Points [10, 0; 0, -15] DstBlock " 6" DstPort 2 } Line { SrcBlock "S2" SrcPort 1 Points [10, 0; 0, 20] DstBlock " 6" DstPort 1 } Line { Name "S(k)" Labels [0, 0] SrcBlock "Saturation" SrcPort 1 Points [50, 0] Branch { DstBlock "S2" DstPort 1 } Branch { DstBlock "Sum2" DstPort 1 } } Line { SrcBlock "S" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "1/dy" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wv_(k)" Ports [4, 2] Position [370, 93, 470, 152] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc Wv_(k)" Location [470, 705, 1217, 988] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wv_(k-1)" Position [15, 38, 45, 52] IconDisplay "Port number" } Block { BlockType Inport Name "cv_(k+1)" Position [70, 183, 100, 197] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_(k)" Position [70, 218, 100, 232] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [70, 143, 100, 157] Port "4" IconDisplay "Port number" } Block { BlockType Product Name " 1" Ports [2, 1] Position [490, 107, 520, 138] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Nv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "-D_j" Position [250, 210, 310, 240] Expr "-D_V*GDL_POR*((GDL_POR-0.11)/(1-0.1" "1))^0.785*(1-u)^2" } Block { BlockType Gain Name "1/dy" Position [380, 100, 410, 130] Gain "1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain2" Position [180, 100, 210, 130] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [140, 105, 160, 125] ShowName off IconShape "round" Inputs "-|+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [335, 105, 355, 125] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [235, 105, 255, 125] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FlowtoFlux" Position [90, 28, 125, 62] Gain "1/GDL_AREA/VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FluxtoFlow" Position [620, 108, 655, 142] Gain "GDL_AREA*VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cv1" Ports [1, 1] Position [270, 100, 300, 130] ForegroundColor "blue" InitialCondition "cv_IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "Wv_(k)" Position [700, 118, 730, 132] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "cv_(k)" Position [700, 53, 730, 67] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Wv_(k-1)" SrcPort 1 DstBlock "V_FlowtoFlux" DstPort 1 } Line { SrcBlock "V_FlowtoFlux" SrcPort 1 Points [20, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "R_evap" SrcPort 1 Points [140, 0] DstBlock "Sum5" DstPort 2 } Line { SrcBlock "cv_(k+1)" SrcPort 1 Points [240, 0] DstBlock "Sum4" DstPort 2 } Line { SrcBlock "s_(k)" SrcPort 1 DstBlock "-D_j" DstPort 1 } Line { SrcBlock "-D_j" SrcPort 1 Points [140, 0; 0, -95] DstBlock " 1" DstPort 2 } Line { SrcBlock "V_FluxtoFlow" SrcPort 1 DstBlock "Wv_(k)" DstPort 1 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "cv1" DstPort 1 } Line { SrcBlock "Gain2" SrcPort 1 DstBlock "Sum5" DstPort 1 } Line { Name "Nv" Labels [1, 0] SrcBlock " 1" SrcPort 1 Points [45, 0] Branch { Points [0, 45; -420, 0] DstBlock "Sum3" DstPort 2 } Branch { Labels [1, 0] DstBlock "V_FluxtoFlow" DstPort 1 } } Line { Labels [0, 0] SrcBlock "1/dy" SrcPort 1 DstBlock " 1" DstPort 1 } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "1/dy" DstPort 1 } Line { SrcBlock "cv1" SrcPort 1 Points [5, 0] Branch { Points [0, -55] DstBlock "cv_(k)" DstPort 1 } Branch { DstBlock "Sum4" DstPort 1 } } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Gain2" DstPort 1 } Annotation { Name "d/dy(cv)" Position [445, 107] UseDisplayTextAsClickCallback off } } } Block { BlockType Demux Name "Demux3" Ports [1, 9] Position [75, 153, 80, 337] ForegroundColor "orange" BackgroundColor "black" ShowName off Outputs "9" DisplayOption "bar" Port { PortNumber 1 Name "CO2_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CN2_(k+1)" PropagatedSignals "CN2_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "CV (k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "WH2_(k+1)" PropagatedSignals "WO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "WN2_(k+1)" PropagatedSignals "WN2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Wv_(k+1)" PropagatedSignals "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "S_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 8 Name "Wl_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 9 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Mass Balance" Ports [2, 1] Position [245, 261, 325, 314] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Mass Balance" Location [126, 789, 471, 970] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wl_k" Position [20, 43, 50, 57] IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [20, 118, 50, 132] Port "2" IconDisplay "Port number" } Block { BlockType Gain Name "1/(rho*Vp)" Position [165, 58, 180, 92] Gain "1/(WATERDENSITY*V_P)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Mv*Vp" Position [80, 110, 110, 140] Gain "VAPORMOLARMASS*V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum6" Ports [2, 1] Position [125, 65, 145, 85] ShowName off IconShape "round" Inputs "--" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "s" Ports [1, 1] Position [200, 60, 230, 90] ForegroundColor "green" InitialCondition "sIC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "s_k" Position [265, 68, 295, 82] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Mv*Vp" SrcPort 1 Points [20, 0] DstBlock "Sum6" DstPort 2 } Line { SrcBlock "Wl_k" SrcPort 1 DstBlock "Sum6" DstPort 1 } Line { SrcBlock "s" SrcPort 1 DstBlock "s_k" DstPort 1 } Line { SrcBlock "R_evap" SrcPort 1 DstBlock "Mv*Vp" DstPort 1 } Line { SrcBlock "1/(rho*Vp)" SrcPort 1 DstBlock "s" DstPort 1 } Line { SrcBlock "Sum6" SrcPort 1 DstBlock "1/(rho*Vp)" DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [9, 1] Position [680, 153, 685, 337] ShowName off Inputs "9" DisplayOption "bar" } Block { BlockType Constant Name "No Evap3" Position [600, 229, 630, 261] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" Port { PortNumber 1 Name "WN2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name "Terminator" Position [160, 315, 180, 335] ShowName off } Block { BlockType Terminator Name "Terminator1" Position [160, 255, 180, 275] ShowName off } Block { BlockType Terminator Name "Terminator2" Position [160, 215, 180, 235] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator3" Position [160, 295, 180, 315] ShowName off } Block { BlockType Terminator Name "Terminator5" Position [160, 235, 180, 255] NamePlacement "alternate" ShowName off } Block { BlockType Outport Name "Cathode_k" Position [720, 238, 750, 252] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Calc Wv_(k)" SrcPort 1 Points [110, 0; 0, 155] DstBlock "Mux" DstPort 6 } Line { SrcBlock "Calc W_O2" SrcPort 2 Points [135, 0; 0, 170] DstBlock "Mux" DstPort 4 } Line { SrcBlock "Calc W_O2" SrcPort 1 Points [150, 0; 0, 135] DstBlock "Mux" DstPort 1 } Line { Name "CO2_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 1 Points [220, 0; 0, -125] DstBlock "Calc W_O2" DstPort 2 } Line { SrcBlock "Calc Wv_(k)" SrcPort 2 Points [5, 0; 0, 55] Branch { Points [0, 10] DstBlock "Mux" DstPort 3 } Branch { Points [-40, 0; 0, 25] DstBlock "Calc R_evap" DstPort 1 } } Line { Name "CV (k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 3 Points [230, 0; 0, -90] DstBlock "Calc Wv_(k)" DstPort 2 } Line { Name "Revap" Labels [0, 0] SrcBlock "Calc R_evap" SrcPort 1 Points [10, 0] Branch { Points [0, -70; -215, 0; 0, -25] DstBlock "Calc Wv_(k)" DstPort 4 } Branch { Points [0, 95; -330, 0] DstBlock "Mass Balance" DstPort 2 } } Line { SrcBlock "Calc Wl" SrcPort 1 Points [5, 0] Branch { Points [0, 45; -225, 0; 0, -130] DstBlock "Mass Balance" DstPort 1 } Branch { Points [155, 0; 0, -55] DstBlock "Mux" DstPort 8 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Cathode_k" DstPort 1 } Line { SrcBlock "Cathode_k+1" SrcPort 1 DstBlock "Demux3" DstPort 1 } Line { Name "Tst" Labels [0, 0] SrcBlock "Tst" SrcPort 1 Points [105, 0; 0, 115] Branch { DstBlock "Calc R_evap" DstPort 2 } Branch { Points [0, 175; 400, 0; 0, -90] DstBlock "Mux" DstPort 9 } } Line { Name "Wv_(k-1)" Labels [0, 0] SrcBlock "Wv,mb" SrcPort 1 Points [210, 0; 0, 35] DstBlock "Calc Wv_(k)" DstPort 1 } Line { Name "WO2_(k-1)" Labels [0, 0] SrcBlock "W,O2,rct" SrcPort 1 DstBlock "Calc W_O2" DstPort 1 } Line { Name "Tst" Labels [0, 0] SrcBlock "Demux3" SrcPort 9 DstBlock "Terminator" DstPort 1 } Line { SrcBlock "Mass Balance" SrcPort 1 Points [10, 0] Branch { Points [0, -30] Branch { Points [0, -130] Branch { Points [0, -70] DstBlock "Calc W_O2" DstPort 3 } Branch { DstBlock "Calc Wv_(k)" DstPort 3 } } Branch { DstBlock "Calc R_evap" DstPort 3 } } Branch { Points [250, 0; 0, -5] DstBlock "Mux" DstPort 7 } Branch { Points [0, 60] DstBlock "Calc Wl" DstPort 1 } } Line { Name "Wl_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 8 DstBlock "Terminator3" DstPort 1 } Line { Name "S_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 7 Points [110, 0; 0, 85] DstBlock "Calc Wl" DstPort 2 } Line { Name "Wv_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 6 DstBlock "Terminator1" DstPort 1 } Line { Name "WH2_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 4 DstBlock "Terminator2" DstPort 1 } Line { Name "WN2_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 5 DstBlock "Terminator5" DstPort 1 } Line { Name "CN2_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 2 DstBlock "Mux" DstPort 2 } Line { Name "WN2" Labels [0, 0] SrcBlock "No Evap3" SrcPort 1 DstBlock "Mux" DstPort 5 } Annotation { Name "CATHODE_k \n1. c_o2(k) \n2. c_n2(k) \n3" ". c_v(k) \n4. W_o2 (k) \n5. W_n2 (k) \n6. W_v(k) \n7. s_ca(k) \n8. W_l_ca(k)" "\n9. T_ca(k)" Position [743, 343] ForegroundColor "red" UseDisplayTextAsClickCallback off } Annotation { Position [846, 401] UseDisplayTextAsClickCallback off } } } Block { BlockType SubSystem Name "GDL_Section 2" Ports [2, 1] Position [560, 99, 675, 141] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "GDL_Section 2" Location [204, 411, 968, 978] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Cathode_k+1" Position [20, 303, 50, 317] ForegroundColor "orange" IconDisplay "Port number" } Block { BlockType Inport Name "Cathode_k-1" Position [15, 118, 45, 132] Port "2" IconDisplay "Port number" } Block { BlockType Terminator Name " 2" Position [170, 55, 190, 75] ShowName off } Block { BlockType Terminator Name " 3" Position [170, 15, 190, 35] ShowName off } Block { BlockType Terminator Name " 6" Position [170, 35, 190, 55] ShowName off } Block { BlockType SubSystem Name "Calc R_evap" Ports [3, 1] Position [480, 288, 560, 342] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc R_evap" Location [589, 768, 1170, 977] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "cv" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [35, 108, 65, 122] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "s_k" Position [35, 168, 65, 182] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " 5" Ports [2, 1] Position [145, 62, 175, 93] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Pv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [250, 72, 280, 103] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "No Evap" Position [360, 127, 380, 153] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "RGU" Position [75, 13, 110, 47] Gain "R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum7" Ports [2, 1] Position [205, 70, 225, 90] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" Position [470, 95, 500, 125] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Switch Name "Switch3" Position [400, 85, 430, 115] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Gain Name "gamma/R" Position [305, 75, 335, 105] Gain "0.9*Alg_V/R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure1" Position [170, 102, 205, 128] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "R_evap" Position [525, 103, 555, 117] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "Tst" SrcBlock "T_st" SrcPort 1 Points [25, 0] Branch { DstBlock "sat_pressure1" DstPort 1 } Branch { Points [0, 35; 140, 0] DstBlock "Divide" DstPort 2 } Branch { Points [0, -30] DstBlock " 5" DstPort 2 } } Line { SrcBlock "RGU" SrcPort 1 Points [0, 40] DstBlock " 5" DstPort 1 } Line { Name "Pv" Labels [0, 0] SrcBlock " 5" SrcPort 1 DstBlock "Sum7" DstPort 1 } Line { SrcBlock "Sum7" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { SrcBlock "sat_pressure1" SrcPort 1 Points [5, 0] DstBlock "Sum7" DstPort 2 } Line { SrcBlock "Divide" SrcPort 1 DstBlock "gamma/R" DstPort 1 } Line { SrcBlock "gamma/R" SrcPort 1 Points [35, 0] Branch { DstBlock "Switch3" DstPort 1 } Branch { Points [0, -25; 70, 0; 0, 45] Branch { DstBlock "Switch" DstPort 2 } Branch { Points [0, 10] DstBlock "Switch" DstPort 3 } } } Line { SrcBlock "No Evap" SrcPort 1 DstBlock "Switch3" DstPort 3 } Line { SrcBlock "Switch3" SrcPort 1 DstBlock "Switch" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 DstBlock "R_evap" DstPort 1 } Line { SrcBlock "cv" SrcPort 1 DstBlock "RGU" DstPort 1 } Line { SrcBlock "s_k" SrcPort 1 Points [280, 0; 0, -75] DstBlock "Switch3" DstPort 2 } } } Block { BlockType SubSystem Name "Calc W_O2" Ports [3, 2] Position [360, 53, 465, 107] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 2 Name "WO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc W_O2" Location [184, 774, 1021, 1029] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_O2(k-1)" Position [15, 113, 45, 127] IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "WO2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "c_O2(k+1)" Position [15, 158, 45, 172] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_k" Position [15, 198, 45, 212] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " " Ports [2, 1] Position [520, 77, 550, 108] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "NO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-A_gdl/Vp" Position [245, 70, 275, 100] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "1/dy" Position [415, 70, 445, 100] Gain "1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "d/dy(cO2)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "O2_FlowtoFlux" Position [130, 103, 165, 137] Gain "1/GDL_AREA/OXYGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "O2_FluxtoFlow" Position [680, 53, 715, 87] Gain "GDL_AREA*OXYGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [195, 75, 215, 95] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [375, 75, 395, 95] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cO2" Ports [1, 1] Position [305, 70, 335, 100] ForegroundColor "green" InitialCondition "cO2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [380, 190, 440, 220] Expr "-D_O2*GDL_POR*((GDL_POR-0.11)/(1-0." "11))^0.785*(1-u)^2" } Block { BlockType Outport Name "c_O2(k)" Position [775, 128, 805, 142] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_O2(k)" Position [765, 63, 795, 77] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum" SrcPort 1 DstBlock "-A_gdl/Vp" DstPort 1 } Line { SrcBlock "-A_gdl/Vp" SrcPort 1 DstBlock "cO2" DstPort 1 } Line { SrcBlock "cO2" SrcPort 1 Points [15, 0] Branch { DstBlock "Sum1" DstPort 1 } Branch { Points [0, 50] DstBlock "c_O2(k)" DstPort 1 } } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "1/dy" DstPort 1 } Line { Name "d/dy(cO2)" Labels [0, 0] SrcBlock "1/dy" SrcPort 1 DstBlock " " DstPort 1 } Line { Name "NO2" Labels [1, 0] SrcBlock " " SrcPort 1 Points [105, 0; 0, -25] Branch { Labels [1, 0] Points [0, -15; -485, 0; 0, 30] DstBlock "Sum" DstPort 1 } Branch { DstBlock "O2_FluxtoFlow" DstPort 1 } } Line { SrcBlock "O2_FlowtoFlux" SrcPort 1 Points [35, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "O2_FluxtoFlow" SrcPort 1 DstBlock "W_O2(k)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [60, 0] DstBlock " " DstPort 2 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "c_O2(k+1)" SrcPort 1 Points [335, 0] DstBlock "Sum1" DstPort 2 } Line { Name "Tst" Labels [0, 0] SrcBlock "W_O2(k-1)" SrcPort 1 DstBlock "O2_FlowtoFlux" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wl" Ports [2, 1] Position [420, 459, 480, 501] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc Wl" Location [762, 875, 1228, 1005] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "s_k" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "s_k+1" Position [15, 73, 45, 87] Port "2" IconDisplay "Port number" } Block { BlockType Product Name " 6" Ports [2, 1] Position [325, 42, 355, 73] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "1/dy" Position [255, 65, 285, 95] Gain "1/(delta_y)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "S" Position [70, 17, 110, 43] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S1" Position [70, 67, 110, 93] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S2" Position [245, 17, 285, 43] Expr "-GDL_AREA/H20_L_VISC*WATERDENSITY*K" "_PERM*u^3*(1.417-2*2.12*u+3*1.263*u^2)*(H20_SURF_T*0.5)/sqrt(K_PERM/GDL_POR)" } Block { BlockType Saturate Name "Saturation" Position [125, 15, 155, 45] UpperLimit "inf" LowerLimit "0" Port { PortNumber 1 Name "S(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Saturate Name "Saturation1" Position [145, 65, 175, 95] UpperLimit "inf" LowerLimit "0" } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [200, 70, 220, 90] ShowName off IconShape "round" Inputs "-+|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Wl" Position [385, 53, 415, 67] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "1/dy" DstPort 1 } Line { SrcBlock "S" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { Name "S(k)" Labels [0, 0] SrcBlock "Saturation" SrcPort 1 Points [50, 0] Branch { DstBlock "Sum2" DstPort 1 } Branch { DstBlock "S2" DstPort 1 } } Line { SrcBlock "S2" SrcPort 1 Points [10, 0; 0, 20] DstBlock " 6" DstPort 1 } Line { SrcBlock "1/dy" SrcPort 1 Points [10, 0; 0, -15] DstBlock " 6" DstPort 2 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "S" DstPort 1 } Line { SrcBlock " 6" SrcPort 1 DstBlock "Wl" DstPort 1 } Line { SrcBlock "S1" SrcPort 1 DstBlock "Saturation1" DstPort 1 } Line { SrcBlock "s_k+1" SrcPort 1 DstBlock "S1" DstPort 1 } Line { SrcBlock "Saturation1" SrcPort 1 DstBlock "Sum2" DstPort 2 } } } Block { BlockType SubSystem Name "Calc Wv_(k)" Ports [4, 2] Position [355, 168, 455, 227] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc Wv_(k)" Location [163, 701, 910, 984] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wv_(k-1)" Position [15, 38, 45, 52] IconDisplay "Port number" } Block { BlockType Inport Name "cv_(k+1)" Position [70, 183, 100, 197] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_(k)" Position [70, 218, 100, 232] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [70, 143, 100, 157] Port "4" IconDisplay "Port number" } Block { BlockType Product Name " 1" Ports [2, 1] Position [490, 107, 520, 138] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Nv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "-D_j" Position [250, 210, 310, 240] Expr "-D_V*GDL_POR*((GDL_POR-0.11)/(1-0.1" "1))^0.785*(1-u)^2" } Block { BlockType Gain Name "1/dy" Position [380, 100, 410, 130] Gain "1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain2" Position [180, 100, 210, 130] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [140, 105, 160, 125] ShowName off IconShape "round" Inputs "-|+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [335, 105, 355, 125] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [235, 105, 255, 125] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FlowtoFlux" Position [90, 28, 125, 62] Gain "1/GDL_AREA/VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FluxtoFlow" Position [620, 108, 655, 142] Gain "GDL_AREA*VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cv1" Ports [1, 1] Position [270, 100, 300, 130] ForegroundColor "blue" InitialCondition "cv_IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "Wv_(k)" Position [700, 118, 730, 132] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "cv_(k)" Position [700, 53, 730, 67] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Gain2" DstPort 1 } Line { SrcBlock "cv1" SrcPort 1 Points [5, 0] Branch { DstBlock "Sum4" DstPort 1 } Branch { Points [0, -55] DstBlock "cv_(k)" DstPort 1 } } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "1/dy" DstPort 1 } Line { Labels [0, 0] SrcBlock "1/dy" SrcPort 1 DstBlock " 1" DstPort 1 } Line { Name "Nv" Labels [1, 0] SrcBlock " 1" SrcPort 1 Points [45, 0] Branch { Labels [1, 0] DstBlock "V_FluxtoFlow" DstPort 1 } Branch { Points [0, 45; -420, 0] DstBlock "Sum3" DstPort 2 } } Line { SrcBlock "Gain2" SrcPort 1 DstBlock "Sum5" DstPort 1 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "cv1" DstPort 1 } Line { SrcBlock "V_FluxtoFlow" SrcPort 1 DstBlock "Wv_(k)" DstPort 1 } Line { SrcBlock "-D_j" SrcPort 1 Points [140, 0; 0, -95] DstBlock " 1" DstPort 2 } Line { SrcBlock "s_(k)" SrcPort 1 DstBlock "-D_j" DstPort 1 } Line { SrcBlock "cv_(k+1)" SrcPort 1 Points [240, 0] DstBlock "Sum4" DstPort 2 } Line { SrcBlock "R_evap" SrcPort 1 Points [140, 0] DstBlock "Sum5" DstPort 2 } Line { SrcBlock "V_FlowtoFlux" SrcPort 1 Points [20, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Wv_(k-1)" SrcPort 1 DstBlock "V_FlowtoFlux" DstPort 1 } Annotation { Name "d/dy(cv)" Position [445, 107] UseDisplayTextAsClickCallback off } } } Block { BlockType Demux Name "Demux1" Ports [1, 9] Position [100, 13, 105, 197] BackgroundColor "black" ShowName off Outputs "9" DisplayOption "bar" Port { PortNumber 1 Name "CO2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CN2_(k-1)" PropagatedSignals "CN2_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "CV (k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "WO2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "WN2_(k-1)" PropagatedSignals "WN2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Wv_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "S_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 8 Name "Wl_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 9 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Demux Name "Demux3" Ports [1, 9] Position [75, 218, 80, 402] ForegroundColor "orange" BackgroundColor "black" ShowName off Outputs "9" DisplayOption "bar" Port { PortNumber 1 Name "CO2_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CN2_(k+1)" PropagatedSignals "CN2_CH" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "CV (k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "WO2_(k+1)" PropagatedSignals "WO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "WN2_(k+1)" PropagatedSignals "WN2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Wv_(k+1)" PropagatedSignals "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "s_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 8 Name "Wl_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 9 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Mass Balance" Ports [3, 1] Position [245, 374, 325, 426] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Mass Balance" Location [910, 829, 1255, 1010] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wl_k-1" Position [20, 13, 50, 27] IconDisplay "Port number" } Block { BlockType Inport Name "Wl_k" Position [20, 68, 50, 82] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [20, 118, 50, 132] Port "3" IconDisplay "Port number" } Block { BlockType Gain Name "1/(rho*Vp)" Position [165, 58, 180, 92] Gain "1/(WATERDENSITY*V_P)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Mv*Vp" Position [80, 110, 110, 140] Gain "VAPORMOLARMASS*V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum6" Ports [3, 1] Position [125, 65, 145, 85] ShowName off IconShape "round" Inputs "+--" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "s" Ports [1, 1] Position [200, 60, 230, 90] ForegroundColor "green" InitialCondition "sIC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "s_k" Position [265, 68, 295, 82] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum6" SrcPort 1 DstBlock "1/(rho*Vp)" DstPort 1 } Line { SrcBlock "Mv*Vp" SrcPort 1 Points [20, 0] DstBlock "Sum6" DstPort 3 } Line { SrcBlock "1/(rho*Vp)" SrcPort 1 DstBlock "s" DstPort 1 } Line { SrcBlock "R_evap" SrcPort 1 DstBlock "Mv*Vp" DstPort 1 } Line { SrcBlock "Wl_k-1" SrcPort 1 Points [80, 0] DstBlock "Sum6" DstPort 1 } Line { SrcBlock "Wl_k" SrcPort 1 DstBlock "Sum6" DstPort 2 } Line { SrcBlock "s" SrcPort 1 DstBlock "s_k" DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [9, 1] Position [685, 218, 690, 402] ShowName off Inputs "9" DisplayOption "bar" } Block { BlockType Constant Name "No Evap3" Position [630, 294, 660, 326] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" Port { PortNumber 1 Name "WN2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name "Terminator" Position [140, 380, 160, 400] ShowName off } Block { BlockType Terminator Name "Terminator1" Position [140, 320, 160, 340] ShowName off } Block { BlockType Terminator Name "Terminator2" Position [140, 280, 160, 300] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator3" Position [140, 360, 160, 380] ShowName off } Block { BlockType Terminator Name "Terminator4" Position [170, 135, 190, 155] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator5" Position [140, 300, 160, 320] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator6" Position [170, 95, 190, 115] NamePlacement "alternate" ShowName off } Block { BlockType Outport Name "Cathode_k" Position [725, 303, 755, 317] IconDisplay "Port number" BusOutputAsStruct off } Line { Name "WN2" Labels [0, 0] SrcBlock "No Evap3" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { Name "CN2_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 2 DstBlock " 6" DstPort 1 } Line { Name "WN2_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 5 DstBlock "Terminator6" DstPort 1 } Line { Name "WN2_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 5 DstBlock "Terminator5" DstPort 1 } Line { Name "WO2_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 4 DstBlock "Terminator2" DstPort 1 } Line { Name "Wv_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 6 DstBlock "Terminator1" DstPort 1 } Line { Name "Wl_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 8 DstBlock "Terminator3" DstPort 1 } Line { SrcBlock "Cathode_k-1" SrcPort 1 Points [25, 0; 0, -20] DstBlock "Demux1" DstPort 1 } Line { Name "WO2" Labels [0, 0] SrcBlock "Calc W_O2" SrcPort 2 Points [155, 0; 0, 195] DstBlock "Mux" DstPort 4 } Line { Name "Tst" Labels [0, 0] SrcBlock "Demux3" SrcPort 9 DstBlock "Terminator" DstPort 1 } Line { Name "CO2_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 1 DstBlock " 3" DstPort 1 } Line { Name "CV (k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 3 DstBlock " 2" DstPort 1 } Line { Name "S_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 7 DstBlock "Terminator4" DstPort 1 } Line { SrcBlock "Cathode_k+1" SrcPort 1 DstBlock "Demux3" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Cathode_k" DstPort 1 } Line { SrcBlock "Calc W_O2" SrcPort 1 Points [200, 0] DstBlock "Mux" DstPort 1 } Line { Name "WO2_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 4 Points [90, 0; 0, -25] DstBlock "Calc W_O2" DstPort 1 } Line { Name "s_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 7 Points [85, 0; 0, 140] DstBlock "Calc Wl" DstPort 2 } Line { SrcBlock "Calc Wl" SrcPort 1 Points [0, 0] Branch { Points [0, 35; -270, 0; 0, -115] DstBlock "Mass Balance" DstPort 2 } Branch { Points [145, 0; 0, -110] DstBlock "Mux" DstPort 8 } } Line { Name "Tst" Labels [0, 0] SrcBlock "Demux1" SrcPort 9 Points [85, 0; 0, 130] Branch { DstBlock "Calc R_evap" DstPort 2 } Branch { Points [0, 225; 455, 0; 0, -150] DstBlock "Mux" DstPort 9 } } Line { Name "Wv_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 6 Points [165, 0; 0, 50] DstBlock "Calc Wv_(k)" DstPort 1 } Line { SrcBlock "Mass Balance" SrcPort 1 Points [5, 0] Branch { Points [0, 70] DstBlock "Calc Wl" DstPort 1 } Branch { Points [0, -65] Branch { DstBlock "Calc R_evap" DstPort 3 } Branch { Points [0, -130] Branch { DstBlock "Calc Wv_(k)" DstPort 3 } Branch { Points [0, -105] DstBlock "Calc W_O2" DstPort 3 } } } Branch { Points [280, 0; 0, -50] DstBlock "Mux" DstPort 7 } } Line { Name "Wl_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 8 Points [120, 0] DstBlock "Mass Balance" DstPort 1 } Line { Name "CV (k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 3 Points [195, 0; 0, -80] DstBlock "Calc Wv_(k)" DstPort 2 } Line { SrcBlock "Calc Wv_(k)" SrcPort 2 Points [0, 0] Branch { Points [0, 80] DstBlock "Calc R_evap" DstPort 1 } Branch { Points [140, 0; 0, 55] DstBlock "Mux" DstPort 3 } } Line { Name "CO2_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 1 Points [160, 0; 0, -150] DstBlock "Calc W_O2" DstPort 2 } Line { Name "CN2_(k+1)" Labels [0, 0] SrcBlock "Demux3" SrcPort 2 DstBlock "Mux" DstPort 2 } Line { Name "Wv" Labels [0, 0] SrcBlock "Calc Wv_(k)" SrcPort 1 Points [155, 0; 0, 145] DstBlock "Mux" DstPort 6 } Line { SrcBlock "Calc R_evap" SrcPort 1 Points [20, 0] Branch { Points [0, -50; -245, 0] DstBlock "Calc Wv_(k)" DstPort 4 } Branch { Points [0, 140; -355, 0] DstBlock "Mass Balance" DstPort 3 } } Annotation { Name "CATHODE_k \n1. c_o2(k) \n2. c_n2(k) \n3" ". c_v(k) \n4. W_o2 (k) \n5. W_n2 (k) \n6. W_v(k) \n7. s_ca(k) \n8. W_l_ca(k)" "\n9. T_ca(k)" Position [733, 408] ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType SubSystem Name "GDL_Section 3" Ports [2, 1] Position [345, 88, 465, 132] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "GDL_Section 3" Location [104, 475, 939, 999] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Channel" Position [20, 263, 50, 277] ForegroundColor "orange" IconDisplay "Port number" } Block { BlockType Inport Name "Cathode_k-1" Position [20, 98, 50, 112] Port "2" IconDisplay "Port number" } Block { BlockType Terminator Name " 2" Position [170, 55, 190, 75] ShowName off } Block { BlockType Terminator Name " 3" Position [170, 15, 190, 35] ShowName off } Block { BlockType Terminator Name " 7" Position [170, 35, 190, 55] ShowName off } Block { BlockType SubSystem Name "Calc R_evap" Ports [3, 1] Position [475, 288, 555, 342] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc R_evap" Location [589, 768, 1170, 977] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "cv" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "T_st" Position [35, 108, 65, 122] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "s_k" Position [35, 168, 65, 182] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " 5" Ports [2, 1] Position [145, 62, 175, 93] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Pv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [250, 72, 280, 103] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "No Evap" Position [360, 127, 380, 153] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "RGU" Position [75, 13, 110, 47] Gain "R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum7" Ports [2, 1] Position [205, 70, 225, 90] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" Position [470, 95, 500, 125] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Switch Name "Switch3" Position [400, 85, 430, 115] Criteria "u2 > Threshold" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Gain Name "gamma/R" Position [305, 75, 335, 105] Gain "0.9*Alg_V/R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure1" Position [170, 102, 205, 128] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0" ".4176e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "R_evap" Position [525, 103, 555, 117] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "s_k" SrcPort 1 Points [280, 0; 0, -75] DstBlock "Switch3" DstPort 2 } Line { SrcBlock "cv" SrcPort 1 DstBlock "RGU" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 DstBlock "R_evap" DstPort 1 } Line { SrcBlock "Switch3" SrcPort 1 DstBlock "Switch" DstPort 1 } Line { SrcBlock "No Evap" SrcPort 1 DstBlock "Switch3" DstPort 3 } Line { SrcBlock "gamma/R" SrcPort 1 Points [35, 0] Branch { Points [0, -25; 70, 0; 0, 45] Branch { Points [0, 10] DstBlock "Switch" DstPort 3 } Branch { DstBlock "Switch" DstPort 2 } } Branch { DstBlock "Switch3" DstPort 1 } } Line { SrcBlock "Divide" SrcPort 1 DstBlock "gamma/R" DstPort 1 } Line { SrcBlock "sat_pressure1" SrcPort 1 Points [5, 0] DstBlock "Sum7" DstPort 2 } Line { SrcBlock "Sum7" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { Name "Pv" Labels [0, 0] SrcBlock " 5" SrcPort 1 DstBlock "Sum7" DstPort 1 } Line { SrcBlock "RGU" SrcPort 1 Points [0, 40] DstBlock " 5" DstPort 1 } Line { Name "Tst" SrcBlock "T_st" SrcPort 1 Points [25, 0] Branch { Points [0, -30] DstBlock " 5" DstPort 2 } Branch { Points [0, 35; 140, 0] DstBlock "Divide" DstPort 2 } Branch { DstBlock "sat_pressure1" DstPort 1 } } } } Block { BlockType SubSystem Name "Calc W_O2" Ports [3, 2] Position [350, 78, 455, 132] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 2 Name "WO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc W_O2" Location [184, 774, 1021, 1029] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "W_O2(k-1)" Position [15, 113, 45, 127] IconDisplay "Port number" Port { PortNumber 1 Name "Tst" PropagatedSignals "WO2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "c_O2(k+1)" Position [15, 158, 45, 172] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_k" Position [15, 198, 45, 212] Port "3" IconDisplay "Port number" } Block { BlockType Product Name " " Ports [2, 1] Position [520, 77, 550, 108] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "NO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "-A_gdl/Vp" Position [245, 70, 275, 100] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "1/dy" Position [415, 70, 445, 100] Gain "1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "d/dy(cO2)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "O2_FlowtoFlux" Position [130, 103, 165, 137] Gain "1/GDL_AREA/OXYGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "O2_FluxtoFlow" Position [680, 53, 715, 87] Gain "GDL_AREA*OXYGENMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [195, 75, 215, 95] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [375, 75, 395, 95] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cO2" Ports [1, 1] Position [305, 70, 335, 100] ForegroundColor "green" InitialCondition "cO2IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Fcn Name "g(eps)*f(s)" Position [380, 190, 440, 220] Expr "-D_O2*GDL_POR*((GDL_POR-0.11)/(1-0." "11))^0.785*(1-u)^2" } Block { BlockType Outport Name "c_O2(k)" Position [775, 128, 805, 142] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "W_O2(k)" Position [765, 63, 795, 77] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { Name "Tst" Labels [0, 0] SrcBlock "W_O2(k-1)" SrcPort 1 DstBlock "O2_FlowtoFlux" DstPort 1 } Line { SrcBlock "c_O2(k+1)" SrcPort 1 Points [335, 0] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "g(eps)*f(s)" DstPort 1 } Line { SrcBlock "g(eps)*f(s)" SrcPort 1 Points [60, 0] DstBlock " " DstPort 2 } Line { SrcBlock "O2_FluxtoFlow" SrcPort 1 DstBlock "W_O2(k)" DstPort 1 } Line { SrcBlock "O2_FlowtoFlux" SrcPort 1 Points [35, 0] DstBlock "Sum" DstPort 2 } Line { Name "NO2" Labels [1, 0] SrcBlock " " SrcPort 1 Points [105, 0; 0, -25] Branch { DstBlock "O2_FluxtoFlow" DstPort 1 } Branch { Labels [1, 0] Points [0, -15; -485, 0; 0, 30] DstBlock "Sum" DstPort 1 } } Line { Name "d/dy(cO2)" Labels [0, 0] SrcBlock "1/dy" SrcPort 1 DstBlock " " DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "1/dy" DstPort 1 } Line { SrcBlock "cO2" SrcPort 1 Points [15, 0] Branch { Points [0, 50] DstBlock "c_O2(k)" DstPort 1 } Branch { DstBlock "Sum1" DstPort 1 } } Line { SrcBlock "-A_gdl/Vp" SrcPort 1 DstBlock "cO2" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "-A_gdl/Vp" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wl" Ports [2, 1] Position [350, 444, 410, 486] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Calc Wl" Location [762, 875, 1228, 1005] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "s_k" Position [15, 23, 45, 37] IconDisplay "Port number" } Block { BlockType Inport Name "S_k+1" Position [110, 73, 140, 87] Port "2" IconDisplay "Port number" Port { PortNumber 1 Name "S_CHAN" PropagatedSignals "S_Chan" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name " 6" Ports [2, 1] Position [325, 42, 355, 73] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "1/dy" Position [255, 65, 285, 95] Gain "1/(delta_y)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "S" Position [70, 17, 110, 43] Expr "(u-imobile_sat)/(1-imobile_sat)" } Block { BlockType Fcn Name "S2" Position [245, 17, 285, 43] Expr "-GDL_AREA/H20_L_VISC*WATERDENSITY*K" "_PERM*u^3*(1.417-2*2.12*u+3*1.263*u^2)*(H20_SURF_T*0.5)/sqrt(K_PERM/GDL_POR)" } Block { BlockType Saturate Name "Saturation" Position [125, 15, 155, 45] UpperLimit "inf" LowerLimit "0" Port { PortNumber 1 Name "S(k)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [200, 70, 220, 90] ShowName off IconShape "round" Inputs "-+|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Wl" Position [385, 53, 415, 67] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock " 6" SrcPort 1 DstBlock "Wl" DstPort 1 } Line { SrcBlock "s_k" SrcPort 1 DstBlock "S" DstPort 1 } Line { SrcBlock "1/dy" SrcPort 1 Points [10, 0; 0, -15] DstBlock " 6" DstPort 2 } Line { SrcBlock "S2" SrcPort 1 Points [10, 0; 0, 20] DstBlock " 6" DstPort 1 } Line { Name "S(k)" Labels [0, 0] SrcBlock "Saturation" SrcPort 1 Points [50, 0] Branch { DstBlock "S2" DstPort 1 } Branch { DstBlock "Sum2" DstPort 1 } } Line { Name "S_CHAN" Labels [0, 0] SrcBlock "S_k+1" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { SrcBlock "S" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "1/dy" DstPort 1 } } } Block { BlockType SubSystem Name "Calc Wv_(k)" Ports [4, 2] Position [350, 153, 450, 212] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Calc Wv_(k)" Location [163, 701, 910, 984] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wv_(k-1)" Position [15, 38, 45, 52] IconDisplay "Port number" } Block { BlockType Inport Name "cv_(k+1)" Position [70, 183, 100, 197] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "s_(k)" Position [70, 218, 100, 232] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [70, 143, 100, 157] Port "4" IconDisplay "Port number" } Block { BlockType Product Name " 1" Ports [2, 1] Position [490, 107, 520, 138] InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "Nv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "-D_j" Position [250, 210, 310, 240] Expr "-D_V*GDL_POR*((GDL_POR-0.11)/(1-0.1" "1))^0.785*(1-u)^2" } Block { BlockType Gain Name "1/dy" Position [380, 100, 410, 130] Gain "1/delta_y" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain2" Position [180, 100, 210, 130] Gain "-GDL_AREA/V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [140, 105, 160, 125] ShowName off IconShape "round" Inputs "-|+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [335, 105, 355, 125] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [235, 105, 255, 125] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FlowtoFlux" Position [90, 28, 125, 62] Gain "1/GDL_AREA/VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "V_FluxtoFlow" Position [620, 108, 655, 142] Gain "GDL_AREA*VAPORMOLARMASS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "cv1" Ports [1, 1] Position [270, 100, 300, 130] ForegroundColor "blue" InitialCondition "cv_IC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "Wv_(k)" Position [700, 118, 730, 132] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "cv_(k)" Position [700, 53, 730, 67] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Wv_(k-1)" SrcPort 1 DstBlock "V_FlowtoFlux" DstPort 1 } Line { SrcBlock "V_FlowtoFlux" SrcPort 1 Points [20, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "R_evap" SrcPort 1 Points [140, 0] DstBlock "Sum5" DstPort 2 } Line { SrcBlock "cv_(k+1)" SrcPort 1 Points [240, 0] DstBlock "Sum4" DstPort 2 } Line { SrcBlock "s_(k)" SrcPort 1 DstBlock "-D_j" DstPort 1 } Line { SrcBlock "-D_j" SrcPort 1 Points [140, 0; 0, -95] DstBlock " 1" DstPort 2 } Line { SrcBlock "V_FluxtoFlow" SrcPort 1 DstBlock "Wv_(k)" DstPort 1 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "cv1" DstPort 1 } Line { SrcBlock "Gain2" SrcPort 1 DstBlock "Sum5" DstPort 1 } Line { Name "Nv" Labels [1, 0] SrcBlock " 1" SrcPort 1 Points [45, 0] Branch { Points [0, 45; -420, 0] DstBlock "Sum3" DstPort 2 } Branch { Labels [1, 0] DstBlock "V_FluxtoFlow" DstPort 1 } } Line { Labels [0, 0] SrcBlock "1/dy" SrcPort 1 DstBlock " 1" DstPort 1 } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "1/dy" DstPort 1 } Line { SrcBlock "cv1" SrcPort 1 Points [5, 0] Branch { Points [0, -55] DstBlock "cv_(k)" DstPort 1 } Branch { DstBlock "Sum4" DstPort 1 } } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Gain2" DstPort 1 } Annotation { Name "d/dy(cv)" Position [445, 107] UseDisplayTextAsClickCallback off } } } Block { BlockType Demux Name "Demux1" Ports [1, 9] Position [100, 13, 105, 197] BackgroundColor "black" ShowName off Outputs "9" DisplayOption "bar" Port { PortNumber 1 Name "CO2_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CN2_(k-1)" PropagatedSignals "CN2_(k+1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "CV (k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "WO2_(k-1)" PropagatedSignals "WO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "WN2_(k-1)" PropagatedSignals "WN2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Wv_(k-1)" PropagatedSignals "Wv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "S_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 8 Name "Wl_(k-1)" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 9 Name "Tst" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Demux Name "Demux3" Ports [1, 5] Position [100, 213, 105, 327] ForegroundColor "orange" BackgroundColor "black" ShowName off Outputs "5" DisplayOption "bar" Port { PortNumber 1 Name "CO2_CH" PropagatedSignals "c_o2,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "CN2_CH" PropagatedSignals "c_n2,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "CV CH" PropagatedSignals "c_v,ca" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "T_CA_CH" PropagatedSignals "Tst" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "S_Chan" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Mass Balance" Ports [3, 1] Position [235, 359, 315, 411] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Mass Balance" Location [910, 829, 1255, 1010] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000" "00]" TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Wl_k-1" Position [20, 13, 50, 27] IconDisplay "Port number" } Block { BlockType Inport Name "Wl_k" Position [20, 68, 50, 82] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "R_evap" Position [20, 118, 50, 132] Port "3" IconDisplay "Port number" } Block { BlockType Gain Name "1/(rho*Vp)" Position [165, 58, 180, 92] Gain "1/(WATERDENSITY*V_P)" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Mv*Vp" Position [80, 110, 110, 140] Gain "VAPORMOLARMASS*V_P" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum6" Ports [3, 1] Position [125, 65, 145, 85] ShowName off IconShape "round" Inputs "+--" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "s" Ports [1, 1] Position [200, 60, 230, 90] ForegroundColor "green" InitialCondition "sIC" LimitOutput on LowerSaturationLimit "0" IgnoreLimit off } Block { BlockType Outport Name "s_k" Position [265, 68, 295, 82] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "s" SrcPort 1 DstBlock "s_k" DstPort 1 } Line { SrcBlock "Wl_k" SrcPort 1 DstBlock "Sum6" DstPort 2 } Line { SrcBlock "Wl_k-1" SrcPort 1 Points [80, 0] DstBlock "Sum6" DstPort 1 } Line { SrcBlock "R_evap" SrcPort 1 DstBlock "Mv*Vp" DstPort 1 } Line { SrcBlock "1/(rho*Vp)" SrcPort 1 DstBlock "s" DstPort 1 } Line { SrcBlock "Mv*Vp" SrcPort 1 Points [20, 0] DstBlock "Sum6" DstPort 3 } Line { SrcBlock "Sum6" SrcPort 1 DstBlock "1/(rho*Vp)" DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [9, 1] Position [720, 218, 725, 402] ShowName off Inputs "9" DisplayOption "bar" } Block { BlockType Constant Name "No Evap3" Position [640, 294, 670, 326] ShowName off Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" Port { PortNumber 1 Name "WN2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name "Terminator1" Position [170, 280, 190, 300] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator4" Position [170, 135, 190, 155] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator6" Position [170, 95, 190, 115] NamePlacement "alternate" ShowName off } Block { BlockType Outport Name "Cathode_k" Position [760, 303, 790, 317] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Calc W_O2" SrcPort 1 Points [190, 0; 0, 135] DstBlock "Mux" DstPort 1 } Line { Name "CO2_CH" Labels [0, 0] SrcBlock "Demux3" SrcPort 1 Points [160, 0; 0, -125] DstBlock "Calc W_O2" DstPort 2 } Line { SrcBlock "Calc Wv_(k)" SrcPort 2 Points [0, 0] Branch { Points [160, 0; 0, 70] DstBlock "Mux" DstPort 3 } Branch { Points [0, 95] DstBlock "Calc R_evap" DstPort 1 } } Line { Name "CV CH" Labels [0, 0] SrcBlock "Demux3" SrcPort 3 Points [170, 0; 0, -95] DstBlock "Calc Wv_(k)" DstPort 2 } Line { Name "Wl_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 8 Points [110, 0] DstBlock "Mass Balance" DstPort 1 } Line { Name "T_CA_CH" Labels [0, 0] SrcBlock "Demux3" SrcPort 4 DstBlock "Terminator1" DstPort 1 } Line { Name "WN2" Labels [0, 0] SrcBlock "No Evap3" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { Name "CN2_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 2 DstBlock " 7" DstPort 1 } Line { Name "WN2_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 5 DstBlock "Terminator6" DstPort 1 } Line { Name "CN2_CH" Labels [0, 0] SrcBlock "Demux3" SrcPort 2 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Cathode_k-1" SrcPort 1 DstBlock "Demux1" DstPort 1 } Line { SrcBlock "Mass Balance" SrcPort 1 Points [10, 0] Branch { Points [0, -50] Branch { Points [0, -145] Branch { Points [0, -65] DstBlock "Calc W_O2" DstPort 3 } Branch { DstBlock "Calc Wv_(k)" DstPort 3 } } Branch { DstBlock "Calc R_evap" DstPort 3 } } Branch { Points [315, 0; 0, -35] DstBlock "Mux" DstPort 7 } Branch { Points [0, 70] DstBlock "Calc Wl" DstPort 1 } } Line { Name "WO2" Labels [0, 0] SrcBlock "Calc W_O2" SrcPort 2 Points [170, 0; 0, 170] DstBlock "Mux" DstPort 4 } Line { Name "Wv" Labels [0, 0] SrcBlock "Calc Wv_(k)" SrcPort 1 Points [145, 0; 0, 160] DstBlock "Mux" DstPort 6 } Line { SrcBlock "Calc R_evap" SrcPort 1 Points [10, 0] Branch { Points [0, -75; -235, 0] DstBlock "Calc Wv_(k)" DstPort 4 } Branch { Points [0, 120; -350, 0] DstBlock "Mass Balance" DstPort 3 } } Line { Name "CO2_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 1 DstBlock " 3" DstPort 1 } Line { Name "CV (k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 3 DstBlock " 2" DstPort 1 } Line { Name "WO2_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 4 DstBlock "Calc W_O2" DstPort 1 } Line { Name "Wv_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 6 Points [170, 0; 0, 35] DstBlock "Calc Wv_(k)" DstPort 1 } Line { Name "S_(k-1)" Labels [0, 0] SrcBlock "Demux1" SrcPort 7 DstBlock "Terminator4" DstPort 1 } Line { Name "Tst" Labels [0, 0] SrcBlock "Demux1" SrcPort 9 Points [90, 0; 0, 130] Branch { DstBlock "Calc R_evap" DstPort 2 } Branch { Points [0, 195; 470, 0; 0, -120] DstBlock "Mux" DstPort 9 } } Line { SrcBlock "Channel" SrcPort 1 DstBlock "Demux3" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Cathode_k" DstPort 1 } Line { SrcBlock "Calc Wl" SrcPort 1 Points [5, 0] Branch { Points [0, 35; -210, 0; 0, -115] DstBlock "Mass Balance" DstPort 2 } Branch { Points [235, 0; 0, -95] DstBlock "Mux" DstPort 8 } } Line { Name "S_Chan" Labels [0, 0] SrcBlock "Demux3" SrcPort 5 Points [55, 0; 0, 165] DstBlock "Calc Wl" DstPort 2 } Annotation { Name "CATHODE_k \n1. c_o2(k) \n2. c_n2(k) \n3" ". c_v(k) \n4. W_o2 (k) \n5. W_n2 (k) \n6. W_v(k) \n7. s_ca(k) \n8. W_l_ca(k)" "\n9. T_ca(k)" Position [778, 408] ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType Gain Name "N_" Position [670, 230, 700, 260] Gain "-1" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "N_cells" Position [105, 255, 135, 285] Orientation "left" NamePlacement "alternate" Gain "FC_NUMBEROFCELLS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "N_cells1" Position [135, 225, 165, 255] Orientation "left" NamePlacement "alternate" ShowName off Gain "FC_NUMBEROFCELLS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [180, 260, 200, 280] Orientation "left" NamePlacement "alternate" ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Terminator Name "Terminator1" Position [225, 200, 245, 220] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator2" Position [195, 215, 215, 235] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator3" Position [225, 275, 245, 295] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator4" Position [195, 185, 215, 205] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator5" Position [225, 305, 245, 325] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator6" Position [225, 245, 245, 265] Orientation "left" NamePlacement "alternate" ShowName off } Block { BlockType ToWorkspace Name "To Workspace1" Position [740, 58, 825, 82] ForegroundColor "lightBlue" VariableName "CATHODE_2" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace2" Position [925, 177, 1000, 203] ForegroundColor "lightBlue" VariableName "CATHODE_1" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace3" Position [325, 39, 410, 61] ForegroundColor "lightBlue" VariableName "CATHODE_CH" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace4" Position [530, 43, 605, 67] ForegroundColor "lightBlue" VariableName "CATHODE_3" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType Outport Name "Cathode_1" Position [925, 138, 955, 152] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "m,l,ca" Position [905, 23, 935, 37] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Demux" SrcPort 9 DstBlock "Terminator5" DstPort 1 } Line { SrcBlock "Demux" SrcPort 7 DstBlock "Terminator3" DstPort 1 } Line { SrcBlock "Demux" SrcPort 5 DstBlock "Terminator6" DstPort 1 } Line { SrcBlock "Demux" SrcPort 3 DstBlock "Terminator2" DstPort 1 } Line { SrcBlock "Demux" SrcPort 2 DstBlock "Terminator1" DstPort 1 } Line { SrcBlock "Demux" SrcPort 1 DstBlock "Terminator4" DstPort 1 } Line { SrcBlock "Demux" SrcPort 6 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Demux" SrcPort 8 Points [-85, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Demux" SrcPort 4 DstBlock "N_cells1" DstPort 1 } Line { SrcBlock "N_" SrcPort 1 Points [15, 0; 0, -110] DstBlock "GDL_Section 1" DstPort 2 } Line { SrcBlock "Cathode Inputs" SrcPort 1 DstBlock "Cathode Channel" DstPort 1 } Line { SrcBlock "Cathode Channel" SrcPort 2 Points [30, 0] Branch { DstBlock "GDL_Section 3" DstPort 1 } Branch { Points [0, -50] DstBlock "To Workspace3" DstPort 1 } } Line { SrcBlock "GDL_Section 3" SrcPort 1 Points [25, 0] Branch { Points [0, 145] DstBlock "Demux" DstPort 1 } Branch { Points [0, 0] Branch { DstBlock "GDL_Section 2" DstPort 1 } Branch { Points [0, 0; 0, -55] DstBlock "To Workspace4" DstPort 1 } } } Line { SrcBlock "Wv,mb" SrcPort 1 Points [85, 0; 0, -135] DstBlock "GDL_Section 1" DstPort 3 } Line { SrcBlock "N_cells" SrcPort 1 Points [-15, 0; 0, -185] DstBlock "Cathode Channel" DstPort 2 } Line { SrcBlock "Cathode Channel" SrcPort 1 Points [0, -40] DstBlock "m,l,ca" DstPort 1 } Line { SrcBlock "N_cells1" SrcPort 1 Points [-40, 0] DstBlock "Cathode Channel" DstPort 3 } Line { SrcBlock "GDL_Section 2" SrcPort 1 Points [35, 0] Branch { DstBlock "GDL_Section 1" DstPort 1 } Branch { Points [0, 60; -385, 0] DstBlock "GDL_Section 3" DstPort 2 } Branch { Points [0, -50] DstBlock "To Workspace1" DstPort 1 } } Line { SrcBlock "GDL_Section 1" SrcPort 1 Points [20, 0] Branch { Points [0, 60; -340, 0] DstBlock "GDL_Section 2" DstPort 2 } Branch { Points [0, 45] Branch { DstBlock "To Workspace2" DstPort 1 } Branch { Points [0, -45] DstBlock "Cathode_1" DstPort 1 } } } Line { SrcBlock "W,O2,rct" SrcPort 1 DstBlock "N_" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "N_cells" DstPort 1 } Line { SrcBlock "Tst" SrcPort 1 Points [100, 0] DstBlock "GDL_Section 1" DstPort 4 } Annotation { Name "Variables in CATHODE_k\n1. c_o2(k) \n2. c_n" "2(k) \n3. c_v(k) \n4. W_o2 (k) \n5. W_n2 (k) \n6. W_v(k) \n7. s_ca(k)\n8. W_l" "_ca(k)\n9. T_ca(k)" Position [296, 268] HorizontalAlignment "left" ForegroundColor "green" UseDisplayTextAsClickCallback off } Annotation { Name "Cathode Inputs \n1. P_ca_in\n2. T_ca_in\n3." " RH_ca_in\n4. W_a_ca_in\n5. P_ca_out\n6. T_ca_out\n7. T_st" Position [10, 146] HorizontalAlignment "left" ForegroundColor "green" UseDisplayTextAsClickCallback off } } } Block { BlockType Clock Name "Clock" Position [540, 20, 560, 40] Decimation "10" } Block { BlockType Demux Name "Demux1" Ports [1, 9] Position [555, 424, 560, 576] ForegroundColor "green" BackgroundColor "black" ShowName off Outputs "9" DisplayOption "bar" Port { PortNumber 1 Name "cO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "cv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Display Name "Display1" Ports [1] Position [760, 233, 845, 257] ShowName off Decimation "1" Lockdown off } Block { BlockType Display Name "Display2" Ports [1] Position [610, 18, 695, 42] ShowName off Decimation "1" Lockdown off } Block { BlockType SubSystem Name "Membrane" Ports [5, 6] Position [370, 275, 515, 385] ForegroundColor "blue" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Membrane" Location [-13, 527, 1070, 817] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "96" Block { BlockType Inport Name "an(1)" Position [60, 393, 90, 407] IconDisplay "Port number" } Block { BlockType Inport Name "m,l,an,ch" Position [665, 198, 695, 212] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Tst" Position [15, 478, 45, 492] ForegroundColor "blue" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Ist" Position [65, 198, 95, 212] Port "4" IconDisplay "Port number" Port { PortNumber 1 Name "I_st" PropagatedSignals "I_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Inport Name "ca(1)" Position [120, 678, 150, 692] Port "5" IconDisplay "Port number" } Block { BlockType Display Name "Anode Water Content" Ports [1] Position [495, 413, 600, 437] Format "short_e" Decimation "1" Lockdown off } Block { BlockType SubSystem Name "Back Diffusion" Ports [3, 1] Position [495, 541, 595, 599] ForegroundColor "blue" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off Port { PortNumber 1 Name "N_v,diff" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } System { Name "Back Diffusion" Location [758, 557, 1074, 821] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "lambda_an" Position [35, 53, 65, 67] IconDisplay "Port number" } Block { BlockType Inport Name "Dw" Position [35, 18, 65, 32] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "lambda_ca" Position [35, 108, 65, 122] Port "3" IconDisplay "Port number" } Block { BlockType Product Name "Divide" Ports [4, 1] Position [210, 123, 235, 167] ForegroundColor "lightBlue" Inputs "***/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [100, 105, 120, 125] ShowName off IconShape "round" Inputs "-+|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "alpha_D_w" Position [95, 135, 125, 165] Value "alpha_D_w" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "cve" Position [140, 98, 175, 132] Gain "MEMBRANEDRYDENSITY/MEMBRANEDRYEQVWEIGHT" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "t_mb" Position [145, 160, 175, 190] Value "MEMBRANETHICKNESS" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Outport Name "N_v,diff" Position [260, 138, 290, 152] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "lambda_an" SrcPort 1 Points [40, 0] DstBlock "Sum2" DstPort 1 } Line { SrcBlock "lambda_ca" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "cve" DstPort 1 } Line { SrcBlock "cve" SrcPort 1 Points [5, 0; 0, 25] DstBlock "Divide" DstPort 2 } Line { SrcBlock "Dw" SrcPort 1 Points [125, 0] DstBlock "Divide" DstPort 1 } Line { SrcBlock "alpha_D_w" SrcPort 1 DstBlock "Divide" DstPort 3 } Line { SrcBlock "t_mb" SrcPort 1 Points [5, 0; 0, -15] DstBlock "Divide" DstPort 4 } Line { SrcBlock "Divide" SrcPort 1 DstBlock "N_v,diff" DstPort 1 } Annotation { Name "Note: c = lambda * rho / M" Position [146, 229] UseDisplayTextAsClickCallback off } } } Block { BlockType Display Name "Cathode water Content" Ports [1] Position [490, 648, 595, 672] Format "short_e" Decimation "1" Lockdown off } Block { BlockType Scope Name "CellVoltage" Ports [1] Position [915, 189, 945, 221] Floating off Location [698, 489, 1276, 936] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "702.5" YMax "742.5" SaveName "ScopeData18" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Display Name "Current" Ports [1] Position [160, 259, 250, 281] Decimation "1" Lockdown off } Block { BlockType Demux Name "Demux" Ports [1, 7] Position [110, 353, 115, 447] ForegroundColor "red" BackgroundColor "black" ShowName off Outputs "7" DisplayOption "bar" Port { PortNumber 1 Name "cH2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "cv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Demux Name "Demux1" Ports [1, 9] Position [170, 609, 175, 761] ForegroundColor "green" BackgroundColor "black" ShowName off Outputs "9" DisplayOption "bar" Port { PortNumber 1 Name "cO2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "cv" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "Drag" Ports [3, 2] Position [350, 240, 450, 290] ForegroundColor "blue" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Drag" Location [308, 599, 937, 846] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Ist" Position [35, 18, 65, 32] IconDisplay "Port number" } Block { BlockType Inport Name "n_drag" Position [35, 153, 65, 167] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Nv_diff" Position [35, 203, 65, 217] Port "3" IconDisplay "Port number" } Block { BlockType Gain Name "Active Area" Position [420, 68, 455, 102] Gain "VAPORMOLARMASS*FC_ACTIVEAREA" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Drag" Ports [3, 1] Position [270, 69, 300, 101] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [380, 75, 400, 95] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "alpha_n_d" Position [175, 109, 205, 141] Value "alpha_n_d" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "current_density/F" Position [180, 58, 215, 92] Gain "1/FARADAYS/FC_ACTIVEAREA" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "N_v,drag" Position [425, 18, 455, 32] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Wv_mb" Position [500, 78, 530, 92] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Ist" SrcPort 1 Points [45, 0; 0, 50] DstBlock "current_density/F" DstPort 1 } Line { SrcBlock "current_density/F" SrcPort 1 DstBlock "Drag" DstPort 1 } Line { SrcBlock "alpha_n_d" SrcPort 1 Points [30, 0; 0, -40] DstBlock "Drag" DstPort 2 } Line { SrcBlock "n_drag" SrcPort 1 Points [185, 0] DstBlock "Drag" DstPort 3 } Line { SrcBlock "Drag" SrcPort 1 Points [25, 0] Branch { Points [0, -60] DstBlock "N_v,drag" DstPort 1 } Branch { DstBlock "Sum" DstPort 1 } } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Active Area" DstPort 1 } Line { SrcBlock "Nv_diff" SrcPort 1 Points [320, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Active Area" SrcPort 1 DstBlock "Wv_mb" DstPort 1 } Annotation { Name "Uses active area in cm^2" Position [308, 229] ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType From Name "From" Position [660, 146, 700, 174] GotoTag "P_ca" TagVisibility "global" } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [725, 99, 730, 221] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [9, 1] Position [1020, 16, 1025, 104] ShowName off Inputs "9" DisplayOption "bar" } Block { BlockType Display Name "N_v,diff" Ports [1] Position [680, 333, 770, 357] Decimation "1" Lockdown off } Block { BlockType Display Name "Nv_drag" Ports [1] Position [525, 128, 615, 152] Decimation "1" Lockdown off } Block { BlockType SubSystem Name "Reactions" Ports [1, 3] Position [145, 112, 210, 178] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Reactions" Location [302, 722, 931, 969] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Ist" Position [35, 18, 65, 32] IconDisplay "Port number" } Block { BlockType From Name "From1" Position [335, 111, 405, 129] GotoTag "W_O2_IN" TagVisibility "global" } Block { BlockType From Name "From2" Position [335, 71, 400, 89] GotoTag "W_H2_IN" TagVisibility "global" } Block { BlockType Mux Name "Mux1" Ports [4, 1] Position [425, 65, 430, 155] ShowName off DisplayOption "bar" } Block { BlockType Gain Name "N_cells" Position [270, 80, 300, 110] Gain "FC_NUMBEROFCELLS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "N_cells1" Position [270, 135, 300, 165] Gain "FC_NUMBEROFCELLS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType ToWorkspace Name "To Workspace3" Position [455, 95, 525, 125] VariableName "Excess_Ratio" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType Gain Name "WH2_rct1" Position [140, 98, 175, 132] ForegroundColor "red" Gain "HYDROGENMOLARMASS/2/FARADAYS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "WO2_rct1" Position [140, 153, 175, 187] ForegroundColor "green" Gain "OXYGENMOLARMASS/4/FARADAYS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Wv_gen" Position [140, 48, 175, 82] ForegroundColor "blue" Gain "VAPORMOLARMASS/2/FARADAYS" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Wv,gen" Position [210, 58, 240, 72] ForegroundColor "blue" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "WH2_rct" Position [210, 108, 240, 122] ForegroundColor "red" Port "2" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "WO2_rct" Position [205, 163, 235, 177] ForegroundColor "green" Port "3" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "To Workspace3" DstPort 1 } Line { SrcBlock "From2" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "N_cells" SrcPort 1 Points [0, 5] DstBlock "Mux1" DstPort 2 } Line { SrcBlock "From1" SrcPort 1 DstBlock "Mux1" DstPort 3 } Line { SrcBlock "N_cells1" SrcPort 1 Points [25, 0; 0, -10] DstBlock "Mux1" DstPort 4 } Line { SrcBlock "Wv_gen" SrcPort 1 DstBlock "Wv,gen" DstPort 1 } Line { SrcBlock "WH2_rct1" SrcPort 1 Points [5, 0] Branch { DstBlock "WH2_rct" DstPort 1 } Branch { Points [0, -20] DstBlock "N_cells" DstPort 1 } } Line { SrcBlock "WO2_rct1" SrcPort 1 Points [5, 0] Branch { DstBlock "WO2_rct" DstPort 1 } Branch { Points [0, -20] DstBlock "N_cells1" DstPort 1 } } Line { SrcBlock "Ist" SrcPort 1 Points [25, 0; 0, 40] Branch { DstBlock "Wv_gen" DstPort 1 } Branch { Points [0, 50] Branch { DstBlock "WH2_rct1" DstPort 1 } Branch { Points [0, 55] DstBlock "WO2_rct1" DstPort 1 } } } } } Block { BlockType Terminator Name "Terminator1" Position [155, 390, 175, 410] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator10" Position [330, 705, 350, 725] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator11" Position [260, 735, 280, 755] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator12" Position [295, 720, 315, 740] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator2" Position [130, 375, 150, 395] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator3" Position [180, 405, 200, 425] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator4" Position [205, 420, 225, 440] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator5" Position [135, 435, 155, 455] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator6" Position [230, 660, 250, 680] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator7" Position [195, 630, 215, 650] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator8" Position [260, 675, 280, 695] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator9" Position [295, 690, 315, 710] NamePlacement "alternate" ShowName off } Block { BlockType ToWorkspace Name "To Workspace2" Position [1045, 44, 1135, 76] VariableName "MEMBR_out" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType SubSystem Name "Voltage_mv" Ports [1, 1] Position [765, 140, 865, 180] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Voltage_mv" Location [209, 231, 1223, 892] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "V Inputs" Position [40, 148, 70, 162] IconDisplay "Port number" } Block { BlockType Constant Name "Constant2" Position [400, 379, 510, 411] ShowName off Value "FC_ACTIVEAREA" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Demux Name "Demux" Ports [1, 7] Position [110, 51, 115, 259] BackgroundColor "black" ShowName off Outputs "7" DisplayOption "bar" Port { PortNumber 1 Name "Mass Liquid Water (kg)\nIn the Anode" " Channel" PropagatedSignals "T_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "Stack Current" PropagatedSignals "I_st" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "Mass Liquid Water (kg)\nIn the Anode" " Channel" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Product Name "Divide1" Ports [4, 1] Position [320, 429, 345, 486] Inputs "*///" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide2" Ports [2, 1] Position [645, 448, 670, 492] ShowName off Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "i_app" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Fcn Name "E" Position [610, 35, 670, 65] Expr "-h0/(2*FARADAYS)+s0/(2*FARADAYS)*u[1]+R" "_G_U*u[1]/(2*FARADAYS)*log(u[3]/p0)+R_G_U*u[1]/(4*FARADAYS)*log(u[2]/p0)" } Block { BlockType Mux Name "Mux" Ports [5, 1] Position [410, 48, 415, 212] ShowName off Inputs "5" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [695, 559, 700, 586] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [2, 1] Position [255, 72, 260, 103] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux3" Ports [2, 1] Position [205, 112, 210, 148] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Saturate Name "Saturation" Position [380, 435, 410, 465] UpperLimit "0.99*FC_ACTIVEAREA" LowerLimit "0" Port { PortNumber 1 Name "AN_GDL_SURF_BLOCKAGE" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum" Ports [4, 1] Position [735, 120, 755, 140] ShowName off IconShape "round" Inputs "+---" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [540, 470, 560, 490] ShowName off IconShape "round" Inputs "+-|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Terminator Name "Terminator" Position [160, 145, 180, 165] } Block { BlockType ToWorkspace Name "To Workspace1" Position [745, 559, 845, 591] VariableName "Current_Density" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType Fcn Name "U_act" Position [595, 100, 655, 130] Expr "K1*R_G_U*u[1]/FARADAYS*(log(u[4]+iloss)" "+Ec/R_G_U*(1/u[1]-1/T0))-log(K2)*K1*R_G_U*u[1]/FARADAYS-K1*K3*R_G_U*u[1]/FARA" "DAYS*log(u[2]/p0)" } Block { BlockType Constant Name "U_conc" Position [615, 245, 645, 275] Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Fcn Name "U_ohmic" Position [595, 180, 655, 210] Expr "K4*MEMBRANETHICKNESS/(b11*u[5]-b12) *ex" "p(-b2*(1/303-1/u[1]))*u[4]" } Block { BlockType Gain Name "current_density" Position [635, 568, 670, 602] Gain "1/FC_ACTIVEAREA" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "p_h2" Position [225, 117, 320, 143] Expr "u[1]*R_G_U*u[2]" } Block { BlockType Fcn Name "p_o2" Position [290, 77, 385, 103] Expr "u[1]*R_G_U*u[2]" } Block { BlockType Constant Name "t_w" Position [180, 505, 210, 535] NamePlacement "alternate" ShowName off Value "t_w" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Gain Name "v to mv" Position [785, 113, 820, 147] Gain "1000" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "water_density" Position [175, 440, 285, 460] Value "WATERDENSITY/(1000*10000)" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Constant Name "water_density1" Position [175, 480, 285, 500] ShowName off Value "FC_NUMBEROFCELLS" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Outport Name "AveV (mv)" Position [860, 123, 890, 137] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Mux" SrcPort 1 Points [135, 0] Branch { Points [0, -80] DstBlock "E" DstPort 1 } Branch { Points [0, -15] Branch { DstBlock "U_act" DstPort 1 } Branch { Points [0, 80] DstBlock "U_ohmic" DstPort 1 } } } Line { SrcBlock "U_ohmic" SrcPort 1 Points [64, 0] DstBlock "Sum" DstPort 3 } Line { SrcBlock "U_conc" SrcPort 1 Points [95, 0] DstBlock "Sum" DstPort 4 } Line { SrcBlock "water_density" SrcPort 1 DstBlock "Divide1" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 Points [0, -10] DstBlock "Saturation" DstPort 1 } Line { Name "AN_GDL_SURF_BLOCKAGE" Labels [-1, 0] SrcBlock "Saturation" SrcPort 1 Points [110, 0] DstBlock "Sum3" DstPort 2 } Line { SrcBlock "Constant2" SrcPort 1 Points [35, 0] DstBlock "Sum3" DstPort 1 } Line { Name "i_app" Labels [0, 0] SrcBlock "Divide2" SrcPort 1 Points [40, 0] Branch { Points [0, 70; -180, 0; 0, 25] DstBlock "Mux1" DstPort 1 } Branch { Points [0, -150; -350, 0; 0, -160] DstBlock "Mux" DstPort 4 } } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "To Workspace1" DstPort 1 } Line { SrcBlock "current_density" SrcPort 1 Points [5, 0] DstBlock "Mux1" DstPort 2 } Line { SrcBlock "V Inputs" SrcPort 1 DstBlock "Demux" DstPort 1 } Line { Name "Mass Liquid Water (kg)\nIn the Anode C" "hannel" Labels [1, 1] SrcBlock "Demux" SrcPort 7 Points [185, 0] DstBlock "Divide1" DstPort 1 } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Divide2" DstPort 2 } Line { Name "Mass Liquid Water (kg)\nIn the Anode C" "hannel" SrcBlock "Demux" SrcPort 1 Points [70, 0] Branch { Points [205, 0] DstBlock "Mux" DstPort 1 } Branch { Points [0, 15] Branch { DstBlock "Mux2" DstPort 1 } Branch { DstBlock "Mux3" DstPort 1 } } } Line { Name "Stack Current" Labels [0, 1] SrcBlock "Demux" SrcPort 6 Points [30, 0; 0, 135] Branch { Points [0, 235] DstBlock "current_density" DstPort 1 } Branch { Labels [2, 0] Points [0, 0; 475, 0; 0, 110] DstBlock "Divide2" DstPort 1 } } Line { SrcBlock "U_act" SrcPort 1 Points [64, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "E" SrcPort 1 Points [70, 0] DstBlock "Sum" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "v to mv" DstPort 1 } Line { SrcBlock "v to mv" SrcPort 1 DstBlock "AveV (mv)" DstPort 1 } Line { SrcBlock "Demux" SrcPort 2 DstBlock "Mux2" DstPort 2 } Line { SrcBlock "Mux2" SrcPort 1 DstBlock "p_o2" DstPort 1 } Line { SrcBlock "p_o2" SrcPort 1 Points [5, 0] DstBlock "Mux" DstPort 2 } Line { SrcBlock "Mux3" SrcPort 1 DstBlock "p_h2" DstPort 1 } Line { SrcBlock "Demux" SrcPort 3 Points [60, 0; 0, 15] DstBlock "Mux3" DstPort 2 } Line { SrcBlock "p_h2" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "Demux" SrcPort 5 Points [275, 0] DstBlock "Mux" DstPort 5 } Line { SrcBlock "Demux" SrcPort 4 DstBlock "Terminator" DstPort 1 } Line { SrcBlock "t_w" SrcPort 1 Points [90, 0] DstBlock "Divide1" DstPort 4 } Line { SrcBlock "water_density1" SrcPort 1 Points [5, 0; 0, -25] DstBlock "Divide1" DstPort 3 } Annotation { Name "Tfc" Position [135, 54] UseDisplayTextAsClickCallback off } Annotation { Name "P_ca" Position [139, 147] UseDisplayTextAsClickCallback off } Annotation { Name "c_h2" Position [134, 114] UseDisplayTextAsClickCallback off } Annotation { Name "c_o2" Position [136, 84] UseDisplayTextAsClickCallback off } Annotation { Name "lambda_mb" Position [150, 178] UseDisplayTextAsClickCallback off } } } Block { BlockType Display Name "Wv_mb" Ports [1] Position [525, 223, 615, 247] Decimation "1" Lockdown off } Block { BlockType SubSystem Name "a_an" Ports [2, 1] Position [245, 430, 310, 465] ForegroundColor "red" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "a_an" Location [728, 602, 1102, 804] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "c_v,an" Position [120, 138, 150, 152] IconDisplay "Port number" } Block { BlockType Inport Name "Tst" Position [15, 83, 45, 97] Port "2" IconDisplay "Port number" } Block { BlockType Product Name "RH_AN" Ports [3, 1] Position [240, 74, 270, 106] Inputs "/**" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "R_G_U1" Position [125, 73, 160, 107] Gain "R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure1" Position [125, 15, 185, 45] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0.417" "6e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "a_an" Position [300, 83, 330, 97] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "RH_AN" SrcPort 1 DstBlock "a_an" DstPort 1 } Line { SrcBlock "Tst" SrcPort 1 Points [15, 0] Branch { DstBlock "R_G_U1" DstPort 1 } Branch { Points [0, -60] DstBlock "sat_pressure1" DstPort 1 } } Line { SrcBlock "c_v,an" SrcPort 1 Points [35, 0; 0, -45] DstBlock "RH_AN" DstPort 3 } Line { SrcBlock "R_G_U1" SrcPort 1 DstBlock "RH_AN" DstPort 2 } Line { SrcBlock "sat_pressure1" SrcPort 1 Points [15, 0; 0, 50] DstBlock "RH_AN" DstPort 1 } } } Block { BlockType SubSystem Name "a_ca" Ports [2, 1] Position [245, 560, 310, 595] ForegroundColor "green" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "a_ca" Location [555, 105, 929, 307] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Tst" Position [15, 83, 45, 97] IconDisplay "Port number" } Block { BlockType Inport Name "c_v,ca" Position [120, 138, 150, 152] Port "2" IconDisplay "Port number" } Block { BlockType Product Name "RH_CA" Ports [3, 1] Position [240, 74, 270, 106] Inputs "/**" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "R_G_U1" Position [125, 73, 160, 107] Gain "R_G_U" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "sat_pressure2" Position [120, 15, 180, 45] Expr "exp(-5800/u + 1.391 - 0.04864*u + 0.417" "6e-4*u^2 - 0.1445e-7*u^3 + 6.546*log(u))" } Block { BlockType Outport Name "a_ca" Position [300, 83, 330, 97] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "sat_pressure2" SrcPort 1 Points [20, 0; 0, 50] DstBlock "RH_CA" DstPort 1 } Line { SrcBlock "R_G_U1" SrcPort 1 DstBlock "RH_CA" DstPort 2 } Line { SrcBlock "c_v,ca" SrcPort 1 Points [35, 0; 0, -45] DstBlock "RH_CA" DstPort 3 } Line { SrcBlock "Tst" SrcPort 1 Points [15, 0] Branch { DstBlock "R_G_U1" DstPort 1 } Branch { Points [0, -60] DstBlock "sat_pressure2" DstPort 1 } } Line { SrcBlock "RH_CA" SrcPort 1 DstBlock "a_ca" DstPort 1 } } } Block { BlockType SubSystem Name "lambda An" Ports [2, 1] Position [360, 440, 445, 475] ForegroundColor "red" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "lambda An" Location [164, 137, 801, 580] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "a_an" Position [115, 343, 145, 357] IconDisplay "Port number" } Block { BlockType Inport Name "Tst" Position [55, 423, 85, 437] Port "2" IconDisplay "Port number" } Block { BlockType Fcn Name "Interpolated\n Zawodzinski / Hinatsu" Position [230, 240, 290, 270] Expr "((u(2)-303.15)/(80-30)*(0.3-0.043 )+0.0" "43)+((u(2)-303.15)/(80-30)*(10.8-17.81 )+17.81)*u(1)+((u(2)-303.15)/(80-30)*(" "-16+39.85 )-39.85)*u(1)^2+((u(2)-303.15)/(80-30)*(14.1-36 )+36)*u(1)^3" } Block { BlockType Fcn Name "Interpolated\n Zawodzinski / Hinatsu1" Position [235, 405, 295, 435] Expr "((u(2)-303.15)/(80-30)*(0.3-0.043 )+0.0" "43)+((u(2)-303.15)/(80-30)*(10.8-17.81 )+17.81)*u(1)+((u(2)-303.15)/(80-30)*(" "-16+39.85 )-39.85)*u(1)^2+((u(2)-303.15)/(80-30)*(14.1-36 )+36)*u(1)^3" } Block { BlockType Fcn Name "Linear Interp upto a=3" Position [395, 255, 455, 285] Expr "u(1)+(u(2)-1)*(lambda_max_diff-u(1))/2" } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [185, 394, 190, 441] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [175, 229, 180, 276] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [2, 1] Position [355, 244, 360, 291] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Switch Name "Switch1" Position [395, 335, 425, 365] Criteria "u2 > Threshold" Threshold "1" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Constant Name "a=1" Position [65, 225, 95, 255] Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Outport Name "lambda_an" Position [530, 343, 560, 357] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "a_an" SrcPort 1 Points [5, 0] Branch { Points [0, 55] DstBlock "Mux" DstPort 1 } Branch { Points [175, 0] Branch { DstBlock "Switch1" DstPort 2 } Branch { Points [0, -70] DstBlock "Mux2" DstPort 2 } } } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "lambda_an" DstPort 1 } Line { SrcBlock "Tst" SrcPort 1 Points [15, 0] Branch { DstBlock "Mux" DstPort 2 } Branch { Points [0, -165] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Interpolated\n Zawodzinski / Hinatsu1" DstPort 1 } Line { SrcBlock "Interpolated\n Zawodzinski / Hinatsu1" SrcPort 1 Points [40, 0; 0, -60] DstBlock "Switch1" DstPort 3 } Line { SrcBlock "a=1" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Interpolated\n Zawodzinski / Hinatsu" DstPort 1 } Line { SrcBlock "Mux2" SrcPort 1 DstBlock "Linear Interp upto a=3" DstPort 1 } Line { SrcBlock "Linear Interp upto a=3" SrcPort 1 Points [20, 0; 0, 55; -105, 0; 0, 15] DstBlock "Switch1" DstPort 1 } Line { SrcBlock "Interpolated\n Zawodzinski / Hinatsu" SrcPort 1 DstBlock "Mux2" DstPort 1 } } } Block { BlockType SubSystem Name "lambda Ca" Ports [2, 1] Position [360, 570, 445, 605] ForegroundColor "green" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "lambda Ca" Location [386, 518, 984, 823] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "a_ca" Position [40, 143, 70, 157] IconDisplay "Port number" } Block { BlockType Inport Name "Tst" Position [20, 228, 50, 242] Port "2" IconDisplay "Port number" } Block { BlockType Fcn Name "Interpolated\n Zawodzinski / Hinatsu" Position [225, 210, 285, 240] Expr "((u(2)-303.15)/(80-30)*(0.3-0.043 )+0.0" "43)+((u(2)-303.15)/(80-30)*(10.8-17.81 )+17.81)*u(1)+((u(2)-303.15)/(80-30)*(" "-16+39.85 )-39.85)*u(1)^2+((u(2)-303.15)/(80-30)*(14.1-36 )+36)*u(1)^3" } Block { BlockType Fcn Name "Interpolated\n Zawodzinski / Hinatsu1" Position [210, 50, 270, 80] Expr "((u(2)-303.15)/(80-30)*(0.3-0.043 )+0.0" "43)+((u(2)-303.15)/(80-30)*(10.8-17.81 )+17.81)*u(1)+((u(2)-303.15)/(80-30)*(" "-16+39.85 )-39.85)*u(1)^2+((u(2)-303.15)/(80-30)*(14.1-36 )+36)*u(1)^3" } Block { BlockType Fcn Name "Linear Interp upto a=3" Position [380, 60, 440, 90] Expr "u(1)+(u(2)-1)*(lambda_max_diff-u(1))/2" } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [175, 199, 180, 246] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [180, 39, 185, 86] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [2, 1] Position [340, 49, 345, 96] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Switch Name "Switch1" Position [385, 140, 415, 170] Criteria "u2 > Threshold" Threshold "1" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Constant Name "a=1" Position [60, 35, 90, 65] Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Outport Name "lambda_ca" Position [520, 148, 550, 162] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "a_ca" SrcPort 1 Points [70, 0; 0, 5] Branch { Points [0, 55] DstBlock "Mux" DstPort 1 } Branch { Points [170, 0] Branch { DstBlock "Switch1" DstPort 2 } Branch { Points [0, -70] DstBlock "Mux2" DstPort 2 } } } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "lambda_ca" DstPort 1 } Line { SrcBlock "Tst" SrcPort 1 Points [50, 0] Branch { DstBlock "Mux" DstPort 2 } Branch { Points [0, -160] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Interpolated\n Zawodzinski / Hinatsu" DstPort 1 } Line { SrcBlock "Interpolated\n Zawodzinski / Hinatsu" SrcPort 1 Points [40, 0; 0, -60] DstBlock "Switch1" DstPort 3 } Line { SrcBlock "a=1" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Interpolated\n Zawodzinski / Hinatsu1" DstPort 1 } Line { SrcBlock "Mux2" SrcPort 1 DstBlock "Linear Interp upto a=3" DstPort 1 } Line { SrcBlock "Linear Interp upto a=3" SrcPort 1 Points [20, 0; 0, 55; -105, 0; 0, 15] DstBlock "Switch1" DstPort 1 } Line { SrcBlock "Interpolated\n Zawodzinski / Hinatsu1" SrcPort 1 Points [25, 0; 0, -5] DstBlock "Mux2" DstPort 1 } } } Block { BlockType SubSystem Name "lambda mb" Ports [3, 3] Position [360, 496, 445, 544] ForegroundColor "blue" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "lambda mb" Location [240, 302, 1000, 803] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "a_an" Position [20, 98, 50, 112] IconDisplay "Port number" } Block { BlockType Inport Name "Tst" Position [30, 353, 60, 367] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "a_ca" Position [15, 188, 45, 202] Port "3" IconDisplay "Port number" } Block { BlockType Gain Name " " Position [90, 133, 125, 167] Gain "1/2" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Scope Name "Activity" Ports [1] Position [265, 154, 295, 186] Floating off Location [654, 290, 1232, 737] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.988" YMax "1.005" SaveName "ScopeData6" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Constant Name "Constant5" Position [210, 300, 240, 330] Value "-2436" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Display Name "Display" Ports [1] Position [635, 340, 725, 370] Decimation "1" Lockdown off } Block { BlockType Fcn Name "Interpolated\n Zawodzinski / Hinatsu" Position [215, 40, 275, 70] Expr "((u(2)-303.15)/(80-30)*(0.3-0.043 )+0.0" "43)+((u(2)-303.15)/(80-30)*(10.8-17.81 )+17.81)*u(1)+((u(2)-303.15)/(80-30)*(" "-16+39.85 )-39.85)*u(1)^2+((u(2)-303.15)/(80-30)*(14.1-36 )+36)*u(1)^3" } Block { BlockType Fcn Name "Interpolated\n Zawodzinski / Hinatsu1" Position [220, 205, 280, 235] Expr "((u(2)-303.15)/(80-30)*(0.3-0.043 )+0.0" "43)+((u(2)-303.15)/(80-30)*(10.8-17.81 )+17.81)*u(1)+((u(2)-303.15)/(80-30)*(" "-16+39.85 )-39.85)*u(1)^2+((u(2)-303.15)/(80-30)*(14.1-36 )+36)*u(1)^3" } Block { BlockType Fcn Name "Linear Interp upto a=3" Position [365, 55, 425, 85] Expr "u(1)+(u(2)-1)*(lambda_max_diff-u(1))/2" } Block { BlockType Math Name "Math\nFunction" Ports [1, 1] Position [370, 340, 400, 370] } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [170, 194, 175, 241] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [170, 29, 175, 76] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [2, 1] Position [330, 44, 335, 91] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Product Name "Product" Ports [3, 1] Position [555, 293, 585, 327] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "RH_CA" Ports [2, 1] Position [295, 336, 325, 369] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [55, 140, 75, 160] ShowName off IconShape "round" Inputs "+|+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch1" Position [380, 135, 410, 165] Criteria "u2 > Threshold" Threshold "1" InputSameDT off SaturateOnIntegerOverflow off ZeroCross off } Block { BlockType Constant Name "a=1" Position [65, 25, 95, 55] Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Scope Name "lambda1" Ports [1] Position [520, 199, 550, 231] Floating off Location [110, 118, 688, 565] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "10.2" YMax "11.7" SaveName "ScopeData5" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Gain Name "nd1" Position [540, 73, 575, 107] Gain "2.5/lambda_max_drag" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "per cm^2" Position [435, 387, 515, 413] Value "(3.5E-2)/14" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Outport Name "n_drag" Position [600, 83, 630, 97] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "lambda_mb" Position [600, 143, 630, 157] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Dw" Position [630, 303, 660, 317] Port "3" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Constant5" SrcPort 1 Points [0, 30] DstBlock "RH_CA" DstPort 1 } Line { SrcBlock "Tst" SrcPort 1 Points [70, 0] Branch { DstBlock "RH_CA" DstPort 2 } Branch { Points [0, -130] Branch { DstBlock "Mux" DstPort 2 } Branch { Points [0, -165] DstBlock "Mux1" DstPort 2 } } } Line { SrcBlock "Product" SrcPort 1 Points [10, 0] Branch { DstBlock "Dw" DstPort 1 } Branch { Points [0, 45] DstBlock "Display" DstPort 1 } } Line { SrcBlock "Math\nFunction" SrcPort 1 Points [110, 0; 0, -45] DstBlock "Product" DstPort 2 } Line { SrcBlock " " SrcPort 1 Points [20, 0] Branch { Points [0, 55] DstBlock "Mux" DstPort 1 } Branch { Points [160, 0] Branch { DstBlock "Switch1" DstPort 2 } Branch { Points [0, -70] DstBlock "Mux2" DstPort 2 } Branch { Points [-65, 0; 0, 20] DstBlock "Activity" DstPort 1 } } } Line { SrcBlock "Switch1" SrcPort 1 Points [60, 0] Branch { Points [0, 65] Branch { Points [0, 85] DstBlock "Product" DstPort 1 } Branch { DstBlock "lambda1" DstPort 1 } } Branch { Points [45, 0] Branch { DstBlock "lambda_mb" DstPort 1 } Branch { Points [0, -60] DstBlock "nd1" DstPort 1 } } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Interpolated\n Zawodzinski / Hinatsu1" DstPort 1 } Line { SrcBlock "Interpolated\n Zawodzinski / Hinatsu1" SrcPort 1 Points [70, 0; 0, -60] DstBlock "Switch1" DstPort 3 } Line { SrcBlock "a=1" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Interpolated\n Zawodzinski / Hinatsu" SrcPort 1 DstBlock "Mux2" DstPort 1 } Line { SrcBlock "RH_CA" SrcPort 1 DstBlock "Math\nFunction" DstPort 1 } Line { SrcBlock "per cm^2" SrcPort 1 Points [10, 0; 0, -80] DstBlock "Product" DstPort 3 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Interpolated\n Zawodzinski / Hinatsu" DstPort 1 } Line { SrcBlock "Mux2" SrcPort 1 DstBlock "Linear Interp upto a=3" DstPort 1 } Line { SrcBlock "Linear Interp upto a=3" SrcPort 1 Points [25, 0; 0, 55; -90, 0] DstBlock "Switch1" DstPort 1 } Line { SrcBlock "nd1" SrcPort 1 DstBlock "n_drag" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock " " DstPort 1 } Line { SrcBlock "a_an" SrcPort 1 Points [10, 0] DstBlock "Sum1" DstPort 1 } Line { SrcBlock "a_ca" SrcPort 1 Points [15, 0] DstBlock "Sum1" DstPort 2 } Annotation { Name "Note: Area is calculated in cm^2 in thi" "s program, thus Dw is in units of cm^2/s" Position [391, 445] ForegroundColor "red" UseDisplayTextAsClickCallback off } } } Block { BlockType Outport Name "Voltage" Position [900, 153, 930, 167] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Wv,mb" Position [520, 273, 550, 287] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "WH2_rct" Position [250, 138, 280, 152] ForegroundColor "red" Port "3" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Wv,gen" Position [300, 118, 330, 132] ForegroundColor "blue" Port "4" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "VoltageInputs" Position [905, 243, 935, 257] Port "5" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "WO2_rct" Position [300, 158, 330, 172] ForegroundColor "green" Port "6" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Reactions" SrcPort 2 Points [10, 0] Branch { DstBlock "WH2_rct" DstPort 1 } Branch { Points [0, -95] DstBlock "Mux2" DstPort 4 } } Line { Name "I_st" Labels [0, 0] SrcBlock "Ist" SrcPort 1 Points [25, 0; 0, 0] Branch { Points [0, 45] Branch { Labels [1, 0] Points [0, 20] DstBlock "Current" DstPort 1 } Branch { DstBlock "Drag" DstPort 1 } } Branch { Points [0, 0] Branch { Points [405, 0; 0, -15] DstBlock "Mux" DstPort 6 } Branch { Points [0, -60] DstBlock "Reactions" DstPort 1 } } } Line { SrcBlock "Reactions" SrcPort 3 Points [20, 0] Branch { DstBlock "WO2_rct" DstPort 1 } Branch { Points [0, -105] DstBlock "Mux2" DstPort 5 } } Line { SrcBlock "Drag" SrcPort 1 Points [40, 0; 0, -115] Branch { Points [0, -50] DstBlock "Mux2" DstPort 8 } Branch { DstBlock "Nv_drag" DstPort 1 } } Line { SrcBlock "Drag" SrcPort 2 Points [50, 0] Branch { Points [0, 0; 0, -45] Branch { Points [0, -155] DstBlock "Mux2" DstPort 7 } Branch { DstBlock "Wv_mb" DstPort 1 } } Branch { DstBlock "Wv,mb" DstPort 1 } } Line { Name "N_v,diff" Labels [0, 0] SrcBlock "Back Diffusion" SrcPort 1 Points [40, 0; 0, -245] Branch { Labels [1, 0] Points [-305, 0] DstBlock "Drag" DstPort 3 } Branch { Points [25, 0] Branch { Points [340, 0] DstBlock "Mux2" DstPort 9 } Branch { DstBlock "N_v,diff" DstPort 1 } } } Line { SrcBlock "m,l,an,ch" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Tst" SrcPort 1 Points [5, 0] Branch { Points [165, 0] Branch { Points [0, 35] Branch { Points [115, 0] Branch { Points [0, 75] DstBlock "lambda Ca" DstPort 2 } Branch { Points [0, -55] DstBlock "lambda An" DstPort 2 } Branch { DstBlock "lambda mb" DstPort 2 } } Branch { Points [0, 50] DstBlock "a_ca" DstPort 1 } } Branch { Points [0, -30] DstBlock "a_an" DstPort 2 } } Branch { Points [0, -390; 600, 0; 0, 20] DstBlock "Mux" DstPort 1 } } Line { SrcBlock "a_an" SrcPort 1 Points [10, 0] Branch { DstBlock "lambda An" DstPort 1 } Branch { Points [0, 55] DstBlock "lambda mb" DstPort 1 } } Line { SrcBlock "a_ca" SrcPort 1 Points [10, 0] Branch { DstBlock "lambda Ca" DstPort 1 } Branch { Points [0, -45] DstBlock "lambda mb" DstPort 3 } } Line { SrcBlock "lambda mb" SrcPort 2 Points [180, 0; 0, -105] Branch { Points [335, 0; 0, -395] DstBlock "Mux2" DstPort 1 } Branch { Points [0, -240] DstBlock "Mux" DstPort 5 } } Line { SrcBlock "lambda An" SrcPort 1 Points [30, 0] Branch { DstBlock "Back Diffusion" DstPort 1 } Branch { Points [0, 0] Branch { DstBlock "Anode Water Content" DstPort 1 } Branch { Points [500, 0; 0, -430] DstBlock "Mux2" DstPort 2 } } } Line { SrcBlock "lambda Ca" SrcPort 1 Points [15, 0] Branch { DstBlock "Back Diffusion" DstPort 3 } Branch { Points [0, 50; 0, 0] Branch { Points [530, 0; 0, -600] DstBlock "Mux2" DstPort 3 } Branch { Points [0, 20] DstBlock "Cathode water Content" DstPort 1 } } } Line { SrcBlock "Voltage_mv" SrcPort 1 Points [5, 0] Branch { DstBlock "Voltage" DstPort 1 } Branch { Points [0, 45] DstBlock "CellVoltage" DstPort 1 } } Line { SrcBlock "Mux" SrcPort 1 Points [5, 0] Branch { Points [0, 90] DstBlock "VoltageInputs" DstPort 1 } Branch { DstBlock "Voltage_mv" DstPort 1 } } Line { SrcBlock "From" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Mux2" SrcPort 1 DstBlock "To Workspace2" DstPort 1 } Line { Name "cO2" Labels [1, 1] SrcBlock "Demux1" SrcPort 1 Points [470, 0; 0, -495] DstBlock "Mux" DstPort 2 } Line { SrcBlock "ca(1)" SrcPort 1 DstBlock "Demux1" DstPort 1 } Line { SrcBlock "an(1)" SrcPort 1 DstBlock "Demux" DstPort 1 } Line { Name "cv" Labels [1, 1] SrcBlock "Demux" SrcPort 2 Points [110, 0] DstBlock "a_an" DstPort 1 } Line { Name "cH2" Labels [0, 0] SrcBlock "Demux" SrcPort 1 Points [500, 0; 0, -210] DstBlock "Mux" DstPort 3 } Line { SrcBlock "Demux" SrcPort 3 DstBlock "Terminator2" DstPort 1 } Line { SrcBlock "Demux" SrcPort 4 DstBlock "Terminator1" DstPort 1 } Line { SrcBlock "Demux" SrcPort 5 DstBlock "Terminator3" DstPort 1 } Line { SrcBlock "Demux" SrcPort 6 DstBlock "Terminator4" DstPort 1 } Line { SrcBlock "Demux" SrcPort 7 DstBlock "Terminator5" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 2 DstBlock "Terminator7" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 4 DstBlock "Terminator6" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 5 DstBlock "Terminator8" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 6 DstBlock "Terminator9" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 7 DstBlock "Terminator10" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 8 DstBlock "Terminator12" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 9 DstBlock "Terminator11" DstPort 1 } Line { Name "cv" Labels [2, 1] SrcBlock "Demux1" SrcPort 3 Points [40, 0; 0, -70] DstBlock "a_ca" DstPort 2 } Line { SrcBlock "lambda mb" SrcPort 3 Points [15, 0; 0, 35] DstBlock "Back Diffusion" DstPort 2 } Line { SrcBlock "lambda mb" SrcPort 1 Points [5, 0; 0, -160; -135, 0; 0, -80] DstBlock "Drag" DstPort 2 } Line { SrcBlock "Reactions" SrcPort 1 Points [25, 0] Branch { DstBlock "Wv,gen" DstPort 1 } Branch { Points [0, -55] DstBlock "Mux2" DstPort 6 } } Annotation { Position [764, 568] UseDisplayTextAsClickCallback off } } } Block { BlockType Mux Name "Mux1" Ports [7, 1] Position [250, 25, 255, 235] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux3" Ports [7, 1] Position [235, 420, 240, 630] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Scope Name "Scope" Ports [1] Position [720, 264, 750, 296] Floating off Location [213, 294, 1198, 768] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } TimeRange "1122.327511942987" YMin "650" YMax "975.609" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [670, 590, 690, 610] Orientation "left" NamePlacement "alternate" ShowName off IconShape "round" Inputs "++|" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Terminator Name "Terminator1" Position [605, 430, 625, 450] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator11" Position [575, 550, 595, 570] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator12" Position [610, 535, 630, 555] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator2" Position [190, 660, 210, 680] ForegroundColor "gray" } Block { BlockType Terminator Name "Terminator3" Position [190, 700, 210, 720] ForegroundColor "gray" } Block { BlockType Terminator Name "Terminator4" Position [650, 460, 670, 480] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator6" Position [615, 475, 635, 495] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator7" Position [580, 445, 600, 465] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator8" Position [575, 490, 595, 510] NamePlacement "alternate" ShowName off } Block { BlockType Terminator Name "Terminator9" Position [605, 505, 625, 525] NamePlacement "alternate" ShowName off } Block { BlockType ToWorkspace Name "To Workspace2" Position [610, 54, 655, 76] VariableName "tout" MaxDataPoints "inf" SampleTime "deltat" SaveFormat "Array" } Block { BlockType Scope Name "ml,an,ch" Ports [1] Position [535, 154, 565, 186] Floating off Location [784, 132, 1292, 556] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "2.2e-005" SaveName "ScopeData1" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "ml,ca,ch" Ports [1] Position [515, 519, 545, 551] Floating off Location [69, 104, 1142, 586] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1.3" SaveName "ScopeData2" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Outport Name "Voltage" Position [720, 198, 750, 212] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "Voltage_inputs" Position [580, 353, 610, 367] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "s_ca" Position [645, 523, 675, 537] Port "3" IconDisplay "Port number" BusOutputAsStruct off } Line { Name "P_CA_IN" Labels [1, 0] SrcBlock "P_CA_IN" SrcPort 1 DstBlock "Mux3" DstPort 1 } Line { Name "T_CA_IN" Labels [1, 0] SrcBlock "T_CA_IN" SrcPort 1 DstBlock "Mux3" DstPort 2 } Line { Name "P_AN_IN" Labels [1, 0] SrcBlock "P_AN_IN" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { Name "T_AN_IN" Labels [1, 0] SrcBlock "T_AN_IN" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { Name "P_CA_OUT" Labels [1, 0] SrcBlock "P_CA_OUT" SrcPort 1 DstBlock "Mux3" DstPort 5 } Line { Name "T_CA_OUT" Labels [1, 0] SrcBlock "T_CA_OUT" SrcPort 1 DstBlock "Mux3" DstPort 6 } Line { Name "P_AN_OUT" Labels [1, 0] SrcBlock "P_AN_OUT" SrcPort 1 DstBlock "Mux1" DstPort 5 } Line { Name "T_AN_OUT" Labels [1, 0] SrcBlock "T_AN_OUT" SrcPort 1 DstBlock "Mux1" DstPort 6 } Line { Name "W_a_CA_IN" Labels [1, 0] SrcBlock "W_a_CA_IN" SrcPort 1 DstBlock "Mux3" DstPort 4 } Line { Name "T_st" Labels [0, 0] SrcBlock "T_st" SrcPort 1 Points [10, 0] Branch { Points [0, -55] Branch { Labels [1, 1] Points [0, -110] DstBlock "Mux1" DstPort 7 } Branch { Points [235, 0] Branch { DstBlock "Membrane" DstPort 3 } Branch { Points [0, 175] DstBlock "Cathode" DstPort 2 } Branch { Points [0, -185] DstBlock "Anode" DstPort 2 } } } Branch { Points [0, 230] DstBlock "Mux3" DstPort 7 } } Line { Name "Purge" Labels [1, 0] SrcBlock "Purge State" SrcPort 1 DstBlock "Mux1" DstPort 4 } Line { SrcBlock "Clock" SrcPort 1 Points [15, 0] Branch { Points [0, 35] DstBlock "To Workspace2" DstPort 1 } Branch { DstBlock "Display2" DstPort 1 } } Line { SrcBlock "RH_CA_OUT" SrcPort 1 DstBlock "Terminator2" DstPort 1 } Line { SrcBlock "RH_AN_OUT" SrcPort 1 DstBlock "Terminator3" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Anode" DstPort 1 } Line { SrcBlock "Cathode" SrcPort 1 Points [20, 0] Branch { DstBlock "Demux1" DstPort 1 } Branch { Points [0, -65; -160, 0] DstBlock "Membrane" DstPort 5 } } Line { SrcBlock "Cathode" SrcPort 2 DstBlock "ml,ca,ch" DstPort 1 } Line { SrcBlock "RH_AN_IN" SrcPort 1 DstBlock "Mux1" DstPort 3 } Line { Name "RH_CA_IN" Labels [1, 0] SrcBlock "RH_CA_IN" SrcPort 1 DstBlock "Mux3" DstPort 3 } Line { SrcBlock "Demux1" SrcPort 2 DstBlock "Terminator7" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 4 DstBlock "Terminator6" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 5 DstBlock "Terminator8" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 6 DstBlock "Terminator9" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 8 DstBlock "Terminator12" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 9 DstBlock "Terminator11" DstPort 1 } Line { Name "cO2" Labels [0, 0] SrcBlock "Demux1" SrcPort 1 DstBlock "Terminator1" DstPort 1 } Line { Name "cv" Labels [0, 0] SrcBlock "Demux1" SrcPort 3 DstBlock "Terminator4" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 7 DstBlock "s_ca" DstPort 1 } Line { SrcBlock "Anode" SrcPort 1 Points [20, 0; 0, 115; -155, 0] DstBlock "Membrane" DstPort 1 } Line { Name "I_st" Labels [0, 0] SrcBlock "I_st" SrcPort 1 DstBlock "Membrane" DstPort 4 } Line { SrcBlock "Membrane" SrcPort 1 Points [140, 0] Branch { DstBlock "Scope" DstPort 1 } Branch { Points [0, -35] Branch { Points [0, -40] DstBlock "Voltage" DstPort 1 } Branch { DstBlock "Display1" DstPort 1 } } } Line { SrcBlock "Membrane" SrcPort 2 Points [25, 0] Branch { Points [170, 0; 0, 300] DstBlock "Sum" DstPort 2 } Branch { Points [0, -90; -190, 0] DstBlock "Anode" DstPort 4 } } Line { SrcBlock "Membrane" SrcPort 4 Points [160, 0] DstBlock "Sum" DstPort 1 } Line { SrcBlock "Membrane" SrcPort 5 DstBlock "Voltage_inputs" DstPort 1 } Line { SrcBlock "Membrane" SrcPort 6 Points [5, 0; 0, 85; -170, 0; 0, 20] DstBlock "Cathode" DstPort 1 } Line { SrcBlock "Mux3" SrcPort 1 DstBlock "Cathode" DstPort 3 } Line { SrcBlock "Sum" SrcPort 1 Points [-320, 0; 0, -55] DstBlock "Cathode" DstPort 4 } Line { SrcBlock "Anode" SrcPort 2 Points [5, 0] Branch { DstBlock "ml,an,ch" DstPort 1 } Branch { Points [0, 60; -150, 0; 0, 80] DstBlock "Membrane" DstPort 2 } } Line { SrcBlock "Membrane" SrcPort 3 Points [10, 0; 0, -100; -195, 0; 0, -60] DstBlock "Anode" DstPort 3 } } }