Model { Name "FerrariV8" Version 7.2 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.218" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" SaveDefaultBlockParams on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" Created "Mon Jan 19 17:04:53 2009" Creator "Keith Wakeham" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Keith Wakeham" ModifiedDateFormat "%" LastModifiedDate "Fri Apr 03 13:40:19 2009" RTWModifiedTimeStamp 0 ModelVersionFormat "1.%" ConfigurationManager "None" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowSignalResolutionIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off SimulationMode "normal" 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 CovModelRefEnable "Off" ExtModeBatchMode off ExtModeEnableFloating on ExtModeTrigType "manual" ExtModeTrigMode "normal" 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 on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock on BufferReuse on ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.5.1" Array { Type "Handle" Dimension 9 Simulink.SolverCC { $ObjectID 2 Version "1.5.1" StartTime "0" StopTime ".1" AbsTol "auto" FixedStep ".00003" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ZcThreshold "auto" ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "0.000001" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-6" SolverMode "Auto" Solver "ode45" SolverName "ode45" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Nonadaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" SignalSizeVariationType "Allow only fixed size" } Simulink.DataIOCC { $ObjectID 3 Version "1.5.1" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "10000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput on SaveState off SignalLogging on InspectSignalLogs off SaveTime on StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.5.1" Array { Type "Cell" Dimension 4 Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" PropName "DisabledProps" } BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnhancedBackFolding off EnforceIntegerDowncast on ExpressionFolding on EnableMemcpy on MemcpyThreshold 64 ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero off NoFixptDivByZeroProtection off EfficientFloat2IntCast off EfficientMapNaN2IntZero on OptimizeModelRefInitCode off LifeSpan "inf" BufferReusableBoundary on SimCompilerOptimization "Off" AccelVerboseBuild off } Simulink.DebuggingCC { $ObjectID 5 Version "1.5.1" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" SignalRangeChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" SaveWithDisabledLinksMsg "warning" SaveWithParameterizedLinksMsg "warning" CheckSSInitialOutputMsg on UnderspecifiedInitializationDetection "Classic" MergeDetectMultiDrivingBlocksExec "none" CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "UseLocalSettings" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" SolverPrmCheckMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "error" MultiTaskCondExecSysMsg "error" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" ParameterTunabilityLossMsg "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" UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" StrictBusMsg "Warning" LoggingUnavailableSignals "error" BlockIODiagnostic "none" } Simulink.HardwareCC { $ObjectID 6 Version "1.5.1" 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 "Unspecified" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "Specified" TargetUnknown off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.5.1" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.SFSimCC { $ObjectID 8 Version "1.5.1" SFSimEnableDebug on SFSimOverflowDetection on SFSimEcho on SimUseLocalCustomCode off SimBuildMode "sf_incremental_build" } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 9 Version "1.5.1" Array { Type "Cell" Dimension 6 Cell "IncludeHyperlinkInReport" Cell "GenerateTraceInfo" Cell "GenerateTraceReport" Cell "GenerateTraceReportSl" Cell "GenerateTraceReportSf" Cell "GenerateTraceReportEml" PropName "DisabledProps" } 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 RTWUseLocalCustomCode off RTWUseSimCustomCode off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime off GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateCodeInfo off RTWCompilerOptimization "Off" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 10 Version "1.5.1" Array { Type "Cell" Dimension 17 Cell "IgnoreCustomStorageClasses" Cell "IgnoreTestpoints" 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" } ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses on IgnoreTestpoints off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off 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 UseSimReservedNames off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 11 Version "1.5.1" Array { Type "Cell" Dimension 16 Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlCompliant" Cell "CPPClassGenCompliant" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "SupportNonFinite" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" Cell "SupportNonInlinedSFcns" Cell "PortableWordSizes" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on CompOptLevelCompliant on IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off ERTFirstTimeCompliant 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" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant off AutosarCompliant off UseMalloc off ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" ExtModeIntrfLevel "Level1" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off GenerateASAP2 off } PropName "Components" } } hdlcoderui.hdlcc { $ObjectID 12 Version "1.5.1" Description "HDL Coder custom configuration component" Name "HDL Coder" Array { Type "Cell" Dimension 1 Cell "" PropName "HDLConfigFile" } HDLCActiveTab "0" } PropName "Components" } Name "Configuration" CurrentDlgPage "Solver" ConfigPrmDlgPosition " [ 400, 210, 1280, 840 ] " } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" UseDisplayTextAsClickCallback off } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } BlockParameterDefaults { Block { BlockType Clock DisplayTime off } Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutMin "[]" OutMax "[]" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "fixdt(1,16,0)" ConRadixGroup "Use specified scaling" OutScaling "[]" OutDataTypeStr "Inherit: Inherit from 'Constant value'" LockScale off SampleTime "inf" FramePeriod "inf" } Block { BlockType Demux Outputs "4" DisplayOption "none" BusSelectionMode off } Block { BlockType Derivative LinearizePole "inf" } Block { BlockType Display Format "short" Decimation "10" Floating off SampleTime "-1" } Block { BlockType Fcn Expr "sin(u[1])" SampleTime "-1" } Block { BlockType Ground } Block { BlockType Inport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" OutMin "[]" OutMax "[]" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: auto" LockScale off 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 ContinuousStateAttributes "''" } Block { BlockType Logic Operator "AND" Inputs "2" IconShape "rectangular" AllPortsSameDT on OutDataTypeMode "Logical (see Configuration Parameters: Optimization)" LogicDataType "uint(8)" OutDataTypeStr "Inherit: Logical (see Configuration Parameters: Optimization)" SampleTime "-1" } Block { BlockType Math Operator "exp" OutputSignalType "auto" SampleTime "-1" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } 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" OutMin "[]" OutMax "[]" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: auto" LockScale off SignalType "auto" SamplingMode "auto" SourceOfInitialOutputValue "Dialog" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType RelationalOperator Operator ">=" InputSameDT on LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimization)" LogicDataType "uint(8)" OutDataTypeStr "Inherit: Logical (see Configuration Parameters: Optimization)" ZeroCross on SampleTime "-1" } Block { BlockType "S-Function" FunctionName "system" SFunctionModules "''" PortCounts "[]" SFunctionDeploymentMode off } 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 "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off CheckFcnCallInpInsideContextMsg 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 "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Switch Criteria "u2 >= Threshold" Threshold "0" InputSameDT on OutMin "[]" OutMax "[]" OutDataTypeMode "Inherit via internal rule" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Inherit via internal rule" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on SampleTime "-1" } Block { BlockType Terminator } Block { BlockType Trigonometry Operator "sin" OutputSignalType "auto" SampleTime "-1" } Block { BlockType UnitDelay X0 "0" SampleTime "1" StateMustResolveToSignalObject off RTWStateStorageClass "Auto" } } System { Name "FerrariV8" Location [2, 82, 1413, 876] Open on 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" ReportName "simulink-default.rpt" Block { BlockType SubSystem Name "Crank Position" Ports [3, 5] Position [235, 60, 355, 240] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Crank Position" Location [148, 96, 1370, 866] 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 "Crank Inertia" Position [110, 128, 140, 142] IconDisplay "Port number" } Block { BlockType Inport Name "Torque" Position [30, 88, 60, 102] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Initial RPM" Position [145, 259, 175, 281] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Display Name "Angular Acc" Ports [1] Position [320, 90, 410, 120] Decimation "1" Lockdown off } Block { BlockType SubSystem Name "Average Torque/omega" Ports [4, 1] Position [790, 521, 905, 584] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Average Torque/omega" Location [334, 170, 1187, 566] 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 "cycle reset" Position [240, 100, 270, 115] Orientation "down" IconDisplay "Port number" } Block { BlockType Inport Name "time" Position [430, 358, 460, 372] Orientation "left" Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "omega" Position [180, 238, 210, 252] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Torque" Position [45, 18, 75, 32] Port "4" IconDisplay "Port number" } Block { BlockType Display Name "Display" Ports [1] Position [695, 175, 785, 205] Decimation "1" Lockdown off } Block { BlockType Display Name "Display1" Ports [1] Position [685, 284, 830, 316] Format "long" Decimation "1" Lockdown off } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [320, 177, 350, 208] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide5" Ports [2, 1] Position [425, 282, 455, 313] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "Integrator3" Ports [2, 1] Position [110, 28, 155, 97] ExternalReset "falling" } Block { BlockType Integrator Name "Integrator4" Ports [2, 1] Position [325, 253, 370, 322] ExternalReset "falling" } Block { BlockType Reference Name "Sample\nand Hold1" Ports [1, 1, 0, 1] Position [415, 169, 525, 211] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Falling edge" initCond "0" latchinput "off" } Block { BlockType Reference Name "Sample\nand Hold2" Ports [1, 1, 0, 1] Position [505, 280, 600, 320] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Falling edge" initCond "0" latchinput "off" } Block { BlockType UnitDelay Name "Unit Delay" Position [210, 288, 245, 322] SampleTime "-1" } Block { BlockType UnitDelay Name "Unit Delay1" Position [45, 63, 80, 97] SampleTime "-1" } Block { BlockType Outport Name "Average torque" Position [700, 98, 730, 112] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Integrator4" SrcPort 1 DstBlock "Divide5" DstPort 1 } Line { SrcBlock "Divide5" SrcPort 1 DstBlock "Sample\nand Hold2" DstPort 1 } Line { SrcBlock "Divide1" SrcPort 1 Points [0, -5] DstBlock "Sample\nand Hold1" DstPort 1 } Line { SrcBlock "Unit Delay1" SrcPort 1 DstBlock "Integrator3" DstPort 2 } Line { SrcBlock "Unit Delay" SrcPort 1 DstBlock "Integrator4" DstPort 2 } Line { SrcBlock "Sample\nand Hold2" SrcPort 1 DstBlock "Display1" DstPort 1 } Line { SrcBlock "Sample\nand Hold1" SrcPort 1 Points [110, 0] Branch { DstBlock "Display" DstPort 1 } Branch { Points [0, -85] DstBlock "Average torque" DstPort 1 } } Line { SrcBlock "Integrator3" SrcPort 1 Points [30, 0; 0, 120] DstBlock "Divide1" DstPort 1 } Line { SrcBlock "Torque" SrcPort 1 Points [0, 20] DstBlock "Integrator3" DstPort 1 } Line { SrcBlock "cycle reset" SrcPort 1 Points [0, 15] Branch { Points [0, 10; 215, 0] DstBlock "Sample\nand Hold1" DstPort trigger } Branch { Points [295, 0] DstBlock "Sample\nand Hold2" DstPort trigger } Branch { Points [-160, 0] Branch { Points [0, 170] DstBlock "Unit Delay" DstPort 1 } Branch { Points [-65, 0] DstBlock "Unit Delay1" DstPort 1 } } } Line { SrcBlock "omega" SrcPort 1 Points [0, 25] DstBlock "Integrator4" DstPort 1 } Line { SrcBlock "time" SrcPort 1 Points [-15, 0] Branch { DstBlock "Divide5" DstPort 2 } Branch { Points [-105, 0] DstBlock "Divide1" DstPort 2 } } } } Block { BlockType SubSystem Name "Cycle Time" Ports [1, 1] Position [525, 486, 650, 544] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Cycle Time" Location [848, 354, 1410, 746] 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 "cycle reset" Position [135, 38, 165, 52] IconDisplay "Port number" } Block { BlockType Clock Name "Clock1" Position [25, 100, 45, 120] Decimation "10" } Block { BlockType Reference Name "Sample\nand Hold3" Ports [1, 1, 0, 1] Position [130, 89, 240, 131] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Falling edge" initCond "0" latchinput "off" } Block { BlockType Reference Name "Sample\nand Hold4" Ports [1, 1, 0, 1] Position [330, 164, 440, 206] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Falling edge" initCond "0" latchinput "off" } Block { BlockType Reference Name "Sample\nand Hold5" Ports [1, 1, 0, 1] Position [355, 309, 465, 351] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Falling edge" initCond "0" latchinput "off" } Block { BlockType Sum Name "Subtract" Ports [2, 1] Position [285, 242, 315, 273] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType UnitDelay Name "Unit Delay3" Position [325, 28, 360, 62] SampleTime "-1" } Block { BlockType Outport Name "cycle time" Position [490, 323, 520, 337] IconDisplay "Port number" } Line { SrcBlock "Clock1" SrcPort 1 DstBlock "Sample\nand Hold3" DstPort 1 } Line { SrcBlock "Unit Delay3" SrcPort 1 Points [20, 0] DstBlock "Sample\nand Hold4" DstPort trigger } Line { SrcBlock "Sample\nand Hold4" SrcPort 1 Points [20, 0; 0, 100; -125, 0; 0, 10; -70, 0] DstBlock "Subtract" DstPort 2 } Line { SrcBlock "Sample\nand Hold3" SrcPort 1 Points [5, 0] Branch { Points [30, 0; 0, 75] DstBlock "Sample\nand Hold4" DstPort 1 } Branch { Points [0, 140] DstBlock "Subtract" DstPort 1 } } Line { SrcBlock "Subtract" SrcPort 1 Points [5, 0; 0, 70] DstBlock "Sample\nand Hold5" DstPort 1 } Line { SrcBlock "cycle reset" SrcPort 1 Points [15, 0] Branch { DstBlock "Sample\nand Hold3" DstPort trigger } Branch { Points [110, 0] Branch { DstBlock "Unit Delay3" DstPort 1 } Branch { Points [0, 195; 115, 0] DstBlock "Sample\nand Hold5" DstPort trigger } } } Line { SrcBlock "Sample\nand Hold5" SrcPort 1 DstBlock "cycle time" DstPort 1 } } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [170, 87, 200, 118] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "Integrator1" Ports [2, 1] Position [340, 268, 385, 337] ExternalReset "falling" } Block { BlockType Integrator Name "Integrator2" Ports [2, 1] Position [245, 218, 290, 287] InitialConditionSource "external" } Block { BlockType Scope Name "Omega dot" Ports [1] Position [410, 149, 440, 181] Floating off Location [465, 280, 1199, 782] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "522.5" YMax "523.5" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Theta" Ports [1] Position [525, 244, 555, 276] Floating off Location [122, 581, 1234, 808] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "750" SaveName "ScopeData1" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Torque1" Ports [1] Position [130, 24, 160, 56] Floating off Location [69, 409, 1402, 863] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-100" YMax "325" SaveName "ScopeData10" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType SubSystem Name "reset" Ports [1, 1] Position [445, 340, 515, 400] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "reset" Location [488, 403, 868, 602] 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 "theta" Position [35, 13, 65, 27] IconDisplay "Port number" } Block { BlockType Constant Name "Initial Position" Position [25, 50, 55, 80] Value "3*pi" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Position3" Position [25, 100, 55, 130] Value "4*pi" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Logic Name "Logical\nOperator" Ports [2, 1] Position [210, 52, 240, 83] AllPortsSameDT off OutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [125, 27, 155, 58] InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType RelationalOperator Name "Relational\nOperator3" Position [120, 92, 150, 123] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Outport Name "reset" Position [265, 63, 295, 77] IconDisplay "Port number" } Line { SrcBlock "Initial Position" SrcPort 1 Points [50, 0] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Initial Position3" SrcPort 1 DstBlock "Relational\nOperator3" DstPort 2 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [0, 15] DstBlock "Logical\nOperator" DstPort 1 } Line { SrcBlock "Relational\nOperator3" SrcPort 1 Points [15, 0; 0, -35] DstBlock "Logical\nOperator" DstPort 2 } Line { SrcBlock "theta" SrcPort 1 Points [0, 15; 20, 0] Branch { DstBlock "Relational\nOperator" DstPort 1 } Branch { Points [0, 65] DstBlock "Relational\nOperator3" DstPort 1 } } Line { SrcBlock "Logical\nOperator" SrcPort 1 DstBlock "reset" DstPort 1 } } } Block { BlockType Outport Name "A" Position [380, 28, 410, 42] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "w" Position [440, 223, 470, 237] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "O" Position [645, 298, 675, 312] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Cycle Reset" Position [645, 363, 675, 377] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Average Torque" Position [970, 558, 1000, 572] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Divide" SrcPort 1 Points [25, 0] Branch { DstBlock "Angular Acc" DstPort 1 } Branch { Points [0, -70] DstBlock "A" DstPort 1 } Branch { DstBlock "Integrator2" DstPort 1 } } Line { SrcBlock "Integrator2" SrcPort 1 Points [15, 0] Branch { Points [85, 0; 0, -25] Branch { DstBlock "Omega dot" DstPort 1 } Branch { DstBlock "w" DstPort 1 } } Branch { Points [0, 30] Branch { DstBlock "Integrator1" DstPort 1 } Branch { Labels [0, 0] Points [0, 50; -110, 0; 0, 225] DstBlock "Average Torque/omega" DstPort 3 } } } Line { SrcBlock "Integrator1" SrcPort 1 Points [5, 0] Branch { Points [0, -45] DstBlock "Theta" DstPort 1 } Branch { Points [0, 0] Branch { DstBlock "O" DstPort 1 } Branch { Labels [0, 0] Points [0, 65] DstBlock "reset" DstPort 1 } } } Line { SrcBlock "Crank Inertia" SrcPort 1 Points [10, 0] DstBlock "Divide" DstPort 2 } Line { SrcBlock "Torque" SrcPort 1 Points [15, 0] Branch { Points [0, -55] DstBlock "Torque1" DstPort 1 } Branch { Labels [0, 0] Points [0, 480] DstBlock "Average Torque/omega" DstPort 4 } } Line { SrcBlock "Initial RPM" SrcPort 1 DstBlock "Integrator2" DstPort 2 } Line { SrcBlock "reset" SrcPort 1 Points [20, 0] Branch { DstBlock "Cycle Reset" DstPort 1 } Branch { Points [0, 95] Branch { Points [-115, 0] Branch { Points [0, 50] DstBlock "Cycle Time" DstPort 1 } Branch { Points [-100, 0] DstBlock "Integrator1" DstPort 2 } } Branch { Points [215, 0; 0, 65] DstBlock "Average Torque/omega" DstPort 1 } } } Line { SrcBlock "Cycle Time" SrcPort 1 Points [35, 0; 0, 30] DstBlock "Average Torque/omega" DstPort 2 } Line { SrcBlock "Average Torque/omega" SrcPort 1 Points [20, 0; 0, 10] DstBlock "Average Torque" DstPort 1 } } } Block { BlockType SubSystem Name "Cylinder" Ports [3, 2] Position [615, 269, 740, 371] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Cylinder" Location [792, 98, 1162, 568] 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 "Crank Mux" Position [25, 48, 55, 62] IconDisplay "Port number" } Block { BlockType Inport Name "Geo Mux" Position [65, 248, 95, 262] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Spark Advance" Position [60, 423, 90, 437] Port "3" IconDisplay "Port number" } Block { BlockType Demux Name "Demux" Ports [1, 8] Position [120, 95, 130, 415] ShowName off Outputs "8" DisplayOption "bar" } Block { BlockType Demux Name "Demux2" Ports [1, 2] Position [90, 15, 105, 95] ShowName off Outputs "2" DisplayOption "bar" } Block { BlockType SubSystem Name "Subsystem" Ports [11, 2] Position [175, 26, 290, 444] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Subsystem" Location [82, 210, 1347, 745] 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 "Omega" Position [715, 323, 745, 337] IconDisplay "Port number" } Block { BlockType Inport Name "Theta" Position [250, 38, 280, 52] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Crank Offset" Position [240, 220, 270, 235] Orientation "down" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Rod Length" Position [230, 268, 260, 282] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Bore" Position [25, 298, 55, 312] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Case Pressure" Position [35, 348, 65, 362] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "Compression Ratio" Position [320, 460, 350, 475] Orientation "up" Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "Fuel" Position [740, 353, 770, 367] Port "8" IconDisplay "Port number" } Block { BlockType Inport Name "Valve Lift" Position [790, 368, 820, 382] Port "9" IconDisplay "Port number" } Block { BlockType Inport Name "Valve Dia" Position [830, 383, 860, 397] Port "10" IconDisplay "Port number" } Block { BlockType Inport Name "Spark Advance" Position [815, 438, 845, 452] Port "11" IconDisplay "Port number" } Block { BlockType Constant Name "Atm Pressure(Pa)" Position [730, 235, 795, 265] Value "100000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Atm Temp (K)" Position [770, 180, 800, 210] Value "300" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Combustion" Ports [14, 1] Position [885, 233, 990, 462] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Combustion" Location [2, 82, 1413, 859] 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 "Atm Temp" Position [555, 78, 585, 92] IconDisplay "Port number" } Block { BlockType Inport Name "Atm Pressure" Position [490, 128, 520, 142] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Theta" Position [30, 65, 60, 80] Orientation "down" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Volume" Position [870, 148, 900, 162] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Torque" Position [295, 368, 325, 382] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Omega" Position [50, 393, 80, 407] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "Vc" Position [565, 143, 595, 157] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "Fuel" Position [1360, 593, 1390, 607] Port "8" IconDisplay "Port number" } Block { BlockType Inport Name "Valve Lift" Position [540, 753, 570, 767] Port "9" IconDisplay "Port number" } Block { BlockType Inport Name "Valve Dia" Position [535, 808, 565, 822] Port "10" IconDisplay "Port number" } Block { BlockType Inport Name "Half Crank" Position [90, 743, 120, 757] Port "11" IconDisplay "Port number" } Block { BlockType Inport Name "bore" Position [90, 798, 120, 812] Port "12" IconDisplay "Port number" } Block { BlockType Inport Name "piston Area" Position [90, 863, 120, 877] Port "13" IconDisplay "Port number" } Block { BlockType Inport Name "Spark Advance" Position [100, 178, 130, 192] Port "14" IconDisplay "Port number" } Block { BlockType Sum Name "Add Flow" Ports [4, 1] Position [1080, 637, 1125, 713] Inputs "-+-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add1" Ports [4, 1] Position [510, 390, 540, 440] Inputs "+-+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add4" Ports [2, 1] Position [695, 437, 725, 468] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Clock Name "Clock1" Position [90, 470, 110, 490] Decimation "10" } Block { BlockType SubSystem Name "Crank Duration\nSolver" Ports [4, 1] Position [190, 220, 265, 310] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Crank Duration\nSolver" Location [265, 289, 1153, 882] 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 "omega (rad/s)" Position [120, 23, 150, 37] IconDisplay "Port number" } Block { BlockType Inport Name "Sl (current m/s)" Position [100, 163, 130, 177] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Fuel" Position [100, 233, 130, 247] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Sl (current m/s)1" Position [130, 423, 160, 437] Port "4" IconDisplay "Port number" } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [210, 27, 240, 63] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide2" Ports [3, 1] Position [440, 62, 470, 98] Inputs "***" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide3" Ports [2, 1] Position [225, 97, 255, 133] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide4" Ports [2, 1] Position [240, 287, 270, 323] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide5" Ports [3, 1] Position [470, 322, 500, 358] Inputs "***" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide6" Ports [2, 1] Position [255, 357, 285, 393] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [680, 91, 685, 129] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Constant Name "Ref theta B (deg)" Position [225, 170, 290, 200] Value "47" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Ref theta B (deg)1" Position [255, 430, 320, 460] Value "25" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Reference lam flame speed" Position [105, 110, 170, 140] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Reference lam flame speed1" Position [110, 370, 175, 400] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Reference rad/s" Position [90, 60, 155, 90] Value "377" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Reference rad/s1" Position [85, 320, 150, 350] Value "130" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [720, 89, 750, 121] Floating off Location [346, 271, 1152, 602] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.62" YMax "0.84" SaveName "ScopeData5" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch1" Position [635, 225, 665, 255] Threshold ".5" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "U^(1/3)" Position [285, 30, 345, 60] Expr "u(1)^(1/3)" } Block { BlockType Fcn Name "U^(1/3)1" Position [300, 100, 360, 130] Expr "u(1)^(2/3)" } Block { BlockType Fcn Name "U^(1/3)2" Position [315, 290, 375, 320] Expr "u(1)^(1/3)" } Block { BlockType Fcn Name "U^(1/3)3" Position [330, 360, 390, 390] Expr "u(1)^(2/3)" } Block { BlockType Fcn Name "delay deg->rad1" Position [335, 170, 395, 200] Expr "(u(1)*2*pi()/360)" } Block { BlockType Fcn Name "delay deg->rad2" Position [365, 430, 425, 460] Expr "(u(1)*2*pi()/360)" } Block { BlockType Outport Name "Theta B" Position [710, 233, 740, 247] IconDisplay "Port number" } Line { SrcBlock "delay deg->rad1" SrcPort 1 Points [10, 0; 0, -95] DstBlock "Divide2" DstPort 3 } Line { SrcBlock "Ref theta B (deg)" SrcPort 1 DstBlock "delay deg->rad1" DstPort 1 } Line { SrcBlock "U^(1/3)1" SrcPort 1 Points [15, 0; 0, -35] DstBlock "Divide2" DstPort 2 } Line { SrcBlock "Divide3" SrcPort 1 DstBlock "U^(1/3)1" DstPort 1 } Line { SrcBlock "U^(1/3)" SrcPort 1 Points [30, 0; 0, 25] DstBlock "Divide2" DstPort 1 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "U^(1/3)" DstPort 1 } Line { SrcBlock "Reference rad/s" SrcPort 1 Points [0, -20] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "omega (rad/s)" SrcPort 1 Points [0, 5; 25, 0] Branch { DstBlock "Divide1" DstPort 1 } Branch { Points [5, 0; 0, 260] DstBlock "Divide4" DstPort 1 } } Line { SrcBlock "Divide2" SrcPort 1 Points [5, 0; 0, 150; 65, 0] Branch { DstBlock "Switch1" DstPort 1 } Branch { Points [0, -130] DstBlock "Mux" DstPort 1 } } Line { SrcBlock "Sl (current m/s)" SrcPort 1 Points [75, 0] DstBlock "Divide3" DstPort 2 } Line { SrcBlock "Reference lam flame speed" SrcPort 1 Points [0, -20] DstBlock "Divide3" DstPort 1 } Line { SrcBlock "Fuel" SrcPort 1 DstBlock "Switch1" DstPort 2 } Line { SrcBlock "delay deg->rad2" SrcPort 1 Points [10, 0; 0, -95] DstBlock "Divide5" DstPort 3 } Line { SrcBlock "Ref theta B (deg)1" SrcPort 1 DstBlock "delay deg->rad2" DstPort 1 } Line { SrcBlock "U^(1/3)3" SrcPort 1 Points [15, 0; 0, -35] DstBlock "Divide5" DstPort 2 } Line { SrcBlock "Divide6" SrcPort 1 DstBlock "U^(1/3)3" DstPort 1 } Line { SrcBlock "U^(1/3)2" SrcPort 1 Points [30, 0; 0, 25] DstBlock "Divide5" DstPort 1 } Line { SrcBlock "Divide4" SrcPort 1 DstBlock "U^(1/3)2" DstPort 1 } Line { SrcBlock "Reference rad/s1" SrcPort 1 Points [0, -20] DstBlock "Divide4" DstPort 2 } Line { SrcBlock "Divide5" SrcPort 1 Points [95, 0; 0, -90] Branch { DstBlock "Switch1" DstPort 3 } Branch { Points [0, -130] DstBlock "Mux" DstPort 2 } } Line { SrcBlock "Sl (current m/s)1" SrcPort 1 Points [75, 0] DstBlock "Divide6" DstPort 2 } Line { SrcBlock "Reference lam flame speed1" SrcPort 1 Points [0, -20] DstBlock "Divide6" DstPort 1 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Theta B" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 Points [5, 0; 0, -5] DstBlock "Scope1" DstPort 1 } } } Block { BlockType SubSystem Name "CxHy Chem" Ports [3, 1] Position [775, 302, 845, 378] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "CxHy Chem" Location [206, 100, 1274, 795] 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 "R" Position [60, 48, 90, 62] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "%Burn" Position [385, 268, 415, 282] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "U" Position [60, 13, 90, 27] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [450, 227, 480, 258] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add1" Ports [2, 1] Position [595, 227, 625, 258] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Constant" Position [385, 195, 415, 225] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Embedded\nMATLAB (Reaction Balance)" Ports [0, 11] Position [25, 83, 115, 377] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB (Reaction Balance)" Location [257, 457, 812, 717] 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 Demux Name " Demux " Ports [1, 1] Position [270, 495, 320, 535] Outputs "1" } Block { BlockType Ground Name " Ground " Position [20, 306, 40, 324] } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 5" Ports [1, 12] Position [180, 144, 230, 486] FunctionName "sf_sfun" PortCounts "[1 12]" EnableBusSupport on Port { PortNumber 2 Name "Xch" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "Xo2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Xn2r" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "CHm" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "O2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "N2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 8 Name "Xco2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 9 Name "Xh2o" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 10 Name "Xn2p" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 11 Name "CO2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 12 Name "H2Om" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 506, 480, 524] } Block { BlockType Outport Name "Xch" Position [460, 101, 480, 119] IconDisplay "Port number" } Block { BlockType Outport Name "Xo2" Position [460, 136, 480, 154] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Xn2r" Position [460, 171, 480, 189] Port "3" IconDisplay "Port number" } Block { BlockType Outport Name "CHm" Position [460, 206, 480, 224] Port "4" IconDisplay "Port number" } Block { BlockType Outport Name "O2m" Position [460, 246, 480, 264] Port "5" IconDisplay "Port number" } Block { BlockType Outport Name "N2m" Position [460, 281, 480, 299] Port "6" IconDisplay "Port number" } Block { BlockType Outport Name "Xco2" Position [460, 316, 480, 334] Port "7" IconDisplay "Port number" } Block { BlockType Outport Name "Xh2o" Position [460, 351, 480, 369] Port "8" IconDisplay "Port number" } Block { BlockType Outport Name "Xn2p" Position [460, 386, 480, 404] Port "9" IconDisplay "Port number" } Block { BlockType Outport Name "CO2m" Position [460, 426, 480, 444] Port "10" IconDisplay "Port number" } Block { BlockType Outport Name "H2Om" Position [460, 461, 480, 479] Port "11" IconDisplay "Port number" } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } Line { Name "Xch" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Xch" DstPort 1 } Line { Name "Xo2" Labels [0, 0] SrcBlock " SFunction " SrcPort 3 DstBlock "Xo2" DstPort 1 } Line { Name "Xn2r" Labels [0, 0] SrcBlock " SFunction " SrcPort 4 DstBlock "Xn2r" DstPort 1 } Line { Name "CHm" Labels [0, 0] SrcBlock " SFunction " SrcPort 5 DstBlock "CHm" DstPort 1 } Line { Name "O2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 6 DstBlock "O2m" DstPort 1 } Line { Name "N2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 7 DstBlock "N2m" DstPort 1 } Line { Name "Xco2" Labels [0, 0] SrcBlock " SFunction " SrcPort 8 DstBlock "Xco2" DstPort 1 } Line { Name "Xh2o" Labels [0, 0] SrcBlock " SFunction " SrcPort 9 DstBlock "Xh2o" DstPort 1 } Line { Name "Xn2p" Labels [0, 0] SrcBlock " SFunction " SrcPort 10 DstBlock "Xn2p" DstPort 1 } Line { Name "CO2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 11 DstBlock "CO2m" DstPort 1 } Line { Name "H2Om" Labels [0, 0] SrcBlock " SFunction " SrcPort 12 DstBlock "H2Om" DstPort 1 } Line { SrcBlock " Ground " SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } } } Block { BlockType SubSystem Name "Embedded\nMATLAB Post Combustion" Ports [8, 1] Position [285, 264, 355, 446] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB Post Combustion" Location [257, 457, 812, 717] 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 "U" Position [20, 101, 40, 119] IconDisplay "Port number" } Block { BlockType Inport Name "R" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "N2m" Position [20, 171, 40, 189] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Xco2" Position [20, 206, 40, 224] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Xh2o" Position [20, 246, 40, 264] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Xn2p" Position [20, 281, 40, 299] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "CO2m" Position [20, 316, 40, 334] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "H2Om" Position [20, 351, 40, 369] Port "8" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 325, 320, 365] Outputs "1" } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 7" Ports [8, 2] Position [180, 121, 230, 324] FunctionName "sf_sfun" PortCounts "[8 2]" EnableBusSupport on Port { PortNumber 2 Name "Tp" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 336, 480, 354] } Block { BlockType Outport Name "Tp" Position [460, 101, 480, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } Line { SrcBlock "U" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock "R" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { SrcBlock "N2m" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 3 } Line { SrcBlock "Xco2" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "Xh2o" SrcPort 1 DstBlock " SFunction " DstPort 5 } Line { SrcBlock "Xn2p" SrcPort 1 DstBlock " SFunction " DstPort 6 } Line { SrcBlock "CO2m" SrcPort 1 DstBlock " SFunction " DstPort 7 } Line { SrcBlock "H2Om" SrcPort 1 DstBlock " SFunction " DstPort 8 } Line { Name "Tp" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Tp" DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } } } Block { BlockType SubSystem Name "Embedded\nMATLAB Pre Combustion" Ports [8, 1] Position [285, 47, 355, 223] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB Pre Combustion" Location [257, 457, 812, 717] 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 "U" Position [20, 101, 40, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "R" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Xch" Position [20, 171, 40, 189] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Xo2" Position [20, 206, 40, 224] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Xn2r" Position [20, 246, 40, 264] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "CHm" Position [20, 281, 40, 299] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "O2m" Position [20, 316, 40, 334] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "N2m" Position [20, 351, 40, 369] Port "8" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 325, 320, 365] Outputs "1" } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 8" Ports [8, 2] Position [180, 121, 230, 324] FunctionName "sf_sfun" PortCounts "[8 2]" EnableBusSupport on Port { PortNumber 2 Name "Tr" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 336, 480, 354] } Block { BlockType Outport Name "Tr" Position [460, 101, 480, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } Line { SrcBlock "U" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock "R" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { SrcBlock "Xch" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 3 } Line { SrcBlock "Xo2" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "Xn2r" SrcPort 1 DstBlock " SFunction " DstPort 5 } Line { SrcBlock "CHm" SrcPort 1 DstBlock " SFunction " DstPort 6 } Line { SrcBlock "O2m" SrcPort 1 DstBlock " SFunction " DstPort 7 } Line { SrcBlock "N2m" SrcPort 1 DstBlock " SFunction " DstPort 8 } Line { Name "Tr" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Tr" DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } } } Block { BlockType Product Name "Product" Ports [2, 1] Position [520, 127, 550, 158] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [490, 332, 520, 363] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Tout" Position [675, 238, 705, 252] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Constant" SrcPort 1 Points [10, 0; 0, 25] DstBlock "Add" DstPort 1 } Line { SrcBlock "%Burn" SrcPort 1 Points [0, 0] Branch { Points [10, 0; 0, -25] DstBlock "Add" DstPort 2 } Branch { Points [10, 0; 0, 65] DstBlock "Product1" DstPort 1 } } Line { SrcBlock "Add" SrcPort 1 Points [5, 0; 0, -95] DstBlock "Product" DstPort 2 } Line { SrcBlock "Embedded\nMATLAB Pre Combustion" SrcPort 1 DstBlock "Product" DstPort 1 } Line { SrcBlock "Embedded\nMATLAB Post Combustion" SrcPort 1 DstBlock "Product1" DstPort 2 } Line { SrcBlock "Product" SrcPort 1 Points [15, 0; 0, 90] DstBlock "Add1" DstPort 1 } Line { SrcBlock "Product1" SrcPort 1 Points [45, 0; 0, -100] DstBlock "Add1" DstPort 2 } Line { SrcBlock "Add1" SrcPort 1 DstBlock "Tout" DstPort 1 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 1 DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 3 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 2 Points [150, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 4 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 3 Points [0, -10] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 5 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 7 Points [80, 0; 0, 90] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 4 } Line { SrcBlock "R" SrcPort 1 Points [85, 0; 0, 35; 50, 0] Branch { Points [40, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 2 } Branch { Points [0, 215] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 2 } } Line { SrcBlock "U" SrcPort 1 Points [105, 0; 0, 50; 45, 0] Branch { Points [25, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 1 } Branch { Points [0, 215] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 1 } } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 4 Points [25, 0; 0, -15] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 6 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 5 Points [35, 0; 0, -20] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 7 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 6 Points [95, 0] Branch { Points [0, -25] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 8 } Branch { Points [0, 95] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 3 } } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 8 Points [65, 0; 0, 85] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 5 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 9 Points [50, 0; 0, 80] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 6 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 10 Points [35, 0; 0, 75] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 7 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 11 Points [0, 70] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 8 } } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [615, 407, 645, 443] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType SubSystem Name "Energy" Ports [3, 2] Position [1450, 524, 1520, 616] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Energy" Location [209, 88, 1231, 811] 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 "Theta" Position [15, 403, 45, 417] IconDisplay "Port number" } Block { BlockType Inport Name "M" Position [15, 28, 45, 42] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Fuel" Position [105, 563, 135, 577] Port "3" IconDisplay "Port number" } Block { BlockType Constant Name "CONST" Position [85, 490, 115, 520] Value "pi()" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Display Name "Display" Ports [1] Position [700, 30, 790, 60] Decimation "1" Lockdown off } Block { BlockType Display Name "Display1" Ports [1] Position [820, 220, 910, 250] Decimation "1" Lockdown off } Block { BlockType Product Name "Divide" Ports [2, 1] Position [310, 32, 340, 63] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [405, 42, 435, 73] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide2" Ports [2, 1] Position [480, 52, 510, 83] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide3" Ports [2, 1] Position [390, 287, 420, 318] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide4" Ports [2, 1] Position [485, 297, 515, 328] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide5" Ports [2, 1] Position [560, 307, 590, 338] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Energy Relased gas" Position [435, 207, 515, 233] Value "5324540000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Energy Relased h2" Position [515, 462, 595, 488] Value "241820000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Molar Mass" Position [225, 115, 270, 145] Value "30.2619" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Molar Mass1" Position [235, 355, 275, 385] Value "20.9" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Moles \n1/TotalMoles of O2 in Air" Position [305, 150, 335, 180] Value "4.76" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Moles \nTotalMoles of O2 in Air1" Position [370, 405, 400, 435] Value "6.76" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Mux Name "Mux1" Ports [3, 1] Position [820, 326, 830, 374] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Constant Name "O2 per mole gas" Position [390, 145, 420, 175] Value "12.5" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "O2 per mole gas1" Position [485, 400, 515, 430] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "Product" Ports [2, 1] Position [580, 62, 610, 93] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [660, 317, 690, 348] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [170, 477, 200, 508] InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Reference Name "Sample\nand Hold" Ports [1, 1, 0, 1] Position [160, 84, 210, 126] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Rising edge" initCond "0" latchinput "off" } Block { BlockType Reference Name "Sample\nand Hold1" Ports [1, 1, 0, 1] Position [140, 274, 190, 316] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Rising edge" initCond "0" latchinput "off" } Block { BlockType Scope Name "Scope" Ports [1] Position [870, 334, 900, 366] Floating off Location [90, 491, 963, 817] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1050" SaveName "ScopeData7" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [825, 604, 855, 636] Floating off Location [418, 398, 1291, 778] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "27.5215" YMax "30.4185" SaveName "ScopeData22" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [925, 439, 955, 471] Floating off Location [26, 482, 899, 863] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "1020.97" YMax "1128.43" SaveName "ScopeData23" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [805, 555, 835, 585] Threshold ".5" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch1" Position [720, 645, 750, 675] Threshold ".5" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "E" Position [895, 563, 925, 577] IconDisplay "Port number" } Block { BlockType Outport Name "Mmass" Position [930, 668, 960, 682] Port "2" IconDisplay "Port number" } Line { SrcBlock "M" SrcPort 1 Points [5, 0; 0, 70] Branch { DstBlock "Sample\nand Hold" DstPort 1 } Branch { Points [0, 190] DstBlock "Sample\nand Hold1" DstPort 1 } } Line { SrcBlock "Molar Mass" SrcPort 1 Points [0, -75; 10, 0] Branch { DstBlock "Divide" DstPort 2 } Branch { Points [0, 595] DstBlock "Switch1" DstPort 1 } } Line { SrcBlock "Divide" SrcPort 1 DstBlock "Divide1" DstPort 1 } Line { SrcBlock "Moles \n1/TotalMoles of O2 in Air" SrcPort 1 Points [5, 0; 0, -100] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Divide2" DstPort 1 } Line { SrcBlock "O2 per mole gas" SrcPort 1 Points [25, 0; 0, -85] DstBlock "Divide2" DstPort 2 } Line { SrcBlock "Divide2" SrcPort 1 DstBlock "Product" DstPort 1 } Line { SrcBlock "Energy Relased gas" SrcPort 1 Points [20, 0; 0, -135] DstBlock "Product" DstPort 2 } Line { SrcBlock "Molar Mass1" SrcPort 1 Points [25, 0] Branch { Points [40, 0; 0, -60] DstBlock "Divide3" DstPort 2 } Branch { Points [0, 300] DstBlock "Switch1" DstPort 3 } } Line { SrcBlock "Divide3" SrcPort 1 DstBlock "Divide4" DstPort 1 } Line { SrcBlock "Moles \nTotalMoles of O2 in Air1" SrcPort 1 Points [20, 0; 0, -100] DstBlock "Divide4" DstPort 2 } Line { SrcBlock "Divide4" SrcPort 1 DstBlock "Divide5" DstPort 1 } Line { SrcBlock "O2 per mole gas1" SrcPort 1 Points [25, 0] DstBlock "Divide5" DstPort 2 } Line { SrcBlock "Divide5" SrcPort 1 DstBlock "Product1" DstPort 1 } Line { SrcBlock "Energy Relased h2" SrcPort 1 Points [20, 0; 0, -135] DstBlock "Product1" DstPort 2 } Line { SrcBlock "Product1" SrcPort 1 Points [10, 0] Branch { Points [35, 0; 0, 15] Branch { DstBlock "Mux1" DstPort 2 } Branch { Points [0, 230] DstBlock "Switch" DstPort 3 } } Branch { Points [0, -100] DstBlock "Display1" DstPort 1 } } Line { SrcBlock "Product" SrcPort 1 Points [55, 0] Branch { Points [110, 0; 0, 255] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [0, 225] DstBlock "Switch" DstPort 1 } } Branch { Points [0, -35] DstBlock "Display" DstPort 1 } } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Scope" DstPort 1 } Line { SrcBlock "Sample\nand Hold" SrcPort 1 Points [30, 0; 0, -65] DstBlock "Divide" DstPort 1 } Line { SrcBlock "CONST" SrcPort 1 Points [15, 0; 0, -5] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Theta" SrcPort 1 Points [50, 0; 0, 75] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [15, 0; 0, -275] Branch { Points [0, -151] DstBlock "Sample\nand Hold" DstPort trigger } Branch { Points [-55, 0] DstBlock "Sample\nand Hold1" DstPort trigger } } Line { SrcBlock "Sample\nand Hold1" SrcPort 1 DstBlock "Divide3" DstPort 1 } Line { SrcBlock "Fuel" SrcPort 1 Points [475, 0] Branch { DstBlock "Switch" DstPort 2 } Branch { Points [0, 90] DstBlock "Switch1" DstPort 2 } } Line { SrcBlock "Switch" SrcPort 1 Points [15, 0] Branch { DstBlock "E" DstPort 1 } Branch { Points [0, -115] DstBlock "Scope2" DstPort 1 } } Line { SrcBlock "Switch1" SrcPort 1 Points [20, 0] Branch { Points [0, -40] DstBlock "Scope1" DstPort 1 } Branch { Points [0, 15] DstBlock "Mmass" DstPort 1 } } } } Block { BlockType Integrator Name "Exhaust E intergrator" Ports [2, 1] Position [1165, 836, 1205, 894] ExternalReset "falling" LowerSaturationLimit "0" } Block { BlockType SubSystem Name "Exhaust Mdot Calculator" Ports [7, 1] Position [875, 551, 1015, 639] NamePlacement "alternate" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Exhaust Mdot Calculator" Location [202, 131, 1377, 693] 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 "Crank Angle" Position [45, 233, 75, 247] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cylinder Pressure1" Position [510, 228, 540, 242] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "ex pressure" Position [505, 288, 535, 302] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cyl temp" Position [510, 348, 540, 362] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "M mass" Position [275, 443, 305, 457] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve Lift" Position [215, 163, 245, 177] Port "6" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve Dia" Position [190, 103, 220, 117] Port "7" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "A" Ports [2, 1] Position [385, 397, 415, 428] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Choke" Position [705, 100, 765, 130] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(7)))*(2/(u(7)+1))^((u(7)+1)/(2*(u(7)-1)))" } Block { BlockType Constant Name "Constant1" Position [505, 100, 535, 130] Value ".6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant7" Position [505, 460, 535, 490] Value "1.35" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Fcn Name "Fcn" Position [705, 340, 765, 370] Expr "(2/(u(7)+1))^(u(7)/(u(7)-1))" } Block { BlockType Fcn Name "Fcn1" Position [475, 160, 535, 190] Expr "u(1)*pi" } Block { BlockType Fcn Name "Fcn2" Position [180, 294, 285, 326] Expr "-sin(u(1))" } Block { BlockType SubSystem Name "Lift ex" Ports [1, 1] Position [155, 219, 260, 261] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lift ex" Location [375, 376, 1095, 734] 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 "Crank Angle" Position [75, 188, 105, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "On" Position [200, 140, 230, 170] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Switch1" Position [410, 180, 440, 210] Threshold "4*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [295, 180, 325, 210] Threshold "3*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "off" Position [190, 225, 220, 255] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Lift" Position [495, 188, 525, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Switch2" SrcPort 1 Points [25, 0; 0, 10] DstBlock "Switch1" DstPort 3 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Lift" DstPort 1 } Line { SrcBlock "On" SrcPort 1 Points [25, 0; 0, 30] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "off" SrcPort 1 Points [10, 0] Branch { Points [0, 10; 120, 0; 0, -65] DstBlock "Switch1" DstPort 1 } Branch { Points [0, -35] DstBlock "Switch2" DstPort 3 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [140, 0] Branch { Points [0, 40; 145, 0] DstBlock "Switch1" DstPort 2 } Branch { DstBlock "Switch2" DstPort 2 } } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [630, 86, 635, 504] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [345, 316, 350, 354] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "No Choke" Position [705, 460, 765, 490] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(4)/u(3)))*sqrt((2*u(7)/(u(7)-1))*(1-(u(4)/u(3))^((u(7)-1)/u(" "7))))" } Block { BlockType Product Name "Product" Ports [3, 1] Position [410, 159, 440, 191] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [350, 261, 380, 294] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pt/Po" Position [705, 215, 765, 245] Expr "u(4)/u(3)" } Block { BlockType Constant Name "R" Position [275, 385, 305, 415] Value "8314" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [830, 277, 860, 308] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope" Ports [1] Position [1000, 199, 1030, 231] Floating off Location [6, 46, 1430, 869] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.0075" YMax "0.0475" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [385, 309, 415, 341] Floating off Location [147, 479, 782, 821] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData20" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [905, 280, 935, 310] Criteria "u2 > Threshold" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Exhaust Mdot" Position [1025, 288, 1055, 302] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Cylinder Pressure1" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "ex pressure" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Cyl temp" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "Constant7" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0] Branch { Points [0, 60] Branch { DstBlock "Fcn" DstPort 1 } Branch { Points [0, 120] DstBlock "No Choke" DstPort 1 } } Branch { Points [0, -65] Branch { DstBlock "Pt/Po" DstPort 1 } Branch { Points [0, -115] DstBlock "Choke" DstPort 1 } } } Line { SrcBlock "Pt/Po" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 1 } Line { SrcBlock "No Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Valve Lift" SrcPort 1 Points [145, 0] DstBlock "Product" DstPort 2 } Line { SrcBlock "Valve Dia" SrcPort 1 Points [115, 0; 0, 55] DstBlock "Product" DstPort 1 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { DstBlock "Exhaust Mdot" DstPort 1 } Branch { Points [0, -80] DstBlock "Scope" DstPort 1 } } Line { Labels [0, 0] SrcBlock "Fcn1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, 5] DstBlock "A" DstPort 1 } Line { SrcBlock "M mass" SrcPort 1 Points [50, 0; 0, -30] DstBlock "A" DstPort 2 } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "Crank Angle" SrcPort 1 Points [40, 0] Branch { DstBlock "Lift ex" DstPort 1 } Branch { Points [0, 70] DstBlock "Fcn2" DstPort 1 } } Line { SrcBlock "Fcn2" SrcPort 1 Points [20, 0; 0, 15; 15, 0] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [0, -40] DstBlock "Product1" DstPort 2 } } Line { SrcBlock "Mux1" SrcPort 1 Points [5, 0; 0, -10] DstBlock "Scope2" DstPort 1 } Line { SrcBlock "Lift ex" SrcPort 1 Points [35, 0; 0, 30] Branch { Points [0, 75] DstBlock "Mux1" DstPort 2 } Branch { DstBlock "Product1" DstPort 1 } } Line { SrcBlock "Product1" SrcPort 1 Points [5, 0; 0, -95] DstBlock "Product" DstPort 3 } Annotation { Name "Cd" Position [493, 114] } Annotation { Name "Ar" Position [595, 168] } Annotation { Name "R" Position [495, 410] } Annotation { Name "gamma" Position [472, 476] } Annotation { Name "If Choke, output 1" Position [846, 259] } } } Block { BlockType SubSystem Name "Exhaust Mdot Calculator1" Ports [7, 1] Position [960, 441, 1100, 529] NamePlacement "alternate" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Exhaust Mdot Calculator1" Location [202, 131, 1377, 693] 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 "Crank Angle" Position [45, 233, 75, 247] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cylinder Pressure1" Position [510, 228, 540, 242] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "ex pressure" Position [505, 288, 535, 302] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cyl temp" Position [510, 348, 540, 362] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "M mass" Position [275, 443, 305, 457] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve Lift" Position [215, 163, 245, 177] Port "6" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve Dia" Position [190, 103, 220, 117] Port "7" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "A" Ports [2, 1] Position [385, 397, 415, 428] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Choke" Position [705, 100, 765, 130] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(7)))*(2/(u(7)+1))^((u(7)+1)/(2*(u(7)-1)))" } Block { BlockType Constant Name "Constant1" Position [505, 100, 535, 130] Value ".6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant7" Position [505, 460, 535, 490] Value "1.35" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Fcn Name "Fcn" Position [705, 340, 765, 370] Expr "(2/(u(7)+1))^(u(7)/(u(7)-1))" } Block { BlockType Fcn Name "Fcn1" Position [475, 160, 535, 190] Expr "u(1)*pi" } Block { BlockType Fcn Name "Fcn2" Position [180, 294, 285, 326] Expr "-sin(u(1))" } Block { BlockType SubSystem Name "Lift ex" Ports [1, 1] Position [155, 219, 260, 261] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lift ex" Location [375, 376, 1095, 734] 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 "Crank Angle" Position [75, 188, 105, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "On" Position [200, 140, 230, 170] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Switch1" Position [410, 180, 440, 210] Threshold "4*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [295, 180, 325, 210] Threshold "3*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "off" Position [190, 225, 220, 255] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Lift" Position [495, 188, 525, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Crank Angle" SrcPort 1 Points [140, 0] Branch { DstBlock "Switch2" DstPort 2 } Branch { Points [0, 40; 145, 0] DstBlock "Switch1" DstPort 2 } } Line { SrcBlock "off" SrcPort 1 Points [10, 0] Branch { Points [0, -35] DstBlock "Switch2" DstPort 3 } Branch { Points [0, 10; 120, 0; 0, -65] DstBlock "Switch1" DstPort 1 } } Line { SrcBlock "On" SrcPort 1 Points [25, 0; 0, 30] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Lift" DstPort 1 } Line { SrcBlock "Switch2" SrcPort 1 Points [25, 0; 0, 10] DstBlock "Switch1" DstPort 3 } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [630, 86, 635, 504] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [345, 316, 350, 354] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "No Choke" Position [705, 460, 765, 490] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(4)/u(3)))*sqrt((2*u(7)/(u(7)-1))*(1-(u(4)/u(3))^((u(7)-1)/u(" "7))))" } Block { BlockType Product Name "Product" Ports [3, 1] Position [410, 159, 440, 191] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [350, 261, 380, 294] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pt/Po" Position [705, 215, 765, 245] Expr "u(4)/u(3)" } Block { BlockType Constant Name "R" Position [275, 385, 305, 415] Value "8314" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [830, 277, 860, 308] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope" Ports [1] Position [1000, 199, 1030, 231] Floating off Location [6, 46, 1430, 869] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.0075" YMax "0.0475" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [385, 309, 415, 341] Floating off Location [147, 479, 782, 821] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData20" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [905, 280, 935, 310] Criteria "u2 > Threshold" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Exhaust Mdot" Position [1025, 288, 1055, 302] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Product1" SrcPort 1 Points [5, 0; 0, -95] DstBlock "Product" DstPort 3 } Line { SrcBlock "Lift ex" SrcPort 1 Points [35, 0; 0, 30] Branch { DstBlock "Product1" DstPort 1 } Branch { Points [0, 75] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Mux1" SrcPort 1 Points [5, 0; 0, -10] DstBlock "Scope2" DstPort 1 } Line { SrcBlock "Fcn2" SrcPort 1 Points [20, 0; 0, 15; 15, 0] Branch { Points [0, -40] DstBlock "Product1" DstPort 2 } Branch { DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [40, 0] Branch { Points [0, 70] DstBlock "Fcn2" DstPort 1 } Branch { DstBlock "Lift ex" DstPort 1 } } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "M mass" SrcPort 1 Points [50, 0; 0, -30] DstBlock "A" DstPort 2 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, 5] DstBlock "A" DstPort 1 } Line { Labels [0, 0] SrcBlock "Fcn1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { Points [0, -80] DstBlock "Scope" DstPort 1 } Branch { DstBlock "Exhaust Mdot" DstPort 1 } } Line { SrcBlock "Product" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Valve Dia" SrcPort 1 Points [115, 0; 0, 55] DstBlock "Product" DstPort 1 } Line { SrcBlock "Valve Lift" SrcPort 1 Points [145, 0] DstBlock "Product" DstPort 2 } Line { SrcBlock "No Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Fcn" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Pt/Po" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0] Branch { Points [0, -65] Branch { Points [0, -115] DstBlock "Choke" DstPort 1 } Branch { DstBlock "Pt/Po" DstPort 1 } } Branch { Points [0, 60] Branch { Points [0, 120] DstBlock "No Choke" DstPort 1 } Branch { DstBlock "Fcn" DstPort 1 } } } Line { SrcBlock "Constant7" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Cyl temp" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "ex pressure" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Cylinder Pressure1" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Mux" DstPort 1 } Annotation { Name "If Choke, output 1" Position [846, 259] } Annotation { Name "gamma" Position [472, 476] } Annotation { Name "R" Position [495, 410] } Annotation { Name "Ar" Position [595, 168] } Annotation { Name "Cd" Position [493, 114] } } } Block { BlockType Sum Name "Flow\nEnergy" Ports [2, 1] Position [1340, 817, 1370, 848] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType SubSystem Name "H Chem1" Ports [3, 1] Position [775, 392, 840, 478] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "H Chem1" Location [84, 164, 1295, 789] 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 "R" Position [95, 103, 125, 117] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "%Burn" Position [420, 323, 450, 337] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "U" Position [95, 68, 125, 82] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [485, 282, 515, 313] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add1" Ports [2, 1] Position [630, 282, 660, 313] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Constant" Position [420, 250, 450, 280] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Embedded\nMATLAB (Reaction Balance)" Ports [0, 9] Position [80, 138, 170, 432] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB (Reaction Balance)" Location [257, 457, 812, 717] 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 Demux Name " Demux " Ports [1, 1] Position [270, 490, 320, 530] Outputs "1" } Block { BlockType Ground Name " Ground " Position [20, 306, 40, 324] } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 1" Ports [1, 10] Position [180, 146, 230, 489] FunctionName "sf_sfun" PortCounts "[1 10]" EnableBusSupport on Port { PortNumber 2 Name "Xh2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "Xo2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Xn2r" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "H2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "O2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "N2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 8 Name "Xh2o" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 9 Name "Xn2p" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 10 Name "H2Om" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 501, 480, 519] } Block { BlockType Outport Name "Xh2" Position [460, 101, 480, 119] IconDisplay "Port number" } Block { BlockType Outport Name "Xo2" Position [460, 136, 480, 154] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Xn2r" Position [460, 171, 480, 189] Port "3" IconDisplay "Port number" } Block { BlockType Outport Name "H2m" Position [460, 206, 480, 224] Port "4" IconDisplay "Port number" } Block { BlockType Outport Name "O2m" Position [460, 246, 480, 264] Port "5" IconDisplay "Port number" } Block { BlockType Outport Name "N2m" Position [460, 281, 480, 299] Port "6" IconDisplay "Port number" } Block { BlockType Outport Name "Xh2o" Position [460, 316, 480, 334] Port "7" IconDisplay "Port number" } Block { BlockType Outport Name "Xn2p" Position [460, 351, 480, 369] Port "8" IconDisplay "Port number" } Block { BlockType Outport Name "H2Om" Position [460, 386, 480, 404] Port "9" IconDisplay "Port number" } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } Line { Name "Xh2" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Xh2" DstPort 1 } Line { Name "Xo2" Labels [0, 0] SrcBlock " SFunction " SrcPort 3 DstBlock "Xo2" DstPort 1 } Line { Name "Xn2r" Labels [0, 0] SrcBlock " SFunction " SrcPort 4 DstBlock "Xn2r" DstPort 1 } Line { Name "H2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 5 DstBlock "H2m" DstPort 1 } Line { Name "O2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 6 DstBlock "O2m" DstPort 1 } Line { Name "N2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 7 DstBlock "N2m" DstPort 1 } Line { Name "Xh2o" Labels [0, 0] SrcBlock " SFunction " SrcPort 8 DstBlock "Xh2o" DstPort 1 } Line { Name "Xn2p" Labels [0, 0] SrcBlock " SFunction " SrcPort 9 DstBlock "Xn2p" DstPort 1 } Line { Name "H2Om" Labels [0, 0] SrcBlock " SFunction " SrcPort 10 DstBlock "H2Om" DstPort 1 } Line { SrcBlock " Ground " SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } } } Block { BlockType SubSystem Name "Embedded\nMATLAB Post Combustion" Ports [6, 1] Position [320, 316, 390, 494] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB Post Combustion" Location [257, 457, 812, 717] 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 "U" Position [20, 101, 40, 119] IconDisplay "Port number" } Block { BlockType Inport Name "R" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "N2m" Position [20, 171, 40, 189] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Xh2o" Position [20, 206, 40, 224] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Xn2p" Position [20, 246, 40, 264] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "H2Om" Position [20, 281, 40, 299] Port "6" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 330, 320, 370] Outputs "1" } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 2" Ports [6, 2] Position [180, 125, 230, 330] FunctionName "sf_sfun" PortCounts "[6 2]" EnableBusSupport on Port { PortNumber 2 Name "Tp" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 341, 480, 359] } Block { BlockType Outport Name "Tp" Position [460, 101, 480, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } Line { SrcBlock "U" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock "R" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { SrcBlock "N2m" SrcPort 1 DstBlock " SFunction " DstPort 3 } Line { SrcBlock "Xh2o" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "Xn2p" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 5 } Line { SrcBlock "H2Om" SrcPort 1 DstBlock " SFunction " DstPort 6 } Line { Name "Tp" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Tp" DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } } } Block { BlockType SubSystem Name "Embedded\nMATLAB Pre Combustion" Ports [8, 1] Position [320, 101, 390, 279] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB Pre Combustion" Location [257, 457, 812, 717] 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 "U" Position [20, 101, 40, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "R" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Xh2" Position [20, 171, 40, 189] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Xo2" Position [20, 206, 40, 224] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Xn2r" Position [20, 246, 40, 264] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "H2m" Position [20, 281, 40, 299] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "O2m" Position [20, 316, 40, 334] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "N2m" Position [20, 351, 40, 369] Port "8" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 325, 320, 365] Outputs "1" } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 3" Ports [8, 2] Position [180, 121, 230, 324] FunctionName "sf_sfun" PortCounts "[8 2]" EnableBusSupport on Port { PortNumber 2 Name "Tr" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 336, 480, 354] } Block { BlockType Outport Name "Tr" Position [460, 101, 480, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } Line { SrcBlock "U" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock "R" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { SrcBlock "Xh2" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 3 } Line { SrcBlock "Xo2" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "Xn2r" SrcPort 1 DstBlock " SFunction " DstPort 5 } Line { SrcBlock "H2m" SrcPort 1 DstBlock " SFunction " DstPort 6 } Line { SrcBlock "O2m" SrcPort 1 DstBlock " SFunction " DstPort 7 } Line { SrcBlock "N2m" SrcPort 1 DstBlock " SFunction " DstPort 8 } Line { Name "Tr" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Tr" DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [785, 276, 790, 314] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Product Name "Product" Ports [2, 1] Position [555, 187, 585, 218] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [525, 377, 555, 408] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Scope Name "Scope3" Ports [1] Position [490, 454, 520, 486] Floating off Location [501, 381, 1435, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "3250" SaveName "ScopeData8" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope5" Ports [1] Position [830, 279, 860, 311] Floating off Location [89, 153, 1023, 666] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "3250" SaveName "ScopeData11" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Outport Name "Tout" Position [700, 293, 730, 307] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Product1" SrcPort 1 Points [30, 0] Branch { Points [25, 0] DstBlock "Add1" DstPort 2 } Branch { Labels [3, 0] Points [0, 30; 165, 0; 0, -120] DstBlock "Mux" DstPort 2 } } Line { SrcBlock "Product" SrcPort 1 Points [15, 0] Branch { Points [10, 0] DstBlock "Add1" DstPort 1 } Branch { Points [0, -50; 165, 0] DstBlock "Mux" DstPort 1 } } Line { SrcBlock "Embedded\nMATLAB Post Combustion" SrcPort 1 Points [115, 0] DstBlock "Product1" DstPort 2 } Line { SrcBlock "Embedded\nMATLAB Pre Combustion" SrcPort 1 Points [0, 5] DstBlock "Product" DstPort 1 } Line { SrcBlock "Add" SrcPort 1 Points [5, 0; 0, -90] DstBlock "Product" DstPort 2 } Line { SrcBlock "%Burn" SrcPort 1 Points [0, 0] Branch { Points [10, 0; 0, -25] DstBlock "Add" DstPort 2 } Branch { Points [10, 0; 0, 55; 10, 0] Branch { DstBlock "Product1" DstPort 1 } Branch { DstBlock "Scope3" DstPort 1 } } } Line { SrcBlock "Constant" SrcPort 1 Points [10, 0; 0, 25] DstBlock "Add" DstPort 1 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 1 Points [130, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 3 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 2 Points [0, -15] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 4 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 3 Points [20, 0; 0, -25] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 5 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 4 Points [25, 0; 0, -35] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 6 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 5 Points [35, 0; 0, -40; 95, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 7 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 6 Points [40, 0; 0, -50; 45, 0] Branch { Points [45, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 8 } Branch { Points [0, 125] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 3 } } Line { SrcBlock "R" SrcPort 1 Points [80, 0; 0, 35; 60, 0] Branch { Points [35, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 2 } Branch { Points [0, 215] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 2 } } Line { SrcBlock "U" SrcPort 1 Points [105, 0; 0, 50; 50, 0] Branch { Points [20, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 1 } Branch { Points [0, 205] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 1 } } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 7 Points [65, 0; 0, 75] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 4 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 8 Points [35, 0; 0, 75] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 5 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 9 Points [20, 0; 0, 75] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 6 } Line { SrcBlock "Add1" SrcPort 1 DstBlock "Tout" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Scope5" DstPort 1 } } } Block { BlockType SubSystem Name "Heat Transfer" Ports [7, 1] Position [310, 744, 415, 856] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Heat Transfer" Location [150, 249, 1104, 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.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "omega" Position [60, 13, 90, 27] IconDisplay "Port number" } Block { BlockType Inport Name "half crank" Position [45, 48, 75, 62] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "bore" Position [70, 73, 100, 87] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "T cyl" Position [65, 223, 95, 237] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Twall" Position [60, 268, 90, 282] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Volume" Position [65, 403, 95, 417] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "Piston Area" Position [60, 448, 90, 462] Port "7" IconDisplay "Port number" } Block { BlockType Constant Name "A const" Position [260, 95, 325, 125] Value "0.2" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [640, 217, 670, 248] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Display Name "Display" Ports [1] Position [750, 335, 840, 365] Decimation "1" Lockdown off } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [455, 162, 485, 193] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide2" Ports [2, 1] Position [175, 402, 205, 433] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Fcn" Position [280, 45, 340, 75] Expr "u(1)^0.8" } Block { BlockType Fcn Name "Fcn1" Position [280, 275, 340, 305] Expr "u(1)^4" } Block { BlockType Fcn Name "Fcn2" Position [280, 325, 340, 355] Expr "u(1)^4" } Block { BlockType Integrator Name "Integrator1" Ports [2, 1] Position [780, 231, 820, 289] ExternalReset "falling" } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [630, 126, 635, 164] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType SubSystem Name "Reynolds" Ports [3, 1] Position [155, 27, 255, 93] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Reynolds" Location [462, 619, 777, 794] 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 "omega" Position [20, 18, 50, 32] IconDisplay "Port number" } Block { BlockType Inport Name "half crank" Position [35, 48, 65, 62] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "bore" Position [75, 93, 105, 107] Port "3" IconDisplay "Port number" } Block { BlockType Product Name "Divide1" Ports [3, 1] Position [205, 64, 235, 96] Inputs "**/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "approx mean dynam viscosity" Position [90, 120, 155, 150] Value ".000254" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "mean piston speed" Ports [2, 1] Position [90, 27, 140, 63] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Reynolds" Position [260, 73, 290, 87] IconDisplay "Port number" } Line { SrcBlock "mean piston speed" SrcPort 1 Points [20, 0; 0, 25] DstBlock "Divide1" DstPort 1 } Line { SrcBlock "approx mean dynam viscosity" SrcPort 1 Points [15, 0; 0, -45] DstBlock "Divide1" DstPort 3 } Line { SrcBlock "omega" SrcPort 1 Points [0, 10] DstBlock "mean piston speed" DstPort 1 } Line { SrcBlock "half crank" SrcPort 1 DstBlock "mean piston speed" DstPort 2 } Line { SrcBlock "bore" SrcPort 1 Points [0, -20] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Reynolds" DstPort 1 } } } Block { BlockType Scope Name "Scope1" Ports [1] Position [670, 124, 700, 156] Floating off Location [5, 47, 1445, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-50000" YMax "1e+006" SaveName "ScopeData6" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Sum Name "Subtract" Ports [2, 1] Position [455, 222, 485, 253] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Subtract1" Ports [2, 1] Position [410, 297, 440, 328] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "k" Position [260, 140, 325, 170] Value ".1" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "k1" Position [385, 360, 450, 390] Value "4.29*10^(-9)" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "k2" Position [235, 443, 275, 467] Value "pi()" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "x1" Ports [3, 1] Position [395, 56, 425, 84] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x2" Ports [2, 1] Position [540, 208, 570, 237] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x3" Ports [2, 1] Position [505, 308, 535, 337] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x4" Ports [3, 1] Position [300, 415, 330, 445] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x5" Ports [2, 1] Position [715, 228, 745, 257] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Q" Position [880, 253, 910, 267] IconDisplay "Port number" } Line { SrcBlock "bore" SrcPort 1 Points [15, 0] Branch { DstBlock "Reynolds" DstPort 3 } Branch { Points [0, 105; 105, 0] Branch { DstBlock "Divide1" DstPort 2 } Branch { Points [0, 235] DstBlock "x4" DstPort 1 } } } Line { SrcBlock "Reynolds" SrcPort 1 DstBlock "Fcn" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 DstBlock "x1" DstPort 1 } Line { SrcBlock "A const" SrcPort 1 Points [30, 0; 0, -40] DstBlock "x1" DstPort 2 } Line { SrcBlock "k" SrcPort 1 Points [40, 0; 0, -75] DstBlock "x1" DstPort 3 } Line { SrcBlock "x1" SrcPort 1 Points [5, 0; 0, 100] DstBlock "Divide1" DstPort 1 } Line { SrcBlock "omega" SrcPort 1 Points [0, 20] DstBlock "Reynolds" DstPort 1 } Line { SrcBlock "half crank" SrcPort 1 Points [0, 5] DstBlock "Reynolds" DstPort 2 } Line { SrcBlock "T cyl" SrcPort 1 Points [65, 0] Branch { DstBlock "Subtract" DstPort 1 } Branch { Points [0, 60] DstBlock "Fcn1" DstPort 1 } } Line { SrcBlock "Twall" SrcPort 1 Points [45, 0] Branch { Points [0, -30] DstBlock "Subtract" DstPort 2 } Branch { Points [0, 65] DstBlock "Fcn2" DstPort 1 } } Line { SrcBlock "Fcn1" SrcPort 1 Points [25, 0; 0, 15] DstBlock "Subtract1" DstPort 1 } Line { SrcBlock "Fcn2" SrcPort 1 Points [25, 0; 0, -20] DstBlock "Subtract1" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 Points [15, 0; 0, 35] DstBlock "x2" DstPort 1 } Line { SrcBlock "Subtract" SrcPort 1 Points [15, 0; 0, -10] DstBlock "x2" DstPort 2 } Line { SrcBlock "Subtract1" SrcPort 1 DstBlock "x3" DstPort 1 } Line { SrcBlock "k1" SrcPort 1 Points [35, 0] DstBlock "x3" DstPort 2 } Line { SrcBlock "x2" SrcPort 1 Points [20, 0] Branch { DstBlock "Add" DstPort 1 } Branch { Points [0, -90] DstBlock "Mux" DstPort 1 } } Line { SrcBlock "x3" SrcPort 1 Points [45, 0; 0, -85; 30, 0] Branch { DstBlock "Add" DstPort 2 } Branch { DstBlock "Mux" DstPort 2 } } Line { SrcBlock "Volume" SrcPort 1 DstBlock "Divide2" DstPort 1 } Line { SrcBlock "Piston Area" SrcPort 1 Points [35, 0; 0, -30] DstBlock "Divide2" DstPort 2 } Line { SrcBlock "Divide2" SrcPort 1 Points [5, 0; 0, 10] DstBlock "x4" DstPort 2 } Line { SrcBlock "k2" SrcPort 1 Points [0, -15] DstBlock "x4" DstPort 3 } Line { SrcBlock "Add" SrcPort 1 DstBlock "x5" DstPort 1 } Line { SrcBlock "x4" SrcPort 1 Points [365, 0; 0, -80] Branch { DstBlock "x5" DstPort 2 } Branch { DstBlock "Display" DstPort 1 } } Line { SrcBlock "Mux" SrcPort 1 Points [5, 0; 0, -5] DstBlock "Scope1" DstPort 1 } Line { SrcBlock "x5" SrcPort 1 DstBlock "Integrator1" DstPort 1 } Line { SrcBlock "Integrator1" SrcPort 1 DstBlock "Q" DstPort 1 } } } Block { BlockType SubSystem Name "Initial Air Mass Calculator" Ports [5, 1] Position [660, 109, 800, 191] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Initial Air Mass Calculator" Location [85, 537, 857, 800] 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 "Temperature" Position [115, 28, 145, 42] IconDisplay "Port number" } Block { BlockType Inport Name "Pressure (Pa)" Position [155, 83, 185, 97] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Volume (m^3)" Position [155, 185, 185, 200] Orientation "up" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R" Position [75, 93, 105, 107] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "MW" Position [410, 128, 440, 142] Port "5" IconDisplay "Port number" } Block { BlockType Product Name "Divide" Ports [2, 1] Position [390, 37, 420, 68] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [645, 67, 675, 98] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P x V" Ports [2, 1] Position [235, 90, 285, 125] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P x V1" Ports [2, 1] Position [250, 25, 300, 60] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P x V2" Ports [2, 1] Position [525, 80, 575, 115] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "R1" Position [545, 161, 600, 199] Value "1000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Mass (kg)" Position [700, 78, 730, 92] IconDisplay "Port number" } Line { SrcBlock "R" SrcPort 1 Points [10, 0; 0, -35; 115, 0] DstBlock "P x V1" DstPort 2 } Line { SrcBlock "P x V" SrcPort 1 Points [80, 0; 0, -65] DstBlock "Divide" DstPort 1 } Line { SrcBlock "P x V1" SrcPort 1 Points [35, 0; 0, 15] DstBlock "Divide" DstPort 2 } Line { SrcBlock "MW" SrcPort 1 Points [30, 0; 0, -30] DstBlock "P x V2" DstPort 2 } Line { SrcBlock "R1" SrcPort 1 Points [10, 0; 0, -90] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "P x V2" SrcPort 1 Points [25, 0; 0, -25] DstBlock "Divide1" DstPort 1 } Line { SrcBlock "Divide" SrcPort 1 Points [40, 0; 0, 35] DstBlock "P x V2" DstPort 1 } Line { SrcBlock "Pressure (Pa)" SrcPort 1 Points [0, 10] DstBlock "P x V" DstPort 1 } Line { SrcBlock "Volume (m^3)" SrcPort 1 Points [0, -65] DstBlock "P x V" DstPort 2 } Line { SrcBlock "Temperature" SrcPort 1 DstBlock "P x V1" DstPort 1 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Mass (kg)" DstPort 1 } } } Block { BlockType Constant Name "Initial Energy\nof H2 and Air (J/kg)1" Position [380, 534, 455, 566] Value "1.0485e6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Energy\nof gas and air (J/kg)2" Position [370, 459, 445, 491] Value "218940" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Energy\nof gas and air (J/kg)3" Position [70, 519, 145, 551] Value "218940" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Energy\nof gas and air (J/kg)4" Position [85, 424, 160, 456] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Integrator Name "Intake E intergrator" Ports [2, 1] Position [1250, 771, 1290, 829] ExternalReset "falling" LowerSaturationLimit "0" } Block { BlockType SubSystem Name "Intake Mdot Calculator" Ports [7, 1] Position [875, 650, 1020, 730] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Intake Mdot Calculator" Location [194, 314, 1245, 841] 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 "Crank Angle" Position [55, 193, 85, 207] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Intake Pressure" Position [420, 203, 450, 217] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cyl Pressure" Position [435, 263, 465, 277] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Intake Temp" Position [480, 323, 510, 337] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "M mass" Position [265, 418, 295, 432] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve lift" Position [105, 63, 135, 77] Port "6" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve dia" Position [110, 33, 140, 47] Port "7" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "A" Ports [2, 1] Position [325, 372, 355, 403] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Choke" Position [645, 75, 705, 105] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(7)))*(2/(u(7)+1))^((u(7)+1)/(2*(u(7)-1)))" } Block { BlockType Constant Name "Constant1" Position [445, 75, 475, 105] Value ".6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant7" Position [445, 435, 475, 465] Value "1.35" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Fcn Name "Fcn" Position [645, 315, 705, 345] Expr "(2/(u(7)+1))^(u(7)/(u(7)-1))" } Block { BlockType Fcn Name "Fcn1" Position [415, 135, 475, 165] Expr "u(1)*pi" } Block { BlockType Fcn Name "Fcn2" Position [155, 245, 215, 275] Expr "sin(u(1))" } Block { BlockType SubSystem Name "Lift intake" Ports [1, 1] Position [145, 181, 235, 219] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lift intake" Location [375, 376, 1095, 734] 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 "Crank Angle" Position [75, 188, 105, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "On" Position [200, 140, 230, 170] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Switch1" Position [410, 180, 440, 210] Threshold "pi()" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [295, 180, 325, 210] InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "off" Position [190, 225, 220, 255] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Lift" Position [495, 188, 525, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Crank Angle" SrcPort 1 Points [140, 0] Branch { DstBlock "Switch2" DstPort 2 } Branch { Points [0, 40; 145, 0] DstBlock "Switch1" DstPort 2 } } Line { SrcBlock "off" SrcPort 1 Points [10, 0] Branch { Points [0, -35] DstBlock "Switch2" DstPort 3 } Branch { Points [0, 10; 120, 0; 0, -65] DstBlock "Switch1" DstPort 1 } } Line { SrcBlock "On" SrcPort 1 Points [25, 0; 0, 30] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Lift" DstPort 1 } Line { SrcBlock "Switch2" SrcPort 1 Points [25, 0; 0, 10] DstBlock "Switch1" DstPort 3 } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [570, 61, 575, 479] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [275, 266, 280, 304] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "No Choke" Position [645, 435, 705, 465] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(4)/u(3)))*sqrt((2*u(7)/(u(7)-1))*(1-(u(4)/u(3))^((u(7)-1)/u(" "7))))" } Block { BlockType Product Name "Product" Ports [3, 1] Position [350, 134, 380, 166] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [280, 211, 310, 244] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pt/Po" Position [645, 190, 705, 220] Expr "u(4)/u(3)" } Block { BlockType Constant Name "R" Position [215, 360, 245, 390] Value "8314" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [770, 252, 800, 283] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope" Ports [1] Position [940, 174, 970, 206] Floating off Location [6, 46, 1430, 869] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [315, 259, 345, 291] Floating off Location [147, 479, 782, 821] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData19" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [845, 255, 875, 285] Criteria "u2 > Threshold" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Intake Mdot" Position [965, 263, 995, 277] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Intake Pressure" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "Cyl Pressure" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Intake Temp" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "Constant7" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0] Branch { Points [0, 60] Branch { DstBlock "Fcn" DstPort 1 } Branch { Points [0, 120] DstBlock "No Choke" DstPort 1 } } Branch { Points [0, -65] Branch { DstBlock "Pt/Po" DstPort 1 } Branch { Points [0, -115] DstBlock "Choke" DstPort 1 } } } Line { SrcBlock "Pt/Po" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 1 } Line { SrcBlock "No Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { DstBlock "Intake Mdot" DstPort 1 } Branch { Points [0, -80] DstBlock "Scope" DstPort 1 } } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, 5] DstBlock "A" DstPort 1 } Line { SrcBlock "M mass" SrcPort 1 Points [0, -30] DstBlock "A" DstPort 2 } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "Lift intake" SrcPort 1 Points [10, 0] Branch { Points [0, 95] DstBlock "Mux1" DstPort 2 } Branch { Points [10, 0; 0, 20] DstBlock "Product1" DstPort 1 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [25, 0] Branch { DstBlock "Lift intake" DstPort 1 } Branch { Points [0, 60] DstBlock "Fcn2" DstPort 1 } } Line { SrcBlock "Fcn2" SrcPort 1 Points [20, 0; 0, 15; 15, 0] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [0, -40] DstBlock "Product1" DstPort 2 } } Line { SrcBlock "Mux1" SrcPort 1 Points [5, 0; 0, -10] DstBlock "Scope1" DstPort 1 } Line { SrcBlock "Product1" SrcPort 1 Points [10, 0; 0, -70] DstBlock "Product" DstPort 3 } Line { SrcBlock "Valve lift" SrcPort 1 Points [95, 0; 0, 80] DstBlock "Product" DstPort 2 } Line { SrcBlock "Valve dia" SrcPort 1 Points [190, 0] DstBlock "Product" DstPort 1 } Annotation { Name "Cd" Position [433, 89] } Annotation { Name "Ar" Position [535, 143] } Annotation { Name "gamma" Position [412, 451] } Annotation { Name "If Choke, output 1" Position [786, 234] } } } Block { BlockType SubSystem Name "Intake Mdot Calculator1" Ports [7, 1] Position [890, 745, 1035, 825] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Intake Mdot Calculator1" Location [194, 314, 1245, 841] 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 "Crank Angle" Position [55, 193, 85, 207] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Intake Pressure" Position [420, 203, 450, 217] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cyl Pressure" Position [435, 263, 465, 277] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Intake Temp" Position [480, 323, 510, 337] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "M mass" Position [265, 418, 295, 432] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve lift" Position [105, 63, 135, 77] Port "6" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve dia" Position [110, 33, 140, 47] Port "7" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "A" Ports [2, 1] Position [325, 372, 355, 403] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Choke" Position [645, 75, 705, 105] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(7)))*(2/(u(7)+1))^((u(7)+1)/(2*(u(7)-1)))" } Block { BlockType Constant Name "Constant1" Position [445, 75, 475, 105] Value ".6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant7" Position [445, 435, 475, 465] Value "1.35" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Fcn Name "Fcn" Position [645, 315, 705, 345] Expr "(2/(u(7)+1))^(u(7)/(u(7)-1))" } Block { BlockType Fcn Name "Fcn1" Position [415, 135, 475, 165] Expr "u(1)*pi" } Block { BlockType Fcn Name "Fcn2" Position [155, 245, 215, 275] Expr "sin(u(1))" } Block { BlockType SubSystem Name "Lift intake" Ports [1, 1] Position [145, 181, 235, 219] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lift intake" Location [375, 376, 1095, 734] 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 "Crank Angle" Position [75, 188, 105, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "On" Position [200, 140, 230, 170] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Switch1" Position [410, 180, 440, 210] Threshold "pi()" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [295, 180, 325, 210] InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "off" Position [190, 225, 220, 255] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Lift" Position [495, 188, 525, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Switch2" SrcPort 1 Points [25, 0; 0, 10] DstBlock "Switch1" DstPort 3 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Lift" DstPort 1 } Line { SrcBlock "On" SrcPort 1 Points [25, 0; 0, 30] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "off" SrcPort 1 Points [10, 0] Branch { Points [0, 10; 120, 0; 0, -65] DstBlock "Switch1" DstPort 1 } Branch { Points [0, -35] DstBlock "Switch2" DstPort 3 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [140, 0] Branch { Points [0, 40; 145, 0] DstBlock "Switch1" DstPort 2 } Branch { DstBlock "Switch2" DstPort 2 } } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [570, 61, 575, 479] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [275, 266, 280, 304] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "No Choke" Position [645, 435, 705, 465] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(4)/u(3)))*sqrt((2*u(7)/(u(7)-1))*(1-(u(4)/u(3))^((u(7)-1)/u(" "7))))" } Block { BlockType Product Name "Product" Ports [3, 1] Position [350, 134, 380, 166] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [280, 211, 310, 244] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pt/Po" Position [645, 190, 705, 220] Expr "u(4)/u(3)" } Block { BlockType Constant Name "R" Position [215, 360, 245, 390] Value "8314" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [770, 252, 800, 283] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope" Ports [1] Position [940, 174, 970, 206] Floating off Location [6, 46, 1430, 869] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [315, 259, 345, 291] Floating off Location [147, 479, 782, 821] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData19" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [845, 255, 875, 285] Criteria "u2 > Threshold" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Intake Mdot" Position [965, 263, 995, 277] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Valve dia" SrcPort 1 Points [190, 0] DstBlock "Product" DstPort 1 } Line { SrcBlock "Valve lift" SrcPort 1 Points [95, 0; 0, 80] DstBlock "Product" DstPort 2 } Line { SrcBlock "Product1" SrcPort 1 Points [10, 0; 0, -70] DstBlock "Product" DstPort 3 } Line { SrcBlock "Mux1" SrcPort 1 Points [5, 0; 0, -10] DstBlock "Scope1" DstPort 1 } Line { SrcBlock "Fcn2" SrcPort 1 Points [20, 0; 0, 15; 15, 0] Branch { Points [0, -40] DstBlock "Product1" DstPort 2 } Branch { DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [25, 0] Branch { Points [0, 60] DstBlock "Fcn2" DstPort 1 } Branch { DstBlock "Lift intake" DstPort 1 } } Line { SrcBlock "Lift intake" SrcPort 1 Points [10, 0] Branch { Points [10, 0; 0, 20] DstBlock "Product1" DstPort 1 } Branch { Points [0, 95] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "M mass" SrcPort 1 Points [0, -30] DstBlock "A" DstPort 2 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, 5] DstBlock "A" DstPort 1 } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { Points [0, -80] DstBlock "Scope" DstPort 1 } Branch { DstBlock "Intake Mdot" DstPort 1 } } Line { SrcBlock "Product" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "No Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Fcn" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Pt/Po" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0] Branch { Points [0, -65] Branch { Points [0, -115] DstBlock "Choke" DstPort 1 } Branch { DstBlock "Pt/Po" DstPort 1 } } Branch { Points [0, 60] Branch { Points [0, 120] DstBlock "No Choke" DstPort 1 } Branch { DstBlock "Fcn" DstPort 1 } } } Line { SrcBlock "Constant7" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Intake Temp" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "Cyl Pressure" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Intake Pressure" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Mux" DstPort 1 } Annotation { Name "If Choke, output 1" Position [786, 234] } Annotation { Name "gamma" Position [412, 451] } Annotation { Name "Ar" Position [535, 143] } Annotation { Name "Cd" Position [433, 89] } } } Block { BlockType Integrator Name "Integrator" Ports [2, 1] Position [430, 381, 470, 439] ExternalReset "falling" } Block { BlockType Integrator Name "Mass intergrator" Ports [3, 1] Position [1240, 641, 1280, 699] ExternalReset "falling" InitialConditionSource "external" LowerSaturationLimit "0" } Block { BlockType Mux Name "Mux1" Ports [3, 1] Position [1020, 366, 1030, 414] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Product Name "P x V2" Ports [2, 1] Position [355, 375, 405, 410] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType SubSystem Name "P=nRT/V1" Ports [5, 1] Position [980, 120, 1115, 190] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "P=nRT/V1" Location [140, 361, 895, 741] 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 "Temperature" Position [60, 28, 90, 42] IconDisplay "Port number" } Block { BlockType Inport Name "m (kg)" Position [55, 123, 85, 137] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Volume (m^3)" Position [340, 165, 370, 180] Orientation "up" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R" Position [85, 88, 115, 102] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "MW" Position [35, 243, 65, 257] Port "5" IconDisplay "Port number" } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [375, 52, 405, 83] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Mole Solver" Ports [2, 1] Position [180, 122, 210, 153] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Mole Solver1" Ports [2, 1] Position [110, 242, 140, 273] Inputs "**" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P x V1" Ports [4, 1] Position [250, 30, 300, 85] Inputs "4" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "R1" Position [175, 191, 230, 229] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "R3" Position [15, 276, 70, 314] Value "10^-3" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Pressure" Position [590, 63, 620, 77] IconDisplay "Port number" } Line { SrcBlock "R1" SrcPort 1 DstBlock "P x V1" DstPort 4 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Pressure" DstPort 1 } Line { SrcBlock "Volume (m^3)" SrcPort 1 Points [0, -85] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "P x V1" SrcPort 1 DstBlock "Divide1" DstPort 1 } Line { SrcBlock "Mole Solver" SrcPort 1 Points [0, -75] DstBlock "P x V1" DstPort 3 } Line { SrcBlock "m (kg)" SrcPort 1 DstBlock "Mole Solver" DstPort 1 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, -45] DstBlock "P x V1" DstPort 2 } Line { SrcBlock "Temperature" SrcPort 1 DstBlock "P x V1" DstPort 1 } Line { SrcBlock "MW" SrcPort 1 DstBlock "Mole Solver1" DstPort 1 } Line { SrcBlock "R3" SrcPort 1 Points [10, 0; 0, -30] DstBlock "Mole Solver1" DstPort 2 } Line { SrcBlock "Mole Solver1" SrcPort 1 Points [15, 0; 0, -115] DstBlock "Mole Solver" DstPort 2 } } } Block { BlockType Constant Name "R" Position [495, 214, 545, 246] Value "8.31451" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Scope Name "Scope" Ports [1] Position [1360, 654, 1390, 686] Floating off Location [693, 46, 1430, 446] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.000233952" YMax "0.000233952" SaveName "ScopeData9" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [1070, 374, 1100, 406] Floating off Location [360, 373, 1233, 699] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "3000" SaveName "ScopeData12" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [1330, 99, 1360, 131] Floating off Location [325, 351, 1062, 751] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "5.75e+006" SaveName "ScopeData24" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Switch Name "Switch" Position [905, 410, 935, 440] Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch1" Position [575, 465, 605, 495] Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [205, 465, 235, 495] Threshold ".02" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Wall Temp" Position [195, 790, 260, 820] Value "600" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Weibe" Ports [4, 4] Position [345, 94, 450, 241] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Weibe" Location [-61, 127, 1367, 904] 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 "Theta" Position [95, 268, 125, 282] IconDisplay "Port number" } Block { BlockType Inport Name "E of Burn (J)" Position [635, 168, 665, 182] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Spark" Position [150, 308, 180, 322] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Burn Duration" Position [210, 353, 240, 367] Port "4" IconDisplay "Port number" } Block { BlockType Product Name "% * E" Ports [2, 1] Position [850, 250, 900, 285] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "% * E1" Ports [2, 1] Position [970, 315, 1020, 350] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "% * E2" Ports [2, 1] Position [1180, 485, 1230, 520] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Scope Name "% Burn1" Ports [1] Position [850, 134, 880, 166] Floating off Location [591, 345, 1435, 822] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1" SaveName "ScopeData3" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "% Burn2" Ports [1] Position [1380, 584, 1410, 616] Floating off Location [125, 514, 969, 991] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "3750" SaveName "ScopeData13" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "% Burn3" Ports [1] Position [1030, 449, 1060, 481] Floating off Location [538, 401, 1382, 878] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1000" SaveName "ScopeData17" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "% Burn4" Ports [1] Position [1085, 379, 1115, 411] Floating off Location [49, 417, 893, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "1100" YMax "1800" SaveName "ScopeData18" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Constant Name "A" Position [80, 199, 115, 221] Value "5" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Derivative Name "Derivative" Position [800, 365, 830, 395] } Block { BlockType Integrator Name "Integrator1" Ports [2, 1] Position [1270, 576, 1310, 634] ExternalReset "falling" LowerSaturationLimit "0" } Block { BlockType Integrator Name "Integrator2" Ports [2, 1] Position [895, 341, 935, 399] ExternalReset "falling" LowerSaturationLimit "0" } Block { BlockType Constant Name "M + 1" Position [125, 217, 160, 243] Value "3" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Mux Name "Mux" Ports [5, 1] Position [335, 142, 345, 238] ShowName off Inputs "5" DisplayOption "bar" } Block { BlockType SubSystem Name "Switch for Weibe" Ports [4, 1] Position [545, 226, 670, 319] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Switch for Weibe" Location [112, 307, 1387, 790] 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 "Weibe Input" Position [475, 223, 505, 237] IconDisplay "Port number" } Block { BlockType Inport Name "Crank Position" Position [120, 168, 150, 182] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Spark" Position [260, 183, 290, 197] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Burn Duration" Position [300, 398, 330, 412] Port "4" IconDisplay "Port number" } Block { BlockType Scope Name "1" Ports [1] Position [525, 59, 555, 91] Floating off Location [591, 417, 1435, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1" SaveName "ScopeData14" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "2" Ports [1] Position [750, 59, 780, 91] Floating off Location [5, 180, 1449, 1031] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData15" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "3" Ports [1] Position [1020, 74, 1050, 106] Floating off Location [591, 417, 1435, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1" SaveName "ScopeData16" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [445, 382, 475, 413] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "After Burn Value" Position [835, 250, 900, 280] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Before Burn Value" Position [130, 110, 195, 140] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Intake\nCompression\nSwitch" Position [945, 185, 975, 215] Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Intake\nCompression\nSwitch1" Position [590, 140, 620, 170] Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [340, 167, 370, 198] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType RelationalOperator Name "Relational\nOperator1" Position [680, 307, 710, 338] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Outport Name "% E released" Position [880, 133, 910, 147] IconDisplay "Port number" } Line { SrcBlock "Before Burn Value" SrcPort 1 Points [15, 0; 0, 20] DstBlock "Intake\nCompression\nSwitch1" DstPort 1 } Line { SrcBlock "Spark" SrcPort 1 Points [15, 0] Branch { DstBlock "Relational\nOperator" DstPort 2 } Branch { Points [0, 200] DstBlock "Add" DstPort 1 } } Line { SrcBlock "Crank Position" SrcPort 1 Points [80, 0] Branch { DstBlock "Relational\nOperator" DstPort 1 } Branch { Points [0, 140] DstBlock "Relational\nOperator1" DstPort 1 } } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [75, 0] Branch { Points [25, 0; 0, -30] DstBlock "Intake\nCompression\nSwitch1" DstPort 2 } Branch { Points [0, -110] DstBlock "1" DstPort 1 } } Line { SrcBlock "Weibe Input" SrcPort 1 Points [30, 0; 0, -65] DstBlock "Intake\nCompression\nSwitch1" DstPort 3 } Line { SrcBlock "Relational\nOperator1" SrcPort 1 Points [85, 0; 0, -125] DstBlock "Intake\nCompression\nSwitch" DstPort 2 } Line { SrcBlock "Burn Duration" SrcPort 1 DstBlock "Add" DstPort 2 } Line { SrcBlock "Add" SrcPort 1 Points [90, 0; 0, -70] DstBlock "Relational\nOperator1" DstPort 2 } Line { SrcBlock "Intake\nCompression\nSwitch" SrcPort 1 Points [25, 0] DstBlock "3" DstPort 1 } Line { SrcBlock "After Burn Value" SrcPort 1 Points [10, 0; 0, -55] DstBlock "Intake\nCompression\nSwitch" DstPort 3 } Line { SrcBlock "Intake\nCompression\nSwitch1" SrcPort 1 Points [85, 0] Branch { Points [0, -80] DstBlock "2" DstPort 1 } Branch { Points [60, 0] Branch { Points [5, 0; 0, 35] DstBlock "Intake\nCompression\nSwitch" DstPort 1 } Branch { Points [0, -15] DstBlock "% E released" DstPort 1 } } } } } Block { BlockType SubSystem Name "Switch for Weibe1" Ports [4, 1] Position [965, 536, 1090, 629] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Switch for Weibe1" Location [112, 307, 1387, 790] 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 "Weibe Input" Position [475, 223, 505, 237] IconDisplay "Port number" } Block { BlockType Inport Name "Crank Position" Position [120, 168, 150, 182] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Spark" Position [260, 183, 290, 197] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Burn Duration" Position [300, 398, 330, 412] Port "4" IconDisplay "Port number" } Block { BlockType Scope Name "1" Ports [1] Position [525, 59, 555, 91] Floating off Location [591, 417, 1435, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1" SaveName "ScopeData14" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "2" Ports [1] Position [750, 59, 780, 91] Floating off Location [5, 180, 1449, 1031] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData15" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "3" Ports [1] Position [1020, 74, 1050, 106] Floating off Location [591, 417, 1435, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1" SaveName "ScopeData16" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [445, 382, 475, 413] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "After Burn Value" Position [835, 250, 900, 280] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Before Burn Value" Position [130, 110, 195, 140] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Intake\nCompression\nSwitch" Position [945, 185, 975, 215] Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Intake\nCompression\nSwitch1" Position [590, 140, 620, 170] Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [340, 167, 370, 198] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType RelationalOperator Name "Relational\nOperator1" Position [680, 307, 710, 338] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Outport Name "% E released" Position [880, 133, 910, 147] IconDisplay "Port number" } Line { SrcBlock "Intake\nCompression\nSwitch1" SrcPort 1 Points [85, 0] Branch { Points [60, 0] Branch { Points [0, -15] DstBlock "% E released" DstPort 1 } Branch { Points [5, 0; 0, 35] DstBlock "Intake\nCompression\nSwitch" DstPort 1 } } Branch { Points [0, -80] DstBlock "2" DstPort 1 } } Line { SrcBlock "After Burn Value" SrcPort 1 Points [10, 0; 0, -55] DstBlock "Intake\nCompression\nSwitch" DstPort 3 } Line { SrcBlock "Intake\nCompression\nSwitch" SrcPort 1 Points [25, 0] DstBlock "3" DstPort 1 } Line { SrcBlock "Add" SrcPort 1 Points [90, 0; 0, -70] DstBlock "Relational\nOperator1" DstPort 2 } Line { SrcBlock "Burn Duration" SrcPort 1 DstBlock "Add" DstPort 2 } Line { SrcBlock "Relational\nOperator1" SrcPort 1 Points [85, 0; 0, -125] DstBlock "Intake\nCompression\nSwitch" DstPort 2 } Line { SrcBlock "Weibe Input" SrcPort 1 Points [30, 0; 0, -65] DstBlock "Intake\nCompression\nSwitch1" DstPort 3 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [75, 0] Branch { Points [0, -110] DstBlock "1" DstPort 1 } Branch { Points [25, 0; 0, -30] DstBlock "Intake\nCompression\nSwitch1" DstPort 2 } } Line { SrcBlock "Crank Position" SrcPort 1 Points [80, 0] Branch { Points [0, 140] DstBlock "Relational\nOperator1" DstPort 1 } Branch { DstBlock "Relational\nOperator" DstPort 1 } } Line { SrcBlock "Spark" SrcPort 1 Points [15, 0] Branch { Points [0, 200] DstBlock "Add" DstPort 1 } Branch { DstBlock "Relational\nOperator" DstPort 2 } } Line { SrcBlock "Before Burn Value" SrcPort 1 Points [15, 0; 0, 20] DstBlock "Intake\nCompression\nSwitch1" DstPort 1 } } } Block { BlockType Fcn Name "Weibe" Position [420, 215, 480, 245] Expr "1-(exp(-5*( (u(1)-u(2))/ u(3) )^3))" } Block { BlockType Outport Name "Energy " Position [965, 263, 995, 277] IconDisplay "Port number" } Block { BlockType Outport Name "Energy 1" Position [1090, 328, 1120, 342] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Energy 2" Position [1400, 498, 1430, 512] Port "3" IconDisplay "Port number" } Block { BlockType Outport Name "%Burn" Position [855, 208, 885, 222] Port "4" IconDisplay "Port number" } Line { SrcBlock "Weibe" SrcPort 1 Points [45, 0] DstBlock "Switch for Weibe" DstPort 1 } Line { SrcBlock "Theta" SrcPort 1 Points [145, 0; 0, -5] Branch { Points [0, -120] DstBlock "Mux" DstPort 1 } Branch { Points [150, 0] Branch { Points [105, 0] DstBlock "Switch for Weibe" DstPort 2 } Branch { Points [0, 300] DstBlock "Switch for Weibe1" DstPort 2 } } } Line { SrcBlock "% * E" SrcPort 1 DstBlock "Energy " DstPort 1 } Line { SrcBlock "Switch for Weibe" SrcPort 1 Points [35, 0] Branch { Points [85, 0] Branch { DstBlock "% * E" DstPort 2 } Branch { Points [0, -60] Branch { Points [0, -65] DstBlock "% Burn1" DstPort 1 } Branch { DstBlock "%Burn" DstPort 1 } } } Branch { Points [0, 105] DstBlock "Derivative" DstPort 1 } } Line { SrcBlock "E of Burn (J)" SrcPort 1 Points [105, 0; 0, 85] Branch { DstBlock "% * E" DstPort 1 } Branch { Points [0, 65] Branch { DstBlock "% * E1" DstPort 1 } Branch { Points [0, 170] DstBlock "% * E2" DstPort 1 } } } Line { SrcBlock "Spark" SrcPort 1 Points [100, 0] Branch { Points [0, -145] DstBlock "Mux" DstPort 2 } Branch { Points [115, 0] Branch { Points [60, 0; 0, -30] DstBlock "Switch for Weibe" DstPort 3 } Branch { Points [0, 280] DstBlock "Switch for Weibe1" DstPort 3 } } } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0; 0, 40] DstBlock "Weibe" DstPort 1 } Line { SrcBlock "Burn Duration" SrcPort 1 Points [75, 0] Branch { DstBlock "Mux" DstPort 3 } Branch { Points [40, 0] Branch { Points [130, 0; 0, -50] DstBlock "Switch for Weibe" DstPort 4 } Branch { Points [0, 260] DstBlock "Switch for Weibe1" DstPort 4 } } } Line { SrcBlock "M + 1" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Derivative" SrcPort 1 Points [10, 0] Branch { Points [20, 0] Branch { Points [0, 85] DstBlock "% Burn3" DstPort 1 } Branch { Points [0, -25] DstBlock "Integrator2" DstPort 1 } } Branch { Points [0, 165] DstBlock "Switch for Weibe1" DstPort 1 } } Line { SrcBlock "Integrator2" SrcPort 1 Points [5, 0; 0, -30] DstBlock "% * E1" DstPort 2 } Line { SrcBlock "% * E1" SrcPort 1 Points [25, 0] Branch { DstBlock "Energy 1" DstPort 1 } Branch { Points [0, 60] DstBlock "% Burn4" DstPort 1 } } Line { SrcBlock "Switch for Weibe1" SrcPort 1 Points [15, 0; 0, 5; 40, 0; 0, -80] DstBlock "% * E2" DstPort 2 } Line { SrcBlock "Integrator1" SrcPort 1 Points [25, 0] Branch { Points [25, 0] DstBlock "% Burn2" DstPort 1 } Branch { Points [0, -100] DstBlock "Energy 2" DstPort 1 } } Line { SrcBlock "% * E2" SrcPort 1 Points [10, 0; 0, 85] DstBlock "Integrator1" DstPort 1 } } } Block { BlockType Fcn Name "delay deg->rad" Position [150, 170, 210, 200] Expr "2*pi()-(u(1)*2*pi()/360)" } Block { BlockType Constant Name "lam flame\nspeed" Position [110, 245, 135, 275] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "x2" Ports [2, 1] Position [1070, 830, 1120, 865] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x3" Ports [2, 1] Position [1180, 765, 1230, 800] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Pressure" Position [1275, 148, 1305, 162] IconDisplay "Port number" } Line { Labels [0, 0] SrcBlock "Atm Pressure" SrcPort 1 Points [30, 0] Branch { DstBlock "Initial Air Mass Calculator" DstPort 2 } Branch { Points [0, 455] Branch { Points [0, 80; 235, 0] Branch { DstBlock "Intake Mdot Calculator" DstPort 2 } Branch { Points [0, 95] DstBlock "Intake Mdot Calculator1" DstPort 2 } } Branch { Points [300, 0] Branch { Points [5, 0] DstBlock "Exhaust Mdot Calculator" DstPort 3 } Branch { Points [0, -115] DstBlock "Exhaust Mdot Calculator1" DstPort 3 } } } } Line { SrcBlock "Atm Temp" SrcPort 1 Points [30, 0; 0, 35] Branch { DstBlock "Initial Air Mass Calculator" DstPort 1 } Branch { Points [0, 570; 85, 0] Branch { DstBlock "Intake Mdot Calculator" DstPort 4 } Branch { Points [0, 95] DstBlock "Intake Mdot Calculator1" DstPort 4 } } } Line { SrcBlock "P x V2" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Theta" SrcPort 1 Points [0, 35] Branch { Points [0, 490; 255, 0] Branch { Points [0, 50; 475, 0] Branch { DstBlock "Intake Mdot Calculator" DstPort 1 } Branch { Points [0, 95] DstBlock "Intake Mdot Calculator1" DstPort 1 } } Branch { Points [0, -45; 495, 0] Branch { DstBlock "Exhaust Mdot Calculator" DstPort 1 } Branch { Points [0, -110] DstBlock "Exhaust Mdot Calculator1" DstPort 1 } } } Branch { Points [245, 0] Branch { Points [40, 0] DstBlock "Weibe" DstPort 1 } Branch { Labels [2, 0] Points [0, 420] DstBlock "Energy" DstPort 1 } } } Line { SrcBlock "Volume" SrcPort 1 Points [40, 0] Branch { DstBlock "P=nRT/V1" DstPort 3 } Branch { Points [0, -105; -910, 0; 0, 780] DstBlock "Heat Transfer" DstPort 6 } } Line { SrcBlock "Torque" SrcPort 1 Points [10, 0] DstBlock "P x V2" DstPort 1 } Line { SrcBlock "Omega" SrcPort 1 Points [5, 0] Branch { Labels [0, 0] Points [0, -165] DstBlock "Crank Duration\nSolver" DstPort 1 } Branch { Points [135, 0] Branch { DstBlock "P x V2" DstPort 2 } Branch { Labels [0, 0] Points [0, 355] DstBlock "Heat Transfer" DstPort 1 } } } Line { SrcBlock "Integrator" SrcPort 1 DstBlock "Add1" DstPort 2 } Line { SrcBlock "Add1" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { SrcBlock "Divide" SrcPort 1 Points [30, 0] DstBlock "Add4" DstPort 1 } Line { SrcBlock "delay deg->rad" SrcPort 1 DstBlock "Weibe" DstPort 3 } Line { SrcBlock "lam flame\nspeed" SrcPort 1 Points [15, 0] Branch { Points [20, 0] DstBlock "Crank Duration\nSolver" DstPort 2 } Branch { Points [0, 35] DstBlock "Crank Duration\nSolver" DstPort 4 } } Line { SrcBlock "Crank Duration\nSolver" SrcPort 1 Points [25, 0; 0, -45] DstBlock "Weibe" DstPort 4 } Line { SrcBlock "Exhaust Mdot Calculator" SrcPort 1 Points [30, 0; 0, 50] Branch { DstBlock "Add Flow" DstPort 1 } Branch { Points [0, 195] DstBlock "x2" DstPort 1 } } Line { SrcBlock "Intake Mdot Calculator" SrcPort 1 Points [35, 0] Branch { Points [0, -25] DstBlock "Add Flow" DstPort 2 } Branch { Points [0, 85] DstBlock "x3" DstPort 1 } } Line { SrcBlock "Add Flow" SrcPort 1 Points [95, 0] DstBlock "Mass intergrator" DstPort 1 } Line { SrcBlock "Mass intergrator" SrcPort 1 Points [40, 0] Branch { Points [0, -100] Branch { Points [0, -300; -400, 0] Branch { Points [0, -130] DstBlock "P=nRT/V1" DstPort 2 } Branch { Points [-325, 0] DstBlock "Divide" DstPort 2 } } Branch { DstBlock "Energy" DstPort 2 } } Branch { DstBlock "Scope" DstPort 1 } } Line { SrcBlock "Vc" SrcPort 1 DstBlock "Initial Air Mass Calculator" DstPort 3 } Line { SrcBlock "Initial Air Mass Calculator" SrcPort 1 Points [40, 0; 0, 70; 285, 0; 0, 470] DstBlock "Mass intergrator" DstPort 3 } Line { SrcBlock "Add4" SrcPort 1 Points [15, 0] Branch { Points [0, 400] DstBlock "x2" DstPort 2 } Branch { Points [15, 0] DstBlock "H Chem1" DstPort 3 } Branch { Points [0, -90] DstBlock "CxHy Chem" DstPort 3 } } Line { SrcBlock "Switch" SrcPort 1 Points [25, 0] Branch { Points [0, -95; -50, 0; 0, -205] DstBlock "P=nRT/V1" DstPort 1 } Branch { Points [0, 80; -135, 0] Branch { Points [0, 90] DstBlock "Exhaust Mdot Calculator" DstPort 4 } Branch { Points [-550, 0; 0, 295] DstBlock "Heat Transfer" DstPort 4 } Branch { Points [0, -20] DstBlock "Exhaust Mdot Calculator1" DstPort 4 } } } Line { SrcBlock "x3" SrcPort 1 DstBlock "Intake E intergrator" DstPort 1 } Line { SrcBlock "Intake E intergrator" SrcPort 1 Points [15, 0; 0, 25] DstBlock "Flow\nEnergy" DstPort 1 } Line { SrcBlock "Exhaust E intergrator" SrcPort 1 Points [100, 0; 0, -25] DstBlock "Flow\nEnergy" DstPort 2 } Line { SrcBlock "Flow\nEnergy" SrcPort 1 Points [5, 0; 0, 75; -900, 0; 0, -490] DstBlock "Add1" DstPort 3 } Line { SrcBlock "x2" SrcPort 1 DstBlock "Exhaust E intergrator" DstPort 1 } Line { SrcBlock "Weibe" SrcPort 3 Points [20, 0; 0, 215] DstBlock "Add1" DstPort 1 } Line { SrcBlock "R" SrcPort 1 Points [25, 0] Branch { Points [55, 0] Branch { Points [0, -65] DstBlock "Initial Air Mass Calculator" DstPort 4 } Branch { Points [305, 0; 0, -60] DstBlock "P=nRT/V1" DstPort 4 } } Branch { Points [0, 90] Branch { Points [0, 85] DstBlock "H Chem1" DstPort 1 } Branch { Points [185, 0] DstBlock "CxHy Chem" DstPort 1 } } } Line { SrcBlock "P=nRT/V1" SrcPort 1 Points [70, 0] Branch { DstBlock "Pressure" DstPort 1 } Branch { Points [0, 355; -380, 0; 0, 65] Branch { Points [0, 105] Branch { DstBlock "Intake Mdot Calculator" DstPort 3 } Branch { Points [0, 95] DstBlock "Intake Mdot Calculator1" DstPort 3 } } Branch { Points [30, 0] Branch { DstBlock "Exhaust Mdot Calculator" DstPort 2 } Branch { Points [0, -110] DstBlock "Exhaust Mdot Calculator1" DstPort 2 } } } Branch { Points [0, -40] DstBlock "Scope2" DstPort 1 } } Line { SrcBlock "Energy" SrcPort 1 Points [5, 0; 0, -250; -1205, 0; 0, -150] DstBlock "Weibe" DstPort 2 } Line { SrcBlock "Fuel" SrcPort 1 Points [20, 0] Branch { DstBlock "Energy" DstPort 3 } Branch { Points [0, 330; -540, 0] Branch { Points [-700, 0] DstBlock "Crank Duration\nSolver" DstPort 3 } Branch { Points [0, -45] Branch { Points [0, -460] DstBlock "Switch" DstPort 2 } Branch { Points [-340, 0; 0, -405] DstBlock "Switch1" DstPort 2 } } } } Line { SrcBlock "Energy" SrcPort 2 Points [20, 0; 0, -360; -580, 0] Branch { DstBlock "P=nRT/V1" DstPort 5 } Branch { Points [-295, 0] Branch { Points [-25, 0] DstBlock "Initial Air Mass Calculator" DstPort 5 } Branch { Points [0, 375; 20, 0] Branch { Points [0, 90] Branch { DstBlock "Intake Mdot Calculator" DstPort 5 } Branch { Points [0, 95] DstBlock "Intake Mdot Calculator1" DstPort 5 } } Branch { Points [85, 0] Branch { Points [85, 0] DstBlock "Exhaust Mdot Calculator" DstPort 5 } Branch { Points [0, -115] DstBlock "Exhaust Mdot Calculator1" DstPort 5 } } } } } Line { SrcBlock "Valve Lift" SrcPort 1 Points [260, 0] Branch { Points [10, 0] Branch { Points [0, -50] DstBlock "Intake Mdot Calculator" DstPort 6 } Branch { Points [0, 45] DstBlock "Intake Mdot Calculator1" DstPort 6 } } Branch { Points [0, -145; 15, 0] Branch { DstBlock "Exhaust Mdot Calculator" DstPort 6 } Branch { Points [0, -110] DstBlock "Exhaust Mdot Calculator1" DstPort 6 } } } Line { SrcBlock "Valve Dia" SrcPort 1 Points [245, 0] Branch { Points [40, 0] Branch { Points [0, -95] DstBlock "Intake Mdot Calculator" DstPort 7 } Branch { DstBlock "Intake Mdot Calculator1" DstPort 7 } } Branch { Points [0, -190; 45, 0] Branch { DstBlock "Exhaust Mdot Calculator" DstPort 7 } Branch { Points [85, 0] DstBlock "Exhaust Mdot Calculator1" DstPort 7 } } } Line { SrcBlock "Half Crank" SrcPort 1 Points [30, 0; 0, 20] DstBlock "Heat Transfer" DstPort 2 } Line { Labels [0, 0] SrcBlock "bore" SrcPort 1 Points [30, 0; 0, -20] DstBlock "Heat Transfer" DstPort 3 } Line { SrcBlock "Wall Temp" SrcPort 1 Points [15, 0; 0, 10] DstBlock "Heat Transfer" DstPort 5 } Line { SrcBlock "piston Area" SrcPort 1 Points [170, 0] DstBlock "Heat Transfer" DstPort 7 } Line { SrcBlock "Heat Transfer" SrcPort 1 Points [70, 0; 0, -370] DstBlock "Add1" DstPort 4 } Line { SrcBlock "CxHy Chem" SrcPort 1 Points [40, 0; 0, 35] Branch { DstBlock "Switch" DstPort 1 } Branch { DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "H Chem1" SrcPort 1 Points [25, 0] Branch { DstBlock "Switch" DstPort 3 } Branch { Points [0, -45] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Weibe" SrcPort 4 Points [35, 0; 0, 125; 240, 0] Branch { Points [30, 0] DstBlock "CxHy Chem" DstPort 2 } Branch { Points [0, 90] DstBlock "H Chem1" DstPort 2 } } Line { SrcBlock "Initial Energy\nof gas and air (J/kg)2" SrcPort 1 Points [110, 0] DstBlock "Switch1" DstPort 1 } Line { SrcBlock "Switch1" SrcPort 1 Points [550, 0; 0, 310] DstBlock "x3" DstPort 2 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Scope1" DstPort 1 } Line { SrcBlock "Clock1" SrcPort 1 DstBlock "Switch2" DstPort 2 } Line { SrcBlock "Initial Energy\nof gas and air (J/kg)3" SrcPort 1 Points [40, 0] DstBlock "Switch2" DstPort 3 } Line { SrcBlock "Initial Energy\nof gas and air (J/kg)4" SrcPort 1 Points [25, 0] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "Switch2" SrcPort 1 Points [80, 0; 0, -25; 360, 0] DstBlock "Add4" DstPort 2 } Line { SrcBlock "Initial Energy\nof H2 and Air (J/kg)1" SrcPort 1 Points [100, 0] DstBlock "Switch1" DstPort 3 } Line { SrcBlock "Spark Advance" SrcPort 1 DstBlock "delay deg->rad" DstPort 1 } Line { SrcBlock "Intake Mdot Calculator1" SrcPort 1 Points [25, 0] DstBlock "Add Flow" DstPort 4 } Line { SrcBlock "Exhaust Mdot Calculator1" SrcPort 1 Points [0, 140; -45, 0; 0, 60] DstBlock "Add Flow" DstPort 3 } Annotation { Position [685, 409] } } } Block { BlockType SubSystem Name "Piston Force" Ports [3, 2] Position [110, 310, 285, 400] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Piston Force" Location [480, 289, 1261, 752] 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 "Piston Dia (m)" Position [180, 83, 210, 97] IconDisplay "Port number" } Block { BlockType Inport Name "Case Pressure" Position [140, 233, 170, 247] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Piston Pressure Top" Position [195, 335, 225, 350] Orientation "up" Port "3" IconDisplay "Port number" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [240, 222, 270, 253] Inputs "-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Force" Ports [2, 1] Position [410, 157, 440, 188] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "P area" Position [235, 75, 295, 105] Expr "pi*(u/2)^2" } Block { BlockType Outport Name "Piston Force" Position [600, 158, 630, 172] IconDisplay "Port number" } Block { BlockType Outport Name "Piston Area" Position [330, 148, 360, 162] Port "2" IconDisplay "Port number" } Line { SrcBlock "P area" SrcPort 1 Points [10, 0] Branch { Points [85, 0] DstBlock "Force" DstPort 1 } Branch { Points [5, 0] DstBlock "Piston Area" DstPort 1 } } Line { SrcBlock "Add" SrcPort 1 Points [120, 0] DstBlock "Force" DstPort 2 } Line { SrcBlock "Piston Pressure Top" SrcPort 1 Points [15, 0] DstBlock "Add" DstPort 2 } Line { SrcBlock "Piston Dia (m)" SrcPort 1 DstBlock "P area" DstPort 1 } Line { SrcBlock "Force" SrcPort 1 Points [0, -10] DstBlock "Piston Force" DstPort 1 } Line { SrcBlock "Case Pressure" SrcPort 1 Points [0, -10] DstBlock "Add" DstPort 1 } } } Block { BlockType SubSystem Name "Piston Position based on Geometry" Ports [6, 4] Position [385, 194, 585, 411] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Piston Position based on Geometry" Location [70, 219, 1365, 852] 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 "Theta" Position [200, 33, 230, 47] IconDisplay "Port number" } Block { BlockType Inport Name "Crank Offset" Position [25, 28, 55, 42] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Connecting Rod Length" Position [95, 83, 125, 97] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Piston Force" Position [530, 343, 560, 357] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Piston Area" Position [15, 200, 45, 215] Orientation "down" Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Compression Ratio" Position [90, 418, 120, 432] Port "6" IconDisplay "Port number" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [720, 517, 750, 548] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType SubSystem Name "Clearance Volume Solver" Ports [3, 2] Position [250, 365, 445, 435] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Clearance Volume Solver" Location [269, 153, 957, 484] 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 "Piston Area" Position [200, 65, 230, 80] Orientation "down" IconDisplay "Port number" } Block { BlockType Inport Name "Half Stroke" Position [100, 68, 130, 82] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Compression Ratio" Position [95, 198, 125, 212] Port "3" IconDisplay "Port number" } Block { BlockType Product Name "Divide" Ports [2, 1] Position [435, 157, 465, 188] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Fcn" Position [195, 190, 255, 220] Expr "u-1" } Block { BlockType Constant Name "Stroke" Position [70, 125, 135, 155] Value "2" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "Swept Volume calc" Ports [3, 1] Position [230, 91, 270, 149] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Clearance Volume" Position [550, 168, 580, 182] IconDisplay "Port number" } Block { BlockType Outport Name "Swept Volume" Position [385, 73, 415, 87] Port "2" IconDisplay "Port number" } Line { SrcBlock "Stroke" SrcPort 1 DstBlock "Swept Volume calc" DstPort 3 } Line { SrcBlock "Fcn" SrcPort 1 Points [160, 0] DstBlock "Divide" DstPort 2 } Line { SrcBlock "Swept Volume calc" SrcPort 1 Points [70, 0; 0, 45; 20, 0] Branch { DstBlock "Divide" DstPort 1 } Branch { Points [-10, 0; 0, -85] DstBlock "Swept Volume" DstPort 1 } } Line { SrcBlock "Piston Area" SrcPort 1 DstBlock "Swept Volume calc" DstPort 1 } Line { SrcBlock "Half Stroke" SrcPort 1 Points [25, 0; 0, 45] DstBlock "Swept Volume calc" DstPort 2 } Line { SrcBlock "Divide" SrcPort 1 DstBlock "Clearance Volume" DstPort 1 } Line { SrcBlock "Compression Ratio" SrcPort 1 DstBlock "Fcn" DstPort 1 } } } Block { BlockType SubSystem Name "Phi solver" Ports [3, 1] Position [395, 222, 540, 298] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Phi solver" Location [620, 446, 1272, 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 "Omega" Position [25, 25, 55, 40] Orientation "down" IconDisplay "Port number" } Block { BlockType Inport Name "Crank offset (half Stroke)" Position [80, 158, 110, 172] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Connecting Rod Length" Position [200, 198, 230, 212] Port "3" IconDisplay "Port number" } Block { BlockType Product Name "Divide" Ports [2, 1] Position [250, 97, 280, 128] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Trigonometry Name "Inverse to Phi" Ports [1, 1] Position [330, 100, 360, 130] Operator "asin" } Block { BlockType Product Name "Product" Ports [2, 1] Position [170, 87, 200, 118] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Trigonometry Name "Trigonometric\nFunction" Ports [1, 1] Position [55, 45, 85, 75] } Block { BlockType Outport Name "Phi" Position [385, 108, 415, 122] IconDisplay "Port number" } Line { SrcBlock "Trigonometric\nFunction" SrcPort 1 Points [30, 0; 0, 35] DstBlock "Product" DstPort 1 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { SrcBlock "Divide" SrcPort 1 DstBlock "Inverse to Phi" DstPort 1 } Line { SrcBlock "Omega" SrcPort 1 DstBlock "Trigonometric\nFunction" DstPort 1 } Line { SrcBlock "Crank offset (half Stroke)" SrcPort 1 Points [0, -55] DstBlock "Product" DstPort 2 } Line { SrcBlock "Connecting Rod Length" SrcPort 1 DstBlock "Divide" DstPort 2 } Line { SrcBlock "Inverse to Phi" SrcPort 1 DstBlock "Phi" DstPort 1 } } } Block { BlockType SubSystem Name "Piston Resolver" Ports [3, 1] Position [315, 26, 480, 104] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Piston Resolver" Location [374, 271, 1305, 778] 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 "Crank Position" Position [250, 28, 280, 42] Orientation "left" IconDisplay "Port number" } Block { BlockType Inport Name "Crank Length A" Position [85, 178, 115, 192] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Crank Length L" Position [25, 243, 55, 257] Port "3" IconDisplay "Port number" } Block { BlockType Math Name "Math\nFunction" Ports [1, 1] Position [605, 370, 635, 400] Operator "sqrt" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "Product" Ports [2, 1] Position [255, 162, 285, 193] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [215, 227, 245, 258] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product2" Ports [2, 1] Position [105, 242, 135, 273] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product3" Ports [2, 1] Position [435, 247, 465, 278] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product4" Ports [2, 1] Position [380, 207, 410, 238] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Subtract" Ports [2, 1] Position [540, 367, 570, 398] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [630, 170, 650, 190] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Trigonometry Name "Trigonometric\nFunction" Ports [1, 1] Position [160, 90, 190, 120] Operator "cos" OutputSignalType "real" } Block { BlockType Trigonometry Name "Trigonometric\nFunction1" Ports [1, 1] Position [265, 90, 295, 120] OutputSignalType "real" } Block { BlockType Outport Name "Length S" Position [700, 173, 730, 187] IconDisplay "Port number" } Line { SrcBlock "Trigonometric\nFunction" SrcPort 1 Points [20, 0; 0, 65] DstBlock "Product" DstPort 1 } Line { SrcBlock "Crank Length A" SrcPort 1 Points [50, 0] Branch { Points [0, 50; 20, 0] Branch { Points [0, 15] DstBlock "Product1" DstPort 2 } Branch { DstBlock "Product1" DstPort 1 } } Branch { DstBlock "Product" DstPort 2 } } Line { SrcBlock "Product" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Crank Length L" SrcPort 1 Points [15, 0] Branch { Points [0, 15] DstBlock "Product2" DstPort 2 } Branch { DstBlock "Product2" DstPort 1 } } Line { SrcBlock "Trigonometric\nFunction1" SrcPort 1 Points [45, 0; 0, 110; 0, 0] Branch { DstBlock "Product4" DstPort 1 } Branch { Points [0, 15] DstBlock "Product4" DstPort 2 } } Line { SrcBlock "Product2" SrcPort 1 Points [10, 0; 0, 115] DstBlock "Subtract" DstPort 1 } Line { SrcBlock "Product3" SrcPort 1 Points [30, 0; 0, 125] DstBlock "Subtract" DstPort 2 } Line { SrcBlock "Subtract" SrcPort 1 DstBlock "Math\nFunction" DstPort 1 } Line { SrcBlock "Math\nFunction" SrcPort 1 DstBlock "Sum" DstPort 2 } Line { SrcBlock "Crank Position" SrcPort 1 Points [-15, 0] Branch { Points [-85, 0] DstBlock "Trigonometric\nFunction" DstPort 1 } Branch { Points [0, 70] DstBlock "Trigonometric\nFunction1" DstPort 1 } } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Length S" DstPort 1 } Line { SrcBlock "Product1" SrcPort 1 Points [85, 0; 0, 25] DstBlock "Product3" DstPort 2 } Line { SrcBlock "Product4" SrcPort 1 Points [5, 0] DstBlock "Product3" DstPort 1 } } } Block { BlockType SubSystem Name "Torque Solver" Ports [4, 1] Position [685, 307, 880, 418] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Torque Solver" Location [221, 379, 1175, 765] 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 "Connecting Rod Angle" Position [510, 28, 540, 42] Orientation "left" IconDisplay "Port number" } Block { BlockType Inport Name "Force on Piston" Position [70, 58, 100, 72] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Crank Angle Omega" Position [305, 200, 335, 215] Orientation "down" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Crank Length" Position [615, 295, 645, 310] Orientation "up" Port "4" IconDisplay "Port number" } Block { BlockType Sum Name "B" Ports [3, 1] Position [455, 151, 505, 209] Inputs "+--" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Connecting Rod Length1" Position [315, 145, 345, 175] Value "pi/2" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "F CR" Ports [2, 1] Position [195, 57, 225, 88] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Force1" Ports [3, 1] Position [645, 185, 695, 245] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Trigonometry Name "Trigonometric\nFunction" Ports [1, 1] Position [280, 50, 310, 80] Operator "cos" } Block { BlockType Trigonometry Name "Trigonometric\nFunction1" Ports [1, 1] Position [555, 165, 585, 195] Operator "cos" } Block { BlockType Outport Name "Torque Output" Position [785, 208, 815, 222] IconDisplay "Port number" } Line { SrcBlock "Trigonometric\nFunction" SrcPort 1 Points [40, 0; 0, 45; -175, 0] DstBlock "F CR" DstPort 2 } Line { SrcBlock "Connecting Rod Length1" SrcPort 1 DstBlock "B" DstPort 1 } Line { SrcBlock "B" SrcPort 1 DstBlock "Trigonometric\nFunction1" DstPort 1 } Line { SrcBlock "Trigonometric\nFunction1" SrcPort 1 Points [40, 0] DstBlock "Force1" DstPort 1 } Line { SrcBlock "F CR" SrcPort 1 Points [15, 0; 0, 165; 375, 0; 0, -25] DstBlock "Force1" DstPort 2 } Line { SrcBlock "Connecting Rod Angle" SrcPort 1 Points [-105, 0] Branch { Points [-135, 0] DstBlock "Trigonometric\nFunction" DstPort 1 } Branch { Points [0, 145] DstBlock "B" DstPort 2 } } Line { SrcBlock "Crank Angle Omega" SrcPort 1 Points [120, 0] DstBlock "B" DstPort 3 } Line { SrcBlock "Crank Length" SrcPort 1 DstBlock "Force1" DstPort 3 } Line { SrcBlock "Force on Piston" SrcPort 1 DstBlock "F CR" DstPort 1 } Line { SrcBlock "Force1" SrcPort 1 DstBlock "Torque Output" DstPort 1 } } } Block { BlockType SubSystem Name "Volume Calc" Ports [5, 1] Position [1060, 88, 1215, 192] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Volume Calc" Location [401, 245, 1051, 688] 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 "Half Stroke" Position [25, 33, 55, 47] IconDisplay "Port number" } Block { BlockType Inport Name "Connecting Rod" Position [25, 78, 55, 92] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "S" Position [25, 118, 55, 132] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Piston Area" Position [150, 88, 180, 102] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Clearance Volume" Position [225, 228, 255, 242] Port "5" IconDisplay "Port number" } Block { BlockType Sum Name "Add" Ports [3, 1] Position [90, 29, 130, 131] Inputs "++-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add1" Ports [2, 1] Position [280, 196, 320, 249] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Force1" Ports [2, 1] Position [215, 72, 245, 103] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Volume" Position [345, 218, 375, 232] IconDisplay "Port number" } Line { SrcBlock "Add" SrcPort 1 DstBlock "Force1" DstPort 1 } Line { SrcBlock "Force1" SrcPort 1 Points [0, 125; 15, 0] DstBlock "Add1" DstPort 1 } Line { SrcBlock "Half Stroke" SrcPort 1 Points [15, 0] DstBlock "Add" DstPort 1 } Line { SrcBlock "Connecting Rod" SrcPort 1 Points [15, 0] DstBlock "Add" DstPort 2 } Line { SrcBlock "S" SrcPort 1 Points [15, 0] DstBlock "Add" DstPort 3 } Line { SrcBlock "Piston Area" SrcPort 1 DstBlock "Force1" DstPort 2 } Line { SrcBlock "Add1" SrcPort 1 DstBlock "Volume" DstPort 1 } Line { SrcBlock "Clearance Volume" SrcPort 1 DstBlock "Add1" DstPort 2 } } } Block { BlockType Outport Name "V" Position [1240, 133, 1270, 147] IconDisplay "Port number" } Block { BlockType Outport Name "Total Cylinder Volume" Position [870, 528, 900, 542] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Clearance" Position [845, 573, 875, 587] Port "3" IconDisplay "Port number" } Block { BlockType Outport Name "Torque" Position [905, 358, 935, 372] Port "4" IconDisplay "Port number" } Line { SrcBlock "Clearance Volume Solver" SrcPort 1 Points [80, 0] Branch { Points [95, 0] Branch { Points [40, 0; 0, -85; 370, 0; 0, -120] DstBlock "Volume Calc" DstPort 5 } Branch { Points [0, 140] DstBlock "Add" DstPort 1 } } Branch { Points [0, 195] DstBlock "Clearance" DstPort 1 } } Line { SrcBlock "Phi solver" SrcPort 1 Points [0, 5; 95, 0; 0, 60] DstBlock "Torque Solver" DstPort 1 } Line { Labels [0, 0] SrcBlock "Connecting Rod Length" SrcPort 1 Points [95, 0] Branch { Labels [0, 0] Points [0, 30] DstBlock "Volume Calc" DstPort 2 } Branch { Points [45, 0] Branch { Labels [0, 0] Points [0, 195] DstBlock "Phi solver" DstPort 3 } Branch { DstBlock "Piston Resolver" DstPort 3 } } } Line { Labels [0, 0] SrcBlock "Crank Offset" SrcPort 1 Points [15, 0] Branch { Labels [0, 0] Points [0, 365] DstBlock "Clearance Volume Solver" DstPort 2 } Branch { Points [65, 0; 0, 30; 35, 0] Branch { Points [20, 0] Branch { Labels [0, 0] Points [0, 35] DstBlock "Volume Calc" DstPort 1 } Branch { Points [85, 0] Branch { Labels [0, 0] Points [0, 195] DstBlock "Phi solver" DstPort 2 } Branch { DstBlock "Piston Resolver" DstPort 2 } } } Branch { Labels [0, 0] Points [0, 410; 495, 0] DstBlock "Torque Solver" DstPort 4 } } } Line { SrcBlock "Piston Resolver" SrcPort 1 Points [140, 0; 0, 75] DstBlock "Volume Calc" DstPort 3 } Line { SrcBlock "Theta" SrcPort 1 Points [15, 0] Branch { DstBlock "Piston Resolver" DstPort 1 } Branch { Points [0, 110; 125, 0; 0, -20; 5, 0] Branch { DstBlock "Phi solver" DstPort 1 } Branch { Labels [0, 0] Points [230, 0; 0, 245] DstBlock "Torque Solver" DstPort 3 } } } Line { SrcBlock "Piston Area" SrcPort 1 Points [0, 10; 205, 0] Branch { DstBlock "Clearance Volume Solver" DstPort 1 } Branch { Labels [0, 0] Points [0, -70] DstBlock "Volume Calc" DstPort 4 } } Line { SrcBlock "Volume Calc" SrcPort 1 DstBlock "V" DstPort 1 } Line { SrcBlock "Piston Force" SrcPort 1 DstBlock "Torque Solver" DstPort 2 } Line { SrcBlock "Torque Solver" SrcPort 1 DstBlock "Torque" DstPort 1 } Line { SrcBlock "Clearance Volume Solver" SrcPort 2 Points [35, 0; 0, 120] DstBlock "Add" DstPort 2 } Line { SrcBlock "Compression Ratio" SrcPort 1 DstBlock "Clearance Volume Solver" DstPort 3 } Line { SrcBlock "Add" SrcPort 1 DstBlock "Total Cylinder Volume" DstPort 1 } } } Block { BlockType Outport Name "Torque" Position [665, 465, 680, 495] IconDisplay "Port number" } Block { BlockType Outport Name "Cyl Vol" Position [610, 268, 640, 282] Port "2" IconDisplay "Port number" } Line { SrcBlock "Piston Force" SrcPort 1 Points [0, -15] DstBlock "Piston Position based on Geometry" DstPort 4 } Line { SrcBlock "Piston Position based on Geometry" SrcPort 4 Points [0, 70; 5, 0] Branch { Labels [0, 0] Points [40, 0; 0, -145] DstBlock "Combustion" DstPort 5 } Branch { Points [0, 25] DstBlock "Torque" DstPort 1 } } Line { SrcBlock "Piston Position based on Geometry" SrcPort 1 Points [45, 0; 0, 75] DstBlock "Combustion" DstPort 4 } Line { Labels [0, 0] SrcBlock "Piston Force" SrcPort 2 Points [0, -25; 35, 0] Branch { DstBlock "Piston Position based on Geometry" DstPort 5 } Branch { Points [0, 75] DstBlock "Combustion" DstPort 13 } } Line { SrcBlock "Combustion" SrcPort 1 Points [75, 0; 0, 160; -995, 0; 0, -125] DstBlock "Piston Force" DstPort 3 } Line { Labels [0, 0] SrcBlock "Atm Temp (K)" SrcPort 1 Points [65, 0] DstBlock "Combustion" DstPort 1 } Line { Labels [0, 0] SrcBlock "Atm Pressure(Pa)" SrcPort 1 Points [30, 0; 0, 15] DstBlock "Combustion" DstPort 2 } Line { SrcBlock "Theta" SrcPort 1 Points [15, 0] Branch { Labels [0, 0] Points [0, 110; 70, 0] DstBlock "Piston Position based on Geometry" DstPort 1 } Branch { Labels [0, 0] Points [345, 0; 0, 235] DstBlock "Combustion" DstPort 3 } } Line { SrcBlock "Piston Position based on Geometry" SrcPort 3 Points [30, 0; 0, 10] DstBlock "Combustion" DstPort 7 } Line { SrcBlock "Crank Offset" SrcPort 1 Points [95, 0; 0, 10] Branch { DstBlock "Piston Position based on Geometry" DstPort 2 } Branch { Points [0, 150] DstBlock "Combustion" DstPort 11 } } Line { SrcBlock "Bore" SrcPort 1 Points [15, 0] Branch { Points [20, 0] DstBlock "Piston Force" DstPort 1 } Branch { Points [0, 110] DstBlock "Combustion" DstPort 12 } } Line { SrcBlock "Omega" SrcPort 1 Points [120, 0] DstBlock "Combustion" DstPort 6 } Line { SrcBlock "Valve Lift" SrcPort 1 Points [45, 0] DstBlock "Combustion" DstPort 9 } Line { SrcBlock "Compression Ratio" SrcPort 1 Points [35, 0] DstBlock "Piston Position based on Geometry" DstPort 6 } Line { SrcBlock "Piston Position based on Geometry" SrcPort 2 DstBlock "Cyl Vol" DstPort 1 } Line { SrcBlock "Rod Length" SrcPort 1 Points [0, 10] DstBlock "Piston Position based on Geometry" DstPort 3 } Line { SrcBlock "Case Pressure" SrcPort 1 DstBlock "Piston Force" DstPort 2 } Line { SrcBlock "Fuel" SrcPort 1 Points [95, 0] DstBlock "Combustion" DstPort 8 } Line { SrcBlock "Valve Dia" SrcPort 1 Points [5, 0] DstBlock "Combustion" DstPort 10 } Line { SrcBlock "Spark Advance" SrcPort 1 DstBlock "Combustion" DstPort 14 } } } Block { BlockType Outport Name "Torque" Position [315, 123, 345, 137] IconDisplay "Port number" } Block { BlockType Outport Name "Cyl Vol" Position [315, 333, 345, 347] Port "2" IconDisplay "Port number" } Line { SrcBlock "Demux" SrcPort 1 DstBlock "Subsystem" DstPort 3 } Line { SrcBlock "Demux" SrcPort 2 DstBlock "Subsystem" DstPort 4 } Line { SrcBlock "Demux" SrcPort 3 DstBlock "Subsystem" DstPort 5 } Line { SrcBlock "Demux" SrcPort 4 DstBlock "Subsystem" DstPort 6 } Line { SrcBlock "Demux" SrcPort 5 DstBlock "Subsystem" DstPort 7 } Line { SrcBlock "Demux" SrcPort 6 DstBlock "Subsystem" DstPort 8 } Line { SrcBlock "Demux" SrcPort 7 DstBlock "Subsystem" DstPort 9 } Line { SrcBlock "Demux" SrcPort 8 DstBlock "Subsystem" DstPort 10 } Line { SrcBlock "Demux2" SrcPort 1 DstBlock "Subsystem" DstPort 1 } Line { SrcBlock "Demux2" SrcPort 2 DstBlock "Subsystem" DstPort 2 } Line { SrcBlock "Crank Mux" SrcPort 1 DstBlock "Demux2" DstPort 1 } Line { SrcBlock "Subsystem" SrcPort 1 DstBlock "Torque" DstPort 1 } Line { SrcBlock "Geo Mux" SrcPort 1 DstBlock "Demux" DstPort 1 } Line { SrcBlock "Subsystem" SrcPort 2 DstBlock "Cyl Vol" DstPort 1 } Line { SrcBlock "Spark Advance" SrcPort 1 Points [20, 0; 0, 5] DstBlock "Subsystem" DstPort 11 } } } Block { BlockType SubSystem Name "Cylinder1" Ports [3, 2] Position [540, 519, 665, 621] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Cylinder1" Location [792, 98, 1162, 568] 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 "Crank Mux" Position [25, 48, 55, 62] IconDisplay "Port number" } Block { BlockType Inport Name "Geo Mux" Position [65, 248, 95, 262] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Spark Advance" Position [60, 423, 90, 437] Port "3" IconDisplay "Port number" } Block { BlockType Demux Name "Demux" Ports [1, 8] Position [120, 95, 130, 415] ShowName off Outputs "8" DisplayOption "bar" } Block { BlockType Demux Name "Demux2" Ports [1, 2] Position [90, 15, 105, 95] ShowName off Outputs "2" DisplayOption "bar" } Block { BlockType SubSystem Name "Subsystem" Ports [11, 2] Position [175, 26, 290, 444] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Subsystem" Location [82, 210, 1347, 745] 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 "Omega" Position [715, 323, 745, 337] IconDisplay "Port number" } Block { BlockType Inport Name "Theta" Position [250, 38, 280, 52] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Crank Offset" Position [240, 220, 270, 235] Orientation "down" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Rod Length" Position [230, 268, 260, 282] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Bore" Position [25, 298, 55, 312] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Case Pressure" Position [35, 348, 65, 362] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "Compression Ratio" Position [320, 460, 350, 475] Orientation "up" Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "Fuel" Position [740, 353, 770, 367] Port "8" IconDisplay "Port number" } Block { BlockType Inport Name "Valve Lift" Position [790, 368, 820, 382] Port "9" IconDisplay "Port number" } Block { BlockType Inport Name "Valve Dia" Position [830, 383, 860, 397] Port "10" IconDisplay "Port number" } Block { BlockType Inport Name "Spark Advance" Position [815, 438, 845, 452] Port "11" IconDisplay "Port number" } Block { BlockType Constant Name "Atm Pressure(Pa)" Position [730, 235, 795, 265] Value "100000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Atm Temp (K)" Position [770, 180, 800, 210] Value "300" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Combustion" Ports [14, 1] Position [885, 233, 990, 462] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Combustion" Location [2, 82, 1413, 859] 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 "Atm Temp" Position [555, 78, 585, 92] IconDisplay "Port number" } Block { BlockType Inport Name "Atm Pressure" Position [490, 128, 520, 142] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Theta" Position [30, 65, 60, 80] Orientation "down" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Volume" Position [870, 148, 900, 162] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Torque" Position [295, 368, 325, 382] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Omega" Position [50, 393, 80, 407] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "Vc" Position [565, 143, 595, 157] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "Fuel" Position [1360, 593, 1390, 607] Port "8" IconDisplay "Port number" } Block { BlockType Inport Name "Valve Lift" Position [540, 753, 570, 767] Port "9" IconDisplay "Port number" } Block { BlockType Inport Name "Valve Dia" Position [535, 808, 565, 822] Port "10" IconDisplay "Port number" } Block { BlockType Inport Name "Half Crank" Position [90, 743, 120, 757] Port "11" IconDisplay "Port number" } Block { BlockType Inport Name "bore" Position [90, 798, 120, 812] Port "12" IconDisplay "Port number" } Block { BlockType Inport Name "piston Area" Position [90, 863, 120, 877] Port "13" IconDisplay "Port number" } Block { BlockType Inport Name "Spark Advance" Position [100, 178, 130, 192] Port "14" IconDisplay "Port number" } Block { BlockType Sum Name "Add Flow" Ports [4, 1] Position [1080, 637, 1125, 713] Inputs "-+-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add1" Ports [4, 1] Position [510, 390, 540, 440] Inputs "+-+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add4" Ports [2, 1] Position [695, 437, 725, 468] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Clock Name "Clock1" Position [90, 470, 110, 490] Decimation "10" } Block { BlockType SubSystem Name "Crank Duration\nSolver" Ports [4, 1] Position [190, 220, 265, 310] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Crank Duration\nSolver" Location [265, 289, 1153, 882] 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 "omega (rad/s)" Position [120, 23, 150, 37] IconDisplay "Port number" } Block { BlockType Inport Name "Sl (current m/s)" Position [100, 163, 130, 177] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Fuel" Position [100, 233, 130, 247] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Sl (current m/s)1" Position [130, 423, 160, 437] Port "4" IconDisplay "Port number" } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [210, 27, 240, 63] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide2" Ports [3, 1] Position [440, 62, 470, 98] Inputs "***" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide3" Ports [2, 1] Position [225, 97, 255, 133] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide4" Ports [2, 1] Position [240, 287, 270, 323] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide5" Ports [3, 1] Position [470, 322, 500, 358] Inputs "***" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide6" Ports [2, 1] Position [255, 357, 285, 393] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [680, 91, 685, 129] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Constant Name "Ref theta B (deg)" Position [225, 170, 290, 200] Value "47" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Ref theta B (deg)1" Position [255, 430, 320, 460] Value "25" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Reference lam flame speed" Position [105, 110, 170, 140] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Reference lam flame speed1" Position [110, 370, 175, 400] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Reference rad/s" Position [90, 60, 155, 90] Value "377" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Reference rad/s1" Position [85, 320, 150, 350] Value "130" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [720, 89, 750, 121] Floating off Location [346, 271, 1152, 602] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.62" YMax "0.84" SaveName "ScopeData5" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch1" Position [635, 225, 665, 255] Threshold ".5" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "U^(1/3)" Position [285, 30, 345, 60] Expr "u(1)^(1/3)" } Block { BlockType Fcn Name "U^(1/3)1" Position [300, 100, 360, 130] Expr "u(1)^(2/3)" } Block { BlockType Fcn Name "U^(1/3)2" Position [315, 290, 375, 320] Expr "u(1)^(1/3)" } Block { BlockType Fcn Name "U^(1/3)3" Position [330, 360, 390, 390] Expr "u(1)^(2/3)" } Block { BlockType Fcn Name "delay deg->rad1" Position [335, 170, 395, 200] Expr "(u(1)*2*pi()/360)" } Block { BlockType Fcn Name "delay deg->rad2" Position [365, 430, 425, 460] Expr "(u(1)*2*pi()/360)" } Block { BlockType Outport Name "Theta B" Position [710, 233, 740, 247] IconDisplay "Port number" } Line { SrcBlock "Mux" SrcPort 1 Points [5, 0; 0, -5] DstBlock "Scope1" DstPort 1 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Theta B" DstPort 1 } Line { SrcBlock "Reference lam flame speed1" SrcPort 1 Points [0, -20] DstBlock "Divide6" DstPort 1 } Line { SrcBlock "Sl (current m/s)1" SrcPort 1 Points [75, 0] DstBlock "Divide6" DstPort 2 } Line { SrcBlock "Divide5" SrcPort 1 Points [95, 0; 0, -90] Branch { Points [0, -130] DstBlock "Mux" DstPort 2 } Branch { DstBlock "Switch1" DstPort 3 } } Line { SrcBlock "Reference rad/s1" SrcPort 1 Points [0, -20] DstBlock "Divide4" DstPort 2 } Line { SrcBlock "Divide4" SrcPort 1 DstBlock "U^(1/3)2" DstPort 1 } Line { SrcBlock "U^(1/3)2" SrcPort 1 Points [30, 0; 0, 25] DstBlock "Divide5" DstPort 1 } Line { SrcBlock "Divide6" SrcPort 1 DstBlock "U^(1/3)3" DstPort 1 } Line { SrcBlock "U^(1/3)3" SrcPort 1 Points [15, 0; 0, -35] DstBlock "Divide5" DstPort 2 } Line { SrcBlock "Ref theta B (deg)1" SrcPort 1 DstBlock "delay deg->rad2" DstPort 1 } Line { SrcBlock "delay deg->rad2" SrcPort 1 Points [10, 0; 0, -95] DstBlock "Divide5" DstPort 3 } Line { SrcBlock "Fuel" SrcPort 1 DstBlock "Switch1" DstPort 2 } Line { SrcBlock "Reference lam flame speed" SrcPort 1 Points [0, -20] DstBlock "Divide3" DstPort 1 } Line { SrcBlock "Sl (current m/s)" SrcPort 1 Points [75, 0] DstBlock "Divide3" DstPort 2 } Line { SrcBlock "Divide2" SrcPort 1 Points [5, 0; 0, 150; 65, 0] Branch { Points [0, -130] DstBlock "Mux" DstPort 1 } Branch { DstBlock "Switch1" DstPort 1 } } Line { SrcBlock "omega (rad/s)" SrcPort 1 Points [0, 5; 25, 0] Branch { Points [5, 0; 0, 260] DstBlock "Divide4" DstPort 1 } Branch { DstBlock "Divide1" DstPort 1 } } Line { SrcBlock "Reference rad/s" SrcPort 1 Points [0, -20] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "U^(1/3)" DstPort 1 } Line { SrcBlock "U^(1/3)" SrcPort 1 Points [30, 0; 0, 25] DstBlock "Divide2" DstPort 1 } Line { SrcBlock "Divide3" SrcPort 1 DstBlock "U^(1/3)1" DstPort 1 } Line { SrcBlock "U^(1/3)1" SrcPort 1 Points [15, 0; 0, -35] DstBlock "Divide2" DstPort 2 } Line { SrcBlock "Ref theta B (deg)" SrcPort 1 DstBlock "delay deg->rad1" DstPort 1 } Line { SrcBlock "delay deg->rad1" SrcPort 1 Points [10, 0; 0, -95] DstBlock "Divide2" DstPort 3 } } } Block { BlockType SubSystem Name "CxHy Chem" Ports [3, 1] Position [775, 302, 845, 378] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "CxHy Chem" Location [206, 100, 1274, 795] 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 "R" Position [60, 48, 90, 62] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "%Burn" Position [385, 268, 415, 282] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "U" Position [60, 13, 90, 27] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [450, 227, 480, 258] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add1" Ports [2, 1] Position [595, 227, 625, 258] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Constant" Position [385, 195, 415, 225] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Embedded\nMATLAB (Reaction Balance)" Ports [0, 11] Position [25, 83, 115, 377] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB (Reaction Balance)" Location [257, 457, 812, 717] 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 Demux Name " Demux " Ports [1, 1] Position [270, 495, 320, 535] Outputs "1" } Block { BlockType Ground Name " Ground " Position [20, 306, 40, 324] } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 4" Ports [1, 12] Position [180, 144, 230, 486] FunctionName "sf_sfun" PortCounts "[1 12]" EnableBusSupport on Port { PortNumber 2 Name "Xch" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "Xo2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Xn2r" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "CHm" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "O2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "N2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 8 Name "Xco2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 9 Name "Xh2o" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 10 Name "Xn2p" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 11 Name "CO2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 12 Name "H2Om" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 506, 480, 524] } Block { BlockType Outport Name "Xch" Position [460, 101, 480, 119] IconDisplay "Port number" } Block { BlockType Outport Name "Xo2" Position [460, 136, 480, 154] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Xn2r" Position [460, 171, 480, 189] Port "3" IconDisplay "Port number" } Block { BlockType Outport Name "CHm" Position [460, 206, 480, 224] Port "4" IconDisplay "Port number" } Block { BlockType Outport Name "O2m" Position [460, 246, 480, 264] Port "5" IconDisplay "Port number" } Block { BlockType Outport Name "N2m" Position [460, 281, 480, 299] Port "6" IconDisplay "Port number" } Block { BlockType Outport Name "Xco2" Position [460, 316, 480, 334] Port "7" IconDisplay "Port number" } Block { BlockType Outport Name "Xh2o" Position [460, 351, 480, 369] Port "8" IconDisplay "Port number" } Block { BlockType Outport Name "Xn2p" Position [460, 386, 480, 404] Port "9" IconDisplay "Port number" } Block { BlockType Outport Name "CO2m" Position [460, 426, 480, 444] Port "10" IconDisplay "Port number" } Block { BlockType Outport Name "H2Om" Position [460, 461, 480, 479] Port "11" IconDisplay "Port number" } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { SrcBlock " Ground " SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { Name "H2Om" Labels [0, 0] SrcBlock " SFunction " SrcPort 12 DstBlock "H2Om" DstPort 1 } Line { Name "CO2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 11 DstBlock "CO2m" DstPort 1 } Line { Name "Xn2p" Labels [0, 0] SrcBlock " SFunction " SrcPort 10 DstBlock "Xn2p" DstPort 1 } Line { Name "Xh2o" Labels [0, 0] SrcBlock " SFunction " SrcPort 9 DstBlock "Xh2o" DstPort 1 } Line { Name "Xco2" Labels [0, 0] SrcBlock " SFunction " SrcPort 8 DstBlock "Xco2" DstPort 1 } Line { Name "N2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 7 DstBlock "N2m" DstPort 1 } Line { Name "O2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 6 DstBlock "O2m" DstPort 1 } Line { Name "CHm" Labels [0, 0] SrcBlock " SFunction " SrcPort 5 DstBlock "CHm" DstPort 1 } Line { Name "Xn2r" Labels [0, 0] SrcBlock " SFunction " SrcPort 4 DstBlock "Xn2r" DstPort 1 } Line { Name "Xo2" Labels [0, 0] SrcBlock " SFunction " SrcPort 3 DstBlock "Xo2" DstPort 1 } Line { Name "Xch" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Xch" DstPort 1 } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } } } Block { BlockType SubSystem Name "Embedded\nMATLAB Post Combustion" Ports [8, 1] Position [285, 264, 355, 446] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB Post Combustion" Location [257, 457, 812, 717] 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 "U" Position [20, 101, 40, 119] IconDisplay "Port number" } Block { BlockType Inport Name "R" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "N2m" Position [20, 171, 40, 189] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Xco2" Position [20, 206, 40, 224] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Xh2o" Position [20, 246, 40, 264] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Xn2p" Position [20, 281, 40, 299] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "CO2m" Position [20, 316, 40, 334] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "H2Om" Position [20, 351, 40, 369] Port "8" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 325, 320, 365] Outputs "1" } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 6" Ports [8, 2] Position [180, 121, 230, 324] FunctionName "sf_sfun" PortCounts "[8 2]" EnableBusSupport on Port { PortNumber 2 Name "Tp" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 336, 480, 354] } Block { BlockType Outport Name "Tp" Position [460, 101, 480, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { Name "Tp" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Tp" DstPort 1 } Line { SrcBlock "H2Om" SrcPort 1 DstBlock " SFunction " DstPort 8 } Line { SrcBlock "CO2m" SrcPort 1 DstBlock " SFunction " DstPort 7 } Line { SrcBlock "Xn2p" SrcPort 1 DstBlock " SFunction " DstPort 6 } Line { SrcBlock "Xh2o" SrcPort 1 DstBlock " SFunction " DstPort 5 } Line { SrcBlock "Xco2" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "N2m" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 3 } Line { SrcBlock "R" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { SrcBlock "U" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } } } Block { BlockType SubSystem Name "Embedded\nMATLAB Pre Combustion" Ports [8, 1] Position [285, 47, 355, 223] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB Pre Combustion" Location [257, 457, 812, 717] 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 "U" Position [20, 101, 40, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "R" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Xch" Position [20, 171, 40, 189] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Xo2" Position [20, 206, 40, 224] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Xn2r" Position [20, 246, 40, 264] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "CHm" Position [20, 281, 40, 299] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "O2m" Position [20, 316, 40, 334] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "N2m" Position [20, 351, 40, 369] Port "8" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 325, 320, 365] Outputs "1" } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 9" Ports [8, 2] Position [180, 121, 230, 324] FunctionName "sf_sfun" PortCounts "[8 2]" EnableBusSupport on Port { PortNumber 2 Name "Tr" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 336, 480, 354] } Block { BlockType Outport Name "Tr" Position [460, 101, 480, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { Name "Tr" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Tr" DstPort 1 } Line { SrcBlock "N2m" SrcPort 1 DstBlock " SFunction " DstPort 8 } Line { SrcBlock "O2m" SrcPort 1 DstBlock " SFunction " DstPort 7 } Line { SrcBlock "CHm" SrcPort 1 DstBlock " SFunction " DstPort 6 } Line { SrcBlock "Xn2r" SrcPort 1 DstBlock " SFunction " DstPort 5 } Line { SrcBlock "Xo2" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "Xch" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 3 } Line { SrcBlock "R" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { SrcBlock "U" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } } } Block { BlockType Product Name "Product" Ports [2, 1] Position [520, 127, 550, 158] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [490, 332, 520, 363] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Tout" Position [675, 238, 705, 252] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 11 Points [0, 70] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 8 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 10 Points [35, 0; 0, 75] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 7 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 9 Points [50, 0; 0, 80] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 6 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 8 Points [65, 0; 0, 85] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 5 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 6 Points [95, 0] Branch { Points [0, 95] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 3 } Branch { Points [0, -25] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 8 } } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 5 Points [35, 0; 0, -20] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 7 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 4 Points [25, 0; 0, -15] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 6 } Line { SrcBlock "U" SrcPort 1 Points [105, 0; 0, 50; 45, 0] Branch { Points [0, 215] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 1 } Branch { Points [25, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 1 } } Line { SrcBlock "R" SrcPort 1 Points [85, 0; 0, 35; 50, 0] Branch { Points [0, 215] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 2 } Branch { Points [40, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 2 } } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 7 Points [80, 0; 0, 90] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 4 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 3 Points [0, -10] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 5 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 2 Points [150, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 4 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 1 DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 3 } Line { SrcBlock "Add1" SrcPort 1 DstBlock "Tout" DstPort 1 } Line { SrcBlock "Product1" SrcPort 1 Points [45, 0; 0, -100] DstBlock "Add1" DstPort 2 } Line { SrcBlock "Product" SrcPort 1 Points [15, 0; 0, 90] DstBlock "Add1" DstPort 1 } Line { SrcBlock "Embedded\nMATLAB Post Combustion" SrcPort 1 DstBlock "Product1" DstPort 2 } Line { SrcBlock "Embedded\nMATLAB Pre Combustion" SrcPort 1 DstBlock "Product" DstPort 1 } Line { SrcBlock "Add" SrcPort 1 Points [5, 0; 0, -95] DstBlock "Product" DstPort 2 } Line { SrcBlock "%Burn" SrcPort 1 Points [0, 0] Branch { Points [10, 0; 0, 65] DstBlock "Product1" DstPort 1 } Branch { Points [10, 0; 0, -25] DstBlock "Add" DstPort 2 } } Line { SrcBlock "Constant" SrcPort 1 Points [10, 0; 0, 25] DstBlock "Add" DstPort 1 } } } Block { BlockType Product Name "Divide" Ports [2, 1] Position [615, 407, 645, 443] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType SubSystem Name "Energy" Ports [3, 2] Position [1450, 524, 1520, 616] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Energy" Location [209, 88, 1231, 811] 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 "Theta" Position [15, 403, 45, 417] IconDisplay "Port number" } Block { BlockType Inport Name "M" Position [15, 28, 45, 42] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Fuel" Position [105, 563, 135, 577] Port "3" IconDisplay "Port number" } Block { BlockType Constant Name "CONST" Position [85, 490, 115, 520] Value "pi()" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Display Name "Display" Ports [1] Position [700, 30, 790, 60] Decimation "1" Lockdown off } Block { BlockType Display Name "Display1" Ports [1] Position [820, 220, 910, 250] Decimation "1" Lockdown off } Block { BlockType Product Name "Divide" Ports [2, 1] Position [310, 32, 340, 63] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [405, 42, 435, 73] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide2" Ports [2, 1] Position [480, 52, 510, 83] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide3" Ports [2, 1] Position [390, 287, 420, 318] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide4" Ports [2, 1] Position [485, 297, 515, 328] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide5" Ports [2, 1] Position [560, 307, 590, 338] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Energy Relased gas" Position [435, 207, 515, 233] Value "5324540000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Energy Relased h2" Position [515, 462, 595, 488] Value "241820000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Molar Mass" Position [225, 115, 270, 145] Value "30.2619" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Molar Mass1" Position [235, 355, 275, 385] Value "20.9" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Moles \n1/TotalMoles of O2 in Air" Position [305, 150, 335, 180] Value "4.76" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Moles \nTotalMoles of O2 in Air1" Position [370, 405, 400, 435] Value "6.76" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Mux Name "Mux1" Ports [3, 1] Position [820, 326, 830, 374] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Constant Name "O2 per mole gas" Position [390, 145, 420, 175] Value "12.5" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "O2 per mole gas1" Position [485, 400, 515, 430] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "Product" Ports [2, 1] Position [580, 62, 610, 93] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [660, 317, 690, 348] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [170, 477, 200, 508] InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Reference Name "Sample\nand Hold" Ports [1, 1, 0, 1] Position [160, 84, 210, 126] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Rising edge" initCond "0" latchinput "off" } Block { BlockType Reference Name "Sample\nand Hold1" Ports [1, 1, 0, 1] Position [140, 274, 190, 316] SourceBlock "dspsigops/Sample\nand Hold" SourceType "Sample and Hold" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData "off" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" trig "Rising edge" initCond "0" latchinput "off" } Block { BlockType Scope Name "Scope" Ports [1] Position [870, 334, 900, 366] Floating off Location [90, 491, 963, 817] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1050" SaveName "ScopeData7" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [825, 604, 855, 636] Floating off Location [418, 398, 1291, 778] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "27.5215" YMax "30.4185" SaveName "ScopeData22" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [925, 439, 955, 471] Floating off Location [26, 482, 899, 863] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "1020.97" YMax "1128.43" SaveName "ScopeData23" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [805, 555, 835, 585] Threshold ".5" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch1" Position [720, 645, 750, 675] Threshold ".5" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "E" Position [895, 563, 925, 577] IconDisplay "Port number" } Block { BlockType Outport Name "Mmass" Position [930, 668, 960, 682] Port "2" IconDisplay "Port number" } Line { SrcBlock "Switch1" SrcPort 1 Points [20, 0] Branch { Points [0, 15] DstBlock "Mmass" DstPort 1 } Branch { Points [0, -40] DstBlock "Scope1" DstPort 1 } } Line { SrcBlock "Switch" SrcPort 1 Points [15, 0] Branch { Points [0, -115] DstBlock "Scope2" DstPort 1 } Branch { DstBlock "E" DstPort 1 } } Line { SrcBlock "Fuel" SrcPort 1 Points [475, 0] Branch { Points [0, 90] DstBlock "Switch1" DstPort 2 } Branch { DstBlock "Switch" DstPort 2 } } Line { SrcBlock "Sample\nand Hold1" SrcPort 1 DstBlock "Divide3" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [15, 0; 0, -275] Branch { Points [-55, 0] DstBlock "Sample\nand Hold1" DstPort trigger } Branch { Points [0, -151] DstBlock "Sample\nand Hold" DstPort trigger } } Line { SrcBlock "Theta" SrcPort 1 Points [50, 0; 0, 75] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "CONST" SrcPort 1 Points [15, 0; 0, -5] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Sample\nand Hold" SrcPort 1 Points [30, 0; 0, -65] DstBlock "Divide" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Scope" DstPort 1 } Line { SrcBlock "Product" SrcPort 1 Points [55, 0] Branch { Points [0, -35] DstBlock "Display" DstPort 1 } Branch { Points [110, 0; 0, 255] Branch { Points [0, 225] DstBlock "Switch" DstPort 1 } Branch { DstBlock "Mux1" DstPort 1 } } } Line { SrcBlock "Product1" SrcPort 1 Points [10, 0] Branch { Points [0, -100] DstBlock "Display1" DstPort 1 } Branch { Points [35, 0; 0, 15] Branch { Points [0, 230] DstBlock "Switch" DstPort 3 } Branch { DstBlock "Mux1" DstPort 2 } } } Line { SrcBlock "Energy Relased h2" SrcPort 1 Points [20, 0; 0, -135] DstBlock "Product1" DstPort 2 } Line { SrcBlock "Divide5" SrcPort 1 DstBlock "Product1" DstPort 1 } Line { SrcBlock "O2 per mole gas1" SrcPort 1 Points [25, 0] DstBlock "Divide5" DstPort 2 } Line { SrcBlock "Divide4" SrcPort 1 DstBlock "Divide5" DstPort 1 } Line { SrcBlock "Moles \nTotalMoles of O2 in Air1" SrcPort 1 Points [20, 0; 0, -100] DstBlock "Divide4" DstPort 2 } Line { SrcBlock "Divide3" SrcPort 1 DstBlock "Divide4" DstPort 1 } Line { SrcBlock "Molar Mass1" SrcPort 1 Points [25, 0] Branch { Points [0, 300] DstBlock "Switch1" DstPort 3 } Branch { Points [40, 0; 0, -60] DstBlock "Divide3" DstPort 2 } } Line { SrcBlock "Energy Relased gas" SrcPort 1 Points [20, 0; 0, -135] DstBlock "Product" DstPort 2 } Line { SrcBlock "Divide2" SrcPort 1 DstBlock "Product" DstPort 1 } Line { SrcBlock "O2 per mole gas" SrcPort 1 Points [25, 0; 0, -85] DstBlock "Divide2" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Divide2" DstPort 1 } Line { SrcBlock "Moles \n1/TotalMoles of O2 in Air" SrcPort 1 Points [5, 0; 0, -100] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "Divide" SrcPort 1 DstBlock "Divide1" DstPort 1 } Line { SrcBlock "Molar Mass" SrcPort 1 Points [0, -75; 10, 0] Branch { Points [0, 595] DstBlock "Switch1" DstPort 1 } Branch { DstBlock "Divide" DstPort 2 } } Line { SrcBlock "M" SrcPort 1 Points [5, 0; 0, 70] Branch { Points [0, 190] DstBlock "Sample\nand Hold1" DstPort 1 } Branch { DstBlock "Sample\nand Hold" DstPort 1 } } } } Block { BlockType Integrator Name "Exhaust E intergrator" Ports [2, 1] Position [1165, 836, 1205, 894] ExternalReset "falling" LowerSaturationLimit "0" } Block { BlockType SubSystem Name "Exhaust Mdot Calculator" Ports [7, 1] Position [875, 551, 1015, 639] NamePlacement "alternate" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Exhaust Mdot Calculator" Location [202, 131, 1377, 693] 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 "Crank Angle" Position [45, 233, 75, 247] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cylinder Pressure1" Position [510, 228, 540, 242] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "ex pressure" Position [505, 288, 535, 302] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cyl temp" Position [510, 348, 540, 362] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "M mass" Position [275, 443, 305, 457] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve Lift" Position [215, 163, 245, 177] Port "6" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve Dia" Position [190, 103, 220, 117] Port "7" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "A" Ports [2, 1] Position [385, 397, 415, 428] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Choke" Position [705, 100, 765, 130] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(7)))*(2/(u(7)+1))^((u(7)+1)/(2*(u(7)-1)))" } Block { BlockType Constant Name "Constant1" Position [505, 100, 535, 130] Value ".6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant7" Position [505, 460, 535, 490] Value "1.35" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Fcn Name "Fcn" Position [705, 340, 765, 370] Expr "(2/(u(7)+1))^(u(7)/(u(7)-1))" } Block { BlockType Fcn Name "Fcn1" Position [475, 160, 535, 190] Expr "u(1)*pi" } Block { BlockType Fcn Name "Fcn2" Position [180, 294, 285, 326] Expr "-sin(u(1))" } Block { BlockType SubSystem Name "Lift ex" Ports [1, 1] Position [155, 219, 260, 261] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lift ex" Location [375, 376, 1095, 734] 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 "Crank Angle" Position [75, 188, 105, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "On" Position [200, 140, 230, 170] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Switch1" Position [410, 180, 440, 210] Threshold "4*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [295, 180, 325, 210] Threshold "3*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "off" Position [190, 225, 220, 255] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Lift" Position [495, 188, 525, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Crank Angle" SrcPort 1 Points [140, 0] Branch { DstBlock "Switch2" DstPort 2 } Branch { Points [0, 40; 145, 0] DstBlock "Switch1" DstPort 2 } } Line { SrcBlock "off" SrcPort 1 Points [10, 0] Branch { Points [0, -35] DstBlock "Switch2" DstPort 3 } Branch { Points [0, 10; 120, 0; 0, -65] DstBlock "Switch1" DstPort 1 } } Line { SrcBlock "On" SrcPort 1 Points [25, 0; 0, 30] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Lift" DstPort 1 } Line { SrcBlock "Switch2" SrcPort 1 Points [25, 0; 0, 10] DstBlock "Switch1" DstPort 3 } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [630, 86, 635, 504] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [345, 316, 350, 354] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "No Choke" Position [705, 460, 765, 490] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(4)/u(3)))*sqrt((2*u(7)/(u(7)-1))*(1-(u(4)/u(3))^((u(7)-1)/u(" "7))))" } Block { BlockType Product Name "Product" Ports [3, 1] Position [410, 159, 440, 191] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [350, 261, 380, 294] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pt/Po" Position [705, 215, 765, 245] Expr "u(4)/u(3)" } Block { BlockType Constant Name "R" Position [275, 385, 305, 415] Value "8314" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [830, 277, 860, 308] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope" Ports [1] Position [1000, 199, 1030, 231] Floating off Location [6, 46, 1430, 869] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.0075" YMax "0.0475" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [385, 309, 415, 341] Floating off Location [147, 479, 782, 821] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData20" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [905, 280, 935, 310] Criteria "u2 > Threshold" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Exhaust Mdot" Position [1025, 288, 1055, 302] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Product1" SrcPort 1 Points [5, 0; 0, -95] DstBlock "Product" DstPort 3 } Line { SrcBlock "Lift ex" SrcPort 1 Points [35, 0; 0, 30] Branch { DstBlock "Product1" DstPort 1 } Branch { Points [0, 75] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Mux1" SrcPort 1 Points [5, 0; 0, -10] DstBlock "Scope2" DstPort 1 } Line { SrcBlock "Fcn2" SrcPort 1 Points [20, 0; 0, 15; 15, 0] Branch { Points [0, -40] DstBlock "Product1" DstPort 2 } Branch { DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [40, 0] Branch { Points [0, 70] DstBlock "Fcn2" DstPort 1 } Branch { DstBlock "Lift ex" DstPort 1 } } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "M mass" SrcPort 1 Points [50, 0; 0, -30] DstBlock "A" DstPort 2 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, 5] DstBlock "A" DstPort 1 } Line { Labels [0, 0] SrcBlock "Fcn1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { Points [0, -80] DstBlock "Scope" DstPort 1 } Branch { DstBlock "Exhaust Mdot" DstPort 1 } } Line { SrcBlock "Product" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Valve Dia" SrcPort 1 Points [115, 0; 0, 55] DstBlock "Product" DstPort 1 } Line { SrcBlock "Valve Lift" SrcPort 1 Points [145, 0] DstBlock "Product" DstPort 2 } Line { SrcBlock "No Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Fcn" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Pt/Po" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0] Branch { Points [0, -65] Branch { Points [0, -115] DstBlock "Choke" DstPort 1 } Branch { DstBlock "Pt/Po" DstPort 1 } } Branch { Points [0, 60] Branch { Points [0, 120] DstBlock "No Choke" DstPort 1 } Branch { DstBlock "Fcn" DstPort 1 } } } Line { SrcBlock "Constant7" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Cyl temp" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "ex pressure" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Cylinder Pressure1" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Mux" DstPort 1 } Annotation { Name "If Choke, output 1" Position [846, 259] } Annotation { Name "gamma" Position [472, 476] } Annotation { Name "R" Position [495, 410] } Annotation { Name "Ar" Position [595, 168] } Annotation { Name "Cd" Position [493, 114] } } } Block { BlockType SubSystem Name "Exhaust Mdot Calculator1" Ports [7, 1] Position [960, 441, 1100, 529] NamePlacement "alternate" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Exhaust Mdot Calculator1" Location [202, 131, 1377, 693] 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 "Crank Angle" Position [45, 233, 75, 247] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cylinder Pressure1" Position [510, 228, 540, 242] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "ex pressure" Position [505, 288, 535, 302] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cyl temp" Position [510, 348, 540, 362] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "M mass" Position [275, 443, 305, 457] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve Lift" Position [215, 163, 245, 177] Port "6" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve Dia" Position [190, 103, 220, 117] Port "7" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "A" Ports [2, 1] Position [385, 397, 415, 428] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Choke" Position [705, 100, 765, 130] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(7)))*(2/(u(7)+1))^((u(7)+1)/(2*(u(7)-1)))" } Block { BlockType Constant Name "Constant1" Position [505, 100, 535, 130] Value ".6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant7" Position [505, 460, 535, 490] Value "1.35" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Fcn Name "Fcn" Position [705, 340, 765, 370] Expr "(2/(u(7)+1))^(u(7)/(u(7)-1))" } Block { BlockType Fcn Name "Fcn1" Position [475, 160, 535, 190] Expr "u(1)*pi" } Block { BlockType Fcn Name "Fcn2" Position [180, 294, 285, 326] Expr "-sin(u(1))" } Block { BlockType SubSystem Name "Lift ex" Ports [1, 1] Position [155, 219, 260, 261] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lift ex" Location [375, 376, 1095, 734] 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 "Crank Angle" Position [75, 188, 105, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "On" Position [200, 140, 230, 170] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Switch1" Position [410, 180, 440, 210] Threshold "4*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [295, 180, 325, 210] Threshold "3*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "off" Position [190, 225, 220, 255] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Lift" Position [495, 188, 525, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Switch2" SrcPort 1 Points [25, 0; 0, 10] DstBlock "Switch1" DstPort 3 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Lift" DstPort 1 } Line { SrcBlock "On" SrcPort 1 Points [25, 0; 0, 30] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "off" SrcPort 1 Points [10, 0] Branch { Points [0, 10; 120, 0; 0, -65] DstBlock "Switch1" DstPort 1 } Branch { Points [0, -35] DstBlock "Switch2" DstPort 3 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [140, 0] Branch { Points [0, 40; 145, 0] DstBlock "Switch1" DstPort 2 } Branch { DstBlock "Switch2" DstPort 2 } } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [630, 86, 635, 504] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [345, 316, 350, 354] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "No Choke" Position [705, 460, 765, 490] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(4)/u(3)))*sqrt((2*u(7)/(u(7)-1))*(1-(u(4)/u(3))^((u(7)-1)/u(" "7))))" } Block { BlockType Product Name "Product" Ports [3, 1] Position [410, 159, 440, 191] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [350, 261, 380, 294] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pt/Po" Position [705, 215, 765, 245] Expr "u(4)/u(3)" } Block { BlockType Constant Name "R" Position [275, 385, 305, 415] Value "8314" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [830, 277, 860, 308] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope" Ports [1] Position [1000, 199, 1030, 231] Floating off Location [6, 46, 1430, 869] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.0075" YMax "0.0475" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [385, 309, 415, 341] Floating off Location [147, 479, 782, 821] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData20" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [905, 280, 935, 310] Criteria "u2 > Threshold" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Exhaust Mdot" Position [1025, 288, 1055, 302] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Cylinder Pressure1" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "ex pressure" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Cyl temp" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "Constant7" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0] Branch { Points [0, 60] Branch { DstBlock "Fcn" DstPort 1 } Branch { Points [0, 120] DstBlock "No Choke" DstPort 1 } } Branch { Points [0, -65] Branch { DstBlock "Pt/Po" DstPort 1 } Branch { Points [0, -115] DstBlock "Choke" DstPort 1 } } } Line { SrcBlock "Pt/Po" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 1 } Line { SrcBlock "No Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Valve Lift" SrcPort 1 Points [145, 0] DstBlock "Product" DstPort 2 } Line { SrcBlock "Valve Dia" SrcPort 1 Points [115, 0; 0, 55] DstBlock "Product" DstPort 1 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { DstBlock "Exhaust Mdot" DstPort 1 } Branch { Points [0, -80] DstBlock "Scope" DstPort 1 } } Line { Labels [0, 0] SrcBlock "Fcn1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, 5] DstBlock "A" DstPort 1 } Line { SrcBlock "M mass" SrcPort 1 Points [50, 0; 0, -30] DstBlock "A" DstPort 2 } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "Crank Angle" SrcPort 1 Points [40, 0] Branch { DstBlock "Lift ex" DstPort 1 } Branch { Points [0, 70] DstBlock "Fcn2" DstPort 1 } } Line { SrcBlock "Fcn2" SrcPort 1 Points [20, 0; 0, 15; 15, 0] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [0, -40] DstBlock "Product1" DstPort 2 } } Line { SrcBlock "Mux1" SrcPort 1 Points [5, 0; 0, -10] DstBlock "Scope2" DstPort 1 } Line { SrcBlock "Lift ex" SrcPort 1 Points [35, 0; 0, 30] Branch { Points [0, 75] DstBlock "Mux1" DstPort 2 } Branch { DstBlock "Product1" DstPort 1 } } Line { SrcBlock "Product1" SrcPort 1 Points [5, 0; 0, -95] DstBlock "Product" DstPort 3 } Annotation { Name "Cd" Position [493, 114] } Annotation { Name "Ar" Position [595, 168] } Annotation { Name "R" Position [495, 410] } Annotation { Name "gamma" Position [472, 476] } Annotation { Name "If Choke, output 1" Position [846, 259] } } } Block { BlockType Sum Name "Flow\nEnergy" Ports [2, 1] Position [1340, 817, 1370, 848] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType SubSystem Name "H Chem1" Ports [3, 1] Position [775, 392, 840, 478] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "H Chem1" Location [84, 164, 1295, 789] 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 "R" Position [95, 103, 125, 117] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "%Burn" Position [420, 323, 450, 337] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "U" Position [95, 68, 125, 82] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [485, 282, 515, 313] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Add1" Ports [2, 1] Position [630, 282, 660, 313] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Constant" Position [420, 250, 450, 280] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Embedded\nMATLAB (Reaction Balance)" Ports [0, 9] Position [80, 138, 170, 432] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB (Reaction Balance)" Location [257, 457, 812, 717] 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 Demux Name " Demux " Ports [1, 1] Position [270, 490, 320, 530] Outputs "1" } Block { BlockType Ground Name " Ground " Position [20, 306, 40, 324] } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 10" Ports [1, 10] Position [180, 146, 230, 489] FunctionName "sf_sfun" PortCounts "[1 10]" EnableBusSupport on Port { PortNumber 2 Name "Xh2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 3 Name "Xo2" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 4 Name "Xn2r" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 5 Name "H2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 6 Name "O2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 7 Name "N2m" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 8 Name "Xh2o" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 9 Name "Xn2p" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 10 Name "H2Om" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 501, 480, 519] } Block { BlockType Outport Name "Xh2" Position [460, 101, 480, 119] IconDisplay "Port number" } Block { BlockType Outport Name "Xo2" Position [460, 136, 480, 154] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Xn2r" Position [460, 171, 480, 189] Port "3" IconDisplay "Port number" } Block { BlockType Outport Name "H2m" Position [460, 206, 480, 224] Port "4" IconDisplay "Port number" } Block { BlockType Outport Name "O2m" Position [460, 246, 480, 264] Port "5" IconDisplay "Port number" } Block { BlockType Outport Name "N2m" Position [460, 281, 480, 299] Port "6" IconDisplay "Port number" } Block { BlockType Outport Name "Xh2o" Position [460, 316, 480, 334] Port "7" IconDisplay "Port number" } Block { BlockType Outport Name "Xn2p" Position [460, 351, 480, 369] Port "8" IconDisplay "Port number" } Block { BlockType Outport Name "H2Om" Position [460, 386, 480, 404] Port "9" IconDisplay "Port number" } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { SrcBlock " Ground " SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 1 } Line { Name "H2Om" Labels [0, 0] SrcBlock " SFunction " SrcPort 10 DstBlock "H2Om" DstPort 1 } Line { Name "Xn2p" Labels [0, 0] SrcBlock " SFunction " SrcPort 9 DstBlock "Xn2p" DstPort 1 } Line { Name "Xh2o" Labels [0, 0] SrcBlock " SFunction " SrcPort 8 DstBlock "Xh2o" DstPort 1 } Line { Name "N2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 7 DstBlock "N2m" DstPort 1 } Line { Name "O2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 6 DstBlock "O2m" DstPort 1 } Line { Name "H2m" Labels [0, 0] SrcBlock " SFunction " SrcPort 5 DstBlock "H2m" DstPort 1 } Line { Name "Xn2r" Labels [0, 0] SrcBlock " SFunction " SrcPort 4 DstBlock "Xn2r" DstPort 1 } Line { Name "Xo2" Labels [0, 0] SrcBlock " SFunction " SrcPort 3 DstBlock "Xo2" DstPort 1 } Line { Name "Xh2" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Xh2" DstPort 1 } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } } } Block { BlockType SubSystem Name "Embedded\nMATLAB Post Combustion" Ports [6, 1] Position [320, 316, 390, 494] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB Post Combustion" Location [257, 457, 812, 717] 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 "U" Position [20, 101, 40, 119] IconDisplay "Port number" } Block { BlockType Inport Name "R" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "N2m" Position [20, 171, 40, 189] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Xh2o" Position [20, 206, 40, 224] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Xn2p" Position [20, 246, 40, 264] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "H2Om" Position [20, 281, 40, 299] Port "6" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 330, 320, 370] Outputs "1" } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 11" Ports [6, 2] Position [180, 125, 230, 330] FunctionName "sf_sfun" PortCounts "[6 2]" EnableBusSupport on Port { PortNumber 2 Name "Tp" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 341, 480, 359] } Block { BlockType Outport Name "Tp" Position [460, 101, 480, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { Name "Tp" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Tp" DstPort 1 } Line { SrcBlock "H2Om" SrcPort 1 DstBlock " SFunction " DstPort 6 } Line { SrcBlock "Xn2p" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 5 } Line { SrcBlock "Xh2o" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "N2m" SrcPort 1 DstBlock " SFunction " DstPort 3 } Line { SrcBlock "R" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { SrcBlock "U" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } } } Block { BlockType SubSystem Name "Embedded\nMATLAB Pre Combustion" Ports [8, 1] Position [320, 101, 390, 279] PermitHierarchicalResolution "ExplicitOnly" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskDisplay "disp('fcn');" MaskSelfModifiable on MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Embedded\nMATLAB Pre Combustion" Location [257, 457, 812, 717] 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 "U" Position [20, 101, 40, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "R" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Xh2" Position [20, 171, 40, 189] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Xo2" Position [20, 206, 40, 224] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Xn2r" Position [20, 246, 40, 264] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "H2m" Position [20, 281, 40, 299] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "O2m" Position [20, 316, 40, 334] Port "7" IconDisplay "Port number" } Block { BlockType Inport Name "N2m" Position [20, 351, 40, 369] Port "8" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " Ports [1, 1] Position [270, 325, 320, 365] Outputs "1" } Block { BlockType "S-Function" Name " SFunction " Tag "Stateflow S-Function FerrariV8 12" Ports [8, 2] Position [180, 121, 230, 324] FunctionName "sf_sfun" PortCounts "[8 2]" EnableBusSupport on Port { PortNumber 2 Name "Tr" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " Position [460, 336, 480, 354] } Block { BlockType Outport Name "Tr" Position [460, 101, 480, 119] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { Name "Tr" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "Tr" DstPort 1 } Line { SrcBlock "N2m" SrcPort 1 DstBlock " SFunction " DstPort 8 } Line { SrcBlock "O2m" SrcPort 1 DstBlock " SFunction " DstPort 7 } Line { SrcBlock "H2m" SrcPort 1 DstBlock " SFunction " DstPort 6 } Line { SrcBlock "Xn2r" SrcPort 1 DstBlock " SFunction " DstPort 5 } Line { SrcBlock "Xo2" SrcPort 1 DstBlock " SFunction " DstPort 4 } Line { SrcBlock "Xh2" SrcPort 1 Points [120, 0] DstBlock " SFunction " DstPort 3 } Line { SrcBlock "R" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { SrcBlock "U" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [785, 276, 790, 314] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Product Name "Product" Ports [2, 1] Position [555, 187, 585, 218] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [525, 377, 555, 408] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Scope Name "Scope3" Ports [1] Position [490, 454, 520, 486] Floating off Location [501, 381, 1435, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "3250" SaveName "ScopeData8" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope5" Ports [1] Position [830, 279, 860, 311] Floating off Location [89, 153, 1023, 666] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "3250" SaveName "ScopeData11" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Outport Name "Tout" Position [700, 293, 730, 307] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Scope5" DstPort 1 } Line { SrcBlock "Add1" SrcPort 1 DstBlock "Tout" DstPort 1 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 9 Points [20, 0; 0, 75] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 6 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 8 Points [35, 0; 0, 75] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 5 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 7 Points [65, 0; 0, 75] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 4 } Line { SrcBlock "U" SrcPort 1 Points [105, 0; 0, 50; 50, 0] Branch { Points [0, 205] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 1 } Branch { Points [20, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 1 } } Line { SrcBlock "R" SrcPort 1 Points [80, 0; 0, 35; 60, 0] Branch { Points [0, 215] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 2 } Branch { Points [35, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 2 } } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 6 Points [40, 0; 0, -50; 45, 0] Branch { Points [0, 125] DstBlock "Embedded\nMATLAB Post Combustion" DstPort 3 } Branch { Points [45, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 8 } } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 5 Points [35, 0; 0, -40; 95, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 7 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 4 Points [25, 0; 0, -35] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 6 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 3 Points [20, 0; 0, -25] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 5 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 2 Points [0, -15] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 4 } Line { SrcBlock "Embedded\nMATLAB (Reaction Balance)" SrcPort 1 Points [130, 0] DstBlock "Embedded\nMATLAB Pre Combustion" DstPort 3 } Line { SrcBlock "Constant" SrcPort 1 Points [10, 0; 0, 25] DstBlock "Add" DstPort 1 } Line { SrcBlock "%Burn" SrcPort 1 Points [0, 0] Branch { Points [10, 0; 0, 55; 10, 0] Branch { DstBlock "Scope3" DstPort 1 } Branch { DstBlock "Product1" DstPort 1 } } Branch { Points [10, 0; 0, -25] DstBlock "Add" DstPort 2 } } Line { SrcBlock "Add" SrcPort 1 Points [5, 0; 0, -90] DstBlock "Product" DstPort 2 } Line { SrcBlock "Embedded\nMATLAB Pre Combustion" SrcPort 1 Points [0, 5] DstBlock "Product" DstPort 1 } Line { SrcBlock "Embedded\nMATLAB Post Combustion" SrcPort 1 Points [115, 0] DstBlock "Product1" DstPort 2 } Line { SrcBlock "Product" SrcPort 1 Points [15, 0] Branch { Points [0, -50; 165, 0] DstBlock "Mux" DstPort 1 } Branch { Points [10, 0] DstBlock "Add1" DstPort 1 } } Line { SrcBlock "Product1" SrcPort 1 Points [30, 0] Branch { Labels [3, 0] Points [0, 30; 165, 0; 0, -120] DstBlock "Mux" DstPort 2 } Branch { Points [25, 0] DstBlock "Add1" DstPort 2 } } } } Block { BlockType SubSystem Name "Heat Transfer" Ports [7, 1] Position [310, 744, 415, 856] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Heat Transfer" Location [150, 249, 1104, 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.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "omega" Position [60, 13, 90, 27] IconDisplay "Port number" } Block { BlockType Inport Name "half crank" Position [45, 48, 75, 62] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "bore" Position [70, 73, 100, 87] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "T cyl" Position [65, 223, 95, 237] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Twall" Position [60, 268, 90, 282] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Volume" Position [65, 403, 95, 417] Port "6" IconDisplay "Port number" } Block { BlockType Inport Name "Piston Area" Position [60, 448, 90, 462] Port "7" IconDisplay "Port number" } Block { BlockType Constant Name "A const" Position [260, 95, 325, 125] Value "0.2" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Sum Name "Add" Ports [2, 1] Position [640, 217, 670, 248] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Display Name "Display" Ports [1] Position [750, 335, 840, 365] Decimation "1" Lockdown off } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [455, 162, 485, 193] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide2" Ports [2, 1] Position [175, 402, 205, 433] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Fcn" Position [280, 45, 340, 75] Expr "u(1)^0.8" } Block { BlockType Fcn Name "Fcn1" Position [280, 275, 340, 305] Expr "u(1)^4" } Block { BlockType Fcn Name "Fcn2" Position [280, 325, 340, 355] Expr "u(1)^4" } Block { BlockType Integrator Name "Integrator1" Ports [2, 1] Position [780, 231, 820, 289] ExternalReset "falling" } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [630, 126, 635, 164] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType SubSystem Name "Reynolds" Ports [3, 1] Position [155, 27, 255, 93] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Reynolds" Location [462, 619, 777, 794] 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 "omega" Position [20, 18, 50, 32] IconDisplay "Port number" } Block { BlockType Inport Name "half crank" Position [35, 48, 65, 62] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "bore" Position [75, 93, 105, 107] Port "3" IconDisplay "Port number" } Block { BlockType Product Name "Divide1" Ports [3, 1] Position [205, 64, 235, 96] Inputs "**/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "approx mean dynam viscosity" Position [90, 120, 155, 150] Value ".000254" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "mean piston speed" Ports [2, 1] Position [90, 27, 140, 63] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Reynolds" Position [260, 73, 290, 87] IconDisplay "Port number" } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Reynolds" DstPort 1 } Line { SrcBlock "bore" SrcPort 1 Points [0, -20] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "half crank" SrcPort 1 DstBlock "mean piston speed" DstPort 2 } Line { SrcBlock "omega" SrcPort 1 Points [0, 10] DstBlock "mean piston speed" DstPort 1 } Line { SrcBlock "approx mean dynam viscosity" SrcPort 1 Points [15, 0; 0, -45] DstBlock "Divide1" DstPort 3 } Line { SrcBlock "mean piston speed" SrcPort 1 Points [20, 0; 0, 25] DstBlock "Divide1" DstPort 1 } } } Block { BlockType Scope Name "Scope1" Ports [1] Position [670, 124, 700, 156] Floating off Location [5, 47, 1445, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-50000" YMax "1e+006" SaveName "ScopeData6" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Sum Name "Subtract" Ports [2, 1] Position [455, 222, 485, 253] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Subtract1" Ports [2, 1] Position [410, 297, 440, 328] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "k" Position [260, 140, 325, 170] Value ".1" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "k1" Position [385, 360, 450, 390] Value "4.29*10^(-9)" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "k2" Position [235, 443, 275, 467] Value "pi()" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "x1" Ports [3, 1] Position [395, 56, 425, 84] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x2" Ports [2, 1] Position [540, 208, 570, 237] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x3" Ports [2, 1] Position [505, 308, 535, 337] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x4" Ports [3, 1] Position [300, 415, 330, 445] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "x5" Ports [2, 1] Position [715, 228, 745, 257] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Q" Position [880, 253, 910, 267] IconDisplay "Port number" } Line { SrcBlock "Integrator1" SrcPort 1 DstBlock "Q" DstPort 1 } Line { SrcBlock "x5" SrcPort 1 DstBlock "Integrator1" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 Points [5, 0; 0, -5] DstBlock "Scope1" DstPort 1 } Line { SrcBlock "x4" SrcPort 1 Points [365, 0; 0, -80] Branch { DstBlock "Display" DstPort 1 } Branch { DstBlock "x5" DstPort 2 } } Line { SrcBlock "Add" SrcPort 1 DstBlock "x5" DstPort 1 } Line { SrcBlock "k2" SrcPort 1 Points [0, -15] DstBlock "x4" DstPort 3 } Line { SrcBlock "Divide2" SrcPort 1 Points [5, 0; 0, 10] DstBlock "x4" DstPort 2 } Line { SrcBlock "Piston Area" SrcPort 1 Points [35, 0; 0, -30] DstBlock "Divide2" DstPort 2 } Line { SrcBlock "Volume" SrcPort 1 DstBlock "Divide2" DstPort 1 } Line { SrcBlock "x3" SrcPort 1 Points [45, 0; 0, -85; 30, 0] Branch { DstBlock "Mux" DstPort 2 } Branch { DstBlock "Add" DstPort 2 } } Line { SrcBlock "x2" SrcPort 1 Points [20, 0] Branch { Points [0, -90] DstBlock "Mux" DstPort 1 } Branch { DstBlock "Add" DstPort 1 } } Line { SrcBlock "k1" SrcPort 1 Points [35, 0] DstBlock "x3" DstPort 2 } Line { SrcBlock "Subtract1" SrcPort 1 DstBlock "x3" DstPort 1 } Line { SrcBlock "Subtract" SrcPort 1 Points [15, 0; 0, -10] DstBlock "x2" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 Points [15, 0; 0, 35] DstBlock "x2" DstPort 1 } Line { SrcBlock "Fcn2" SrcPort 1 Points [25, 0; 0, -20] DstBlock "Subtract1" DstPort 2 } Line { SrcBlock "Fcn1" SrcPort 1 Points [25, 0; 0, 15] DstBlock "Subtract1" DstPort 1 } Line { SrcBlock "Twall" SrcPort 1 Points [45, 0] Branch { Points [0, 65] DstBlock "Fcn2" DstPort 1 } Branch { Points [0, -30] DstBlock "Subtract" DstPort 2 } } Line { SrcBlock "T cyl" SrcPort 1 Points [65, 0] Branch { Points [0, 60] DstBlock "Fcn1" DstPort 1 } Branch { DstBlock "Subtract" DstPort 1 } } Line { SrcBlock "half crank" SrcPort 1 Points [0, 5] DstBlock "Reynolds" DstPort 2 } Line { SrcBlock "omega" SrcPort 1 Points [0, 20] DstBlock "Reynolds" DstPort 1 } Line { SrcBlock "x1" SrcPort 1 Points [5, 0; 0, 100] DstBlock "Divide1" DstPort 1 } Line { SrcBlock "k" SrcPort 1 Points [40, 0; 0, -75] DstBlock "x1" DstPort 3 } Line { SrcBlock "A const" SrcPort 1 Points [30, 0; 0, -40] DstBlock "x1" DstPort 2 } Line { SrcBlock "Fcn" SrcPort 1 DstBlock "x1" DstPort 1 } Line { SrcBlock "Reynolds" SrcPort 1 DstBlock "Fcn" DstPort 1 } Line { SrcBlock "bore" SrcPort 1 Points [15, 0] Branch { Points [0, 105; 105, 0] Branch { Points [0, 235] DstBlock "x4" DstPort 1 } Branch { DstBlock "Divide1" DstPort 2 } } Branch { DstBlock "Reynolds" DstPort 3 } } } } Block { BlockType SubSystem Name "Initial Air Mass Calculator" Ports [5, 1] Position [660, 109, 800, 191] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Initial Air Mass Calculator" Location [85, 537, 857, 800] 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 "Temperature" Position [115, 28, 145, 42] IconDisplay "Port number" } Block { BlockType Inport Name "Pressure (Pa)" Position [155, 83, 185, 97] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Volume (m^3)" Position [155, 185, 185, 200] Orientation "up" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R" Position [75, 93, 105, 107] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "MW" Position [410, 128, 440, 142] Port "5" IconDisplay "Port number" } Block { BlockType Product Name "Divide" Ports [2, 1] Position [390, 37, 420, 68] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [645, 67, 675, 98] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P x V" Ports [2, 1] Position [235, 90, 285, 125] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P x V1" Ports [2, 1] Position [250, 25, 300, 60] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P x V2" Ports [2, 1] Position [525, 80, 575, 115] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "R1" Position [545, 161, 600, 199] Value "1000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Mass (kg)" Position [700, 78, 730, 92] IconDisplay "Port number" } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Mass (kg)" DstPort 1 } Line { SrcBlock "Temperature" SrcPort 1 DstBlock "P x V1" DstPort 1 } Line { SrcBlock "Volume (m^3)" SrcPort 1 Points [0, -65] DstBlock "P x V" DstPort 2 } Line { SrcBlock "Pressure (Pa)" SrcPort 1 Points [0, 10] DstBlock "P x V" DstPort 1 } Line { SrcBlock "Divide" SrcPort 1 Points [40, 0; 0, 35] DstBlock "P x V2" DstPort 1 } Line { SrcBlock "P x V2" SrcPort 1 Points [25, 0; 0, -25] DstBlock "Divide1" DstPort 1 } Line { SrcBlock "R1" SrcPort 1 Points [10, 0; 0, -90] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "MW" SrcPort 1 Points [30, 0; 0, -30] DstBlock "P x V2" DstPort 2 } Line { SrcBlock "P x V1" SrcPort 1 Points [35, 0; 0, 15] DstBlock "Divide" DstPort 2 } Line { SrcBlock "P x V" SrcPort 1 Points [80, 0; 0, -65] DstBlock "Divide" DstPort 1 } Line { SrcBlock "R" SrcPort 1 Points [10, 0; 0, -35; 115, 0] DstBlock "P x V1" DstPort 2 } } } Block { BlockType Constant Name "Initial Energy\nof H2 and Air (J/kg)1" Position [380, 534, 455, 566] Value "1.0485e6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Energy\nof gas and air (J/kg)2" Position [370, 459, 445, 491] Value "218940" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Energy\nof gas and air (J/kg)3" Position [70, 519, 145, 551] Value "218940" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Energy\nof gas and air (J/kg)4" Position [85, 424, 160, 456] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Integrator Name "Intake E intergrator" Ports [2, 1] Position [1250, 771, 1290, 829] ExternalReset "falling" LowerSaturationLimit "0" } Block { BlockType SubSystem Name "Intake Mdot Calculator" Ports [7, 1] Position [875, 650, 1020, 730] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Intake Mdot Calculator" Location [194, 314, 1245, 841] 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 "Crank Angle" Position [55, 193, 85, 207] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Intake Pressure" Position [420, 203, 450, 217] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cyl Pressure" Position [435, 263, 465, 277] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Intake Temp" Position [480, 323, 510, 337] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "M mass" Position [265, 418, 295, 432] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve lift" Position [105, 63, 135, 77] Port "6" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve dia" Position [110, 33, 140, 47] Port "7" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "A" Ports [2, 1] Position [325, 372, 355, 403] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Choke" Position [645, 75, 705, 105] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(7)))*(2/(u(7)+1))^((u(7)+1)/(2*(u(7)-1)))" } Block { BlockType Constant Name "Constant1" Position [445, 75, 475, 105] Value ".6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant7" Position [445, 435, 475, 465] Value "1.35" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Fcn Name "Fcn" Position [645, 315, 705, 345] Expr "(2/(u(7)+1))^(u(7)/(u(7)-1))" } Block { BlockType Fcn Name "Fcn1" Position [415, 135, 475, 165] Expr "u(1)*pi" } Block { BlockType Fcn Name "Fcn2" Position [155, 245, 215, 275] Expr "sin(u(1))" } Block { BlockType SubSystem Name "Lift intake" Ports [1, 1] Position [145, 181, 235, 219] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lift intake" Location [375, 376, 1095, 734] 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 "Crank Angle" Position [75, 188, 105, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "On" Position [200, 140, 230, 170] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Switch1" Position [410, 180, 440, 210] Threshold "pi()" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [295, 180, 325, 210] InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "off" Position [190, 225, 220, 255] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Lift" Position [495, 188, 525, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Switch2" SrcPort 1 Points [25, 0; 0, 10] DstBlock "Switch1" DstPort 3 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Lift" DstPort 1 } Line { SrcBlock "On" SrcPort 1 Points [25, 0; 0, 30] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "off" SrcPort 1 Points [10, 0] Branch { Points [0, 10; 120, 0; 0, -65] DstBlock "Switch1" DstPort 1 } Branch { Points [0, -35] DstBlock "Switch2" DstPort 3 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [140, 0] Branch { Points [0, 40; 145, 0] DstBlock "Switch1" DstPort 2 } Branch { DstBlock "Switch2" DstPort 2 } } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [570, 61, 575, 479] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [275, 266, 280, 304] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "No Choke" Position [645, 435, 705, 465] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(4)/u(3)))*sqrt((2*u(7)/(u(7)-1))*(1-(u(4)/u(3))^((u(7)-1)/u(" "7))))" } Block { BlockType Product Name "Product" Ports [3, 1] Position [350, 134, 380, 166] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [280, 211, 310, 244] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pt/Po" Position [645, 190, 705, 220] Expr "u(4)/u(3)" } Block { BlockType Constant Name "R" Position [215, 360, 245, 390] Value "8314" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [770, 252, 800, 283] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope" Ports [1] Position [940, 174, 970, 206] Floating off Location [6, 46, 1430, 869] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [315, 259, 345, 291] Floating off Location [147, 479, 782, 821] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData19" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [845, 255, 875, 285] Criteria "u2 > Threshold" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Intake Mdot" Position [965, 263, 995, 277] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Valve dia" SrcPort 1 Points [190, 0] DstBlock "Product" DstPort 1 } Line { SrcBlock "Valve lift" SrcPort 1 Points [95, 0; 0, 80] DstBlock "Product" DstPort 2 } Line { SrcBlock "Product1" SrcPort 1 Points [10, 0; 0, -70] DstBlock "Product" DstPort 3 } Line { SrcBlock "Mux1" SrcPort 1 Points [5, 0; 0, -10] DstBlock "Scope1" DstPort 1 } Line { SrcBlock "Fcn2" SrcPort 1 Points [20, 0; 0, 15; 15, 0] Branch { Points [0, -40] DstBlock "Product1" DstPort 2 } Branch { DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [25, 0] Branch { Points [0, 60] DstBlock "Fcn2" DstPort 1 } Branch { DstBlock "Lift intake" DstPort 1 } } Line { SrcBlock "Lift intake" SrcPort 1 Points [10, 0] Branch { Points [10, 0; 0, 20] DstBlock "Product1" DstPort 1 } Branch { Points [0, 95] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "M mass" SrcPort 1 Points [0, -30] DstBlock "A" DstPort 2 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, 5] DstBlock "A" DstPort 1 } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { Points [0, -80] DstBlock "Scope" DstPort 1 } Branch { DstBlock "Intake Mdot" DstPort 1 } } Line { SrcBlock "Product" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "No Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Fcn" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Pt/Po" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0] Branch { Points [0, -65] Branch { Points [0, -115] DstBlock "Choke" DstPort 1 } Branch { DstBlock "Pt/Po" DstPort 1 } } Branch { Points [0, 60] Branch { Points [0, 120] DstBlock "No Choke" DstPort 1 } Branch { DstBlock "Fcn" DstPort 1 } } } Line { SrcBlock "Constant7" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Intake Temp" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "Cyl Pressure" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Intake Pressure" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Mux" DstPort 1 } Annotation { Name "If Choke, output 1" Position [786, 234] } Annotation { Name "gamma" Position [412, 451] } Annotation { Name "Ar" Position [535, 143] } Annotation { Name "Cd" Position [433, 89] } } } Block { BlockType SubSystem Name "Intake Mdot Calculator1" Ports [7, 1] Position [890, 745, 1035, 825] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Intake Mdot Calculator1" Location [194, 314, 1245, 841] 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 "Crank Angle" Position [55, 193, 85, 207] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Intake Pressure" Position [420, 203, 450, 217] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Cyl Pressure" Position [435, 263, 465, 277] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Intake Temp" Position [480, 323, 510, 337] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "M mass" Position [265, 418, 295, 432] Port "5" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve lift" Position [105, 63, 135, 77] Port "6" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Valve dia" Position [110, 33, 140, 47] Port "7" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "A" Ports [2, 1] Position [325, 372, 355, 403] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Choke" Position [645, 75, 705, 105] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(7)))*(2/(u(7)+1))^((u(7)+1)/(2*(u(7)-1)))" } Block { BlockType Constant Name "Constant1" Position [445, 75, 475, 105] Value ".6" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant7" Position [445, 435, 475, 465] Value "1.35" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Fcn Name "Fcn" Position [645, 315, 705, 345] Expr "(2/(u(7)+1))^(u(7)/(u(7)-1))" } Block { BlockType Fcn Name "Fcn1" Position [415, 135, 475, 165] Expr "u(1)*pi" } Block { BlockType Fcn Name "Fcn2" Position [155, 245, 215, 275] Expr "sin(u(1))" } Block { BlockType SubSystem Name "Lift intake" Ports [1, 1] Position [145, 181, 235, 219] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lift intake" Location [375, 376, 1095, 734] 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 "Crank Angle" Position [75, 188, 105, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "On" Position [200, 140, 230, 170] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Switch Name "Switch1" Position [410, 180, 440, 210] Threshold "pi()" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [295, 180, 325, 210] InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "off" Position [190, 225, 220, 255] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Lift" Position [495, 188, 525, 202] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Crank Angle" SrcPort 1 Points [140, 0] Branch { DstBlock "Switch2" DstPort 2 } Branch { Points [0, 40; 145, 0] DstBlock "Switch1" DstPort 2 } } Line { SrcBlock "off" SrcPort 1 Points [10, 0] Branch { Points [0, -35] DstBlock "Switch2" DstPort 3 } Branch { Points [0, 10; 120, 0; 0, -65] DstBlock "Switch1" DstPort 1 } } Line { SrcBlock "On" SrcPort 1 Points [25, 0; 0, 30] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "Switch1" SrcPort 1 DstBlock "Lift" DstPort 1 } Line { SrcBlock "Switch2" SrcPort 1 Points [25, 0; 0, 10] DstBlock "Switch1" DstPort 3 } } } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [570, 61, 575, 479] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [275, 266, 280, 304] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Fcn Name "No Choke" Position [645, 435, 705, 465] Expr "(u(1)*u(2)*u(3)/sqrt(u(6)*u(5)))*(sqrt(u(4)/u(3)))*sqrt((2*u(7)/(u(7)-1))*(1-(u(4)/u(3))^((u(7)-1)/u(" "7))))" } Block { BlockType Product Name "Product" Ports [3, 1] Position [350, 134, 380, 166] Inputs "3" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Product1" Ports [2, 1] Position [280, 211, 310, 244] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Pt/Po" Position [645, 190, 705, 220] Expr "u(4)/u(3)" } Block { BlockType Constant Name "R" Position [215, 360, 245, 390] Value "8314" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [770, 252, 800, 283] Operator "<=" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope" Ports [1] Position [940, 174, 970, 206] Floating off Location [6, 46, 1430, 869] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [315, 259, 345, 291] Floating off Location [147, 479, 782, 821] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-1" YMax "1" SaveName "ScopeData19" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Switch Name "Switch" Position [845, 255, 875, 285] Criteria "u2 > Threshold" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Intake Mdot" Position [965, 263, 995, 277] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Intake Pressure" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "Cyl Pressure" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Intake Temp" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "Constant7" SrcPort 1 DstBlock "Mux" DstPort 7 } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0] Branch { Points [0, 60] Branch { DstBlock "Fcn" DstPort 1 } Branch { Points [0, 120] DstBlock "No Choke" DstPort 1 } } Branch { Points [0, -65] Branch { DstBlock "Pt/Po" DstPort 1 } Branch { Points [0, -115] DstBlock "Choke" DstPort 1 } } } Line { SrcBlock "Pt/Po" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 1 } Line { SrcBlock "No Choke" SrcPort 1 Points [120, 0] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 Points [20, 0] Branch { DstBlock "Intake Mdot" DstPort 1 } Branch { Points [0, -80] DstBlock "Scope" DstPort 1 } } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, 5] DstBlock "A" DstPort 1 } Line { SrcBlock "M mass" SrcPort 1 Points [0, -30] DstBlock "A" DstPort 2 } Line { SrcBlock "A" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "Lift intake" SrcPort 1 Points [10, 0] Branch { Points [0, 95] DstBlock "Mux1" DstPort 2 } Branch { Points [10, 0; 0, 20] DstBlock "Product1" DstPort 1 } } Line { SrcBlock "Crank Angle" SrcPort 1 Points [25, 0] Branch { DstBlock "Lift intake" DstPort 1 } Branch { Points [0, 60] DstBlock "Fcn2" DstPort 1 } } Line { SrcBlock "Fcn2" SrcPort 1 Points [20, 0; 0, 15; 15, 0] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [0, -40] DstBlock "Product1" DstPort 2 } } Line { SrcBlock "Mux1" SrcPort 1 Points [5, 0; 0, -10] DstBlock "Scope1" DstPort 1 } Line { SrcBlock "Product1" SrcPort 1 Points [10, 0; 0, -70] DstBlock "Product" DstPort 3 } Line { SrcBlock "Valve lift" SrcPort 1 Points [95, 0; 0, 80] DstBlock "Product" DstPort 2 } Line { SrcBlock "Valve dia" SrcPort 1 Points [190, 0] DstBlock "Product" DstPort 1 } Annotation { Name "Cd" Position [433, 89] } Annotation { Name "Ar" Position [535, 143] } Annotation { Name "gamma" Position [412, 451] } Annotation { Name "If Choke, output 1" Position [786, 234] } } } Block { BlockType Integrator Name "Integrator" Ports [2, 1] Position [430, 381, 470, 439] ExternalReset "falling" } Block { BlockType Integrator Name "Mass intergrator" Ports [3, 1] Position [1240, 641, 1280, 699] ExternalReset "falling" InitialConditionSource "external" LowerSaturationLimit "0" } Block { BlockType Mux Name "Mux1" Ports [3, 1] Position [1020, 366, 1030, 414] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Product Name "P x V2" Ports [2, 1] Position [355, 375, 405, 410] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType SubSystem Name "P=nRT/V1" Ports [5, 1] Position [980, 120, 1115, 190] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "P=nRT/V1" Location [140, 361, 895, 741] 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 "Temperature" Position [60, 28, 90, 42] IconDisplay "Port number" } Block { BlockType Inport Name "m (kg)" Position [55, 123, 85, 137] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Volume (m^3)" Position [340, 165, 370, 180] Orientation "up" Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "R" Position [85, 88, 115, 102] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "MW" Position [35, 243, 65, 257] Port "5" IconDisplay "Port number" } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [375, 52, 405, 83] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Mole Solver" Ports [2, 1] Position [180, 122, 210, 153] Inputs "*/" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "Mole Solver1" Ports [2, 1] Position [110, 242, 140, 273] Inputs "**" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Product Name "P x V1" Ports [4, 1] Position [250, 30, 300, 85] Inputs "4" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "R1" Position [175, 191, 230, 229] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "R3" Position [15, 276, 70, 314] Value "10^-3" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Pressure" Position [590, 63, 620, 77] IconDisplay "Port number" } Line { SrcBlock "Mole Solver1" SrcPort 1 Points [15, 0; 0, -115] DstBlock "Mole Solver" DstPort 2 } Line { SrcBlock "R3" SrcPort 1 Points [10, 0; 0, -30] DstBlock "Mole Solver1" DstPort 2 } Line { SrcBlock "MW" SrcPort 1 DstBlock "Mole Solver1" DstPort 1 } Line { SrcBlock "Temperature" SrcPort 1 DstBlock "P x V1" DstPort 1 } Line { SrcBlock "R" SrcPort 1 Points [30, 0; 0, -45] DstBlock "P x V1" DstPort 2 } Line { SrcBlock "m (kg)" SrcPort 1 DstBlock "Mole Solver" DstPort 1 } Line { SrcBlock "Mole Solver" SrcPort 1 Points [0, -75] DstBlock "P x V1" DstPort 3 } Line { SrcBlock "P x V1" SrcPort 1 DstBlock "Divide1" DstPort 1 } Line { SrcBlock "Volume (m^3)" SrcPort 1 Points [0, -85] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Pressure" DstPort 1 } Line { SrcBlock "R1" SrcPort 1 DstBlock "P x V1" DstPort 4 } } } Block { BlockType Constant Name "R" Position [495, 214, 545, 246] Value "8.31451" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Scope Name "Scope" Ports [1] Position [1360, 654, 1390, 686] Floating off Location [693, 46, 1430, 446] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.000233952" YMax "0.000233952" SaveName "ScopeData9" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [1070, 374, 1100, 406] Floating off Location [360, 373, 1233, 699] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "3000" SaveName "ScopeData12" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [1330, 99, 1360, 131] Floating off Location [325, 351, 1062, 751] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "5.75e+006" SaveName "ScopeData24" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Switch Name "Switch" Position [905, 410, 935, 440] Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch1" Position [575, 465, 605, 495] Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [205, 465, 235, 495] Threshold ".02" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Constant Name "Wall Temp" Position [195, 790, 260, 820] Value "600" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Weibe" Ports [4, 4] Position [345, 94, 450, 241] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Weibe" Location [-61, 127, 1367, 904] 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 "Theta" Position [95, 268, 125, 282] IconDisplay "Port number" } Block { BlockType Inport Name "E of Burn (J)" Position [635, 168, 665, 182] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Spark" Position [150, 308, 180, 322] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Burn Duration" Position [210, 353, 240, 367] Port "4" IconDisplay "Port number" } Block { BlockType Product Name "% * E" Ports [2, 1] Position [850, 250, 900, 285] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "% * E1" Ports [2, 1] Position [970, 315, 1020, 350] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Product Name "% * E2" Ports [2, 1] Position [1180, 485, 1230, 520] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Scope Name "% Burn1" Ports [1] Position [850, 134, 880, 166] Floating off Location [591, 345, 1435, 822] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1" SaveName "ScopeData3" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "% Burn2" Ports [1] Position [1380, 584, 1410, 616] Floating off Location [125, 514, 969, 991] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "3750" SaveName "ScopeData13" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "% Burn3" Ports [1] Position [1030, 449, 1060, 481] Floating off Location [538, 401, 1382, 878] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1000" SaveName "ScopeData17" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "% Burn4" Ports [1] Position [1085, 379, 1115, 411] Floating off Location [49, 417, 893, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "1100" YMax "1800" SaveName "ScopeData18" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Constant Name "A" Position [80, 199, 115, 221] Value "5" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Derivative Name "Derivative" Position [800, 365, 830, 395] } Block { BlockType Integrator Name "Integrator1" Ports [2, 1] Position [1270, 576, 1310, 634] ExternalReset "falling" LowerSaturationLimit "0" } Block { BlockType Integrator Name "Integrator2" Ports [2, 1] Position [895, 341, 935, 399] ExternalReset "falling" LowerSaturationLimit "0" } Block { BlockType Constant Name "M + 1" Position [125, 217, 160, 243] Value "3" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Mux Name "Mux" Ports [5, 1] Position [335, 142, 345, 238] ShowName off Inputs "5" DisplayOption "bar" } Block { BlockType SubSystem Name "Switch for Weibe" Ports [4, 1] Position [545, 226, 670, 319] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Switch for Weibe" Location [112, 307, 1387, 790] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColo