Model { Name "MarkIIrevbron" Version 7.2 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 3 Outport { BusObject "" BusOutputAsStruct "off" Name "A" } Outport { BusObject "" BusOutputAsStruct "off" Name "w" } Outport { BusObject "" BusOutputAsStruct "off" Name "O" } ParameterArgumentNames "" ComputedModelVersion "1.111" 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 "Ron" ModifiedDateFormat "%" LastModifiedDate "Fri Feb 06 10:21:18 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 "2" AbsTol "auto" FixedStep ".5" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ZcThreshold "auto" ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "0.001" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "Auto" Solver "ode113" SolverName "ode113" 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 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 Display Format "short" Decimation "10" Floating off SampleTime "-1" } Block { BlockType Fcn Expr "sin(u[1])" SampleTime "-1" } Block { BlockType If NumInputs "1" IfExpression "u1 > 0" ShowElse on ZeroCross on SampleTime "-1" } 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 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 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 WhileIterator MaxIters "5" WhileBlockType "while" ResetStates "held" ShowIterationPort off OutputDataType "int32" } } System { Name "MarkIIrevbron" Location [2, 80, 1253, 720] 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 Scope Name "Angle between Connecting rod and vertical" Ports [1] Position [790, 304, 820, 336] Floating off Location [374, 396, 1429, 915] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } SaveName "ScopeData4" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Constant Name "Atm Pressure(Pa)" Position [945, 130, 1010, 160] Value "100000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Compression Ratio x:1" Position [40, 590, 105, 620] Value "10" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Connecting Rod Length (m)" Position [45, 305, 100, 335] Value ".11" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Scope Name "Crank Angle in Omega" Ports [1] Position [890, 194, 920, 226] Floating off Location [69, 230, 1250, 538] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } SaveName "ScopeData2" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Constant Name "Crank Case Pressure (Pa)" Position [40, 455, 105, 485] Value "100000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Crank Position" Ports [3, 3] Position [260, 47, 365, 193] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Crank Position" Location [404, 219, 1132, 679] 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 [20, 128, 50, 142] IconDisplay "Port number" } Block { BlockType Inport Name "Torque" Position [15, 88, 45, 102] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Initial RPM" Position [55, 259, 85, 281] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Display Name "Angular Acc" Ports [1] Position [230, 90, 320, 120] Decimation "1" Lockdown off } Block { BlockType Product Name "Divide" Ports [2, 1] Position [80, 87, 110, 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 Constant Name "Initial Position" Position [320, 350, 350, 380] Value "4*pi" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Integrator Name "Integrator" Ports [2, 1] Position [155, 219, 200, 286] InitialConditionSource "external" } Block { BlockType Integrator Name "Integrator1" Ports [2, 2] Position [260, 267, 295, 338] ExternalReset "rising" UpperSaturationLimit "720" ShowSaturationPort on } Block { BlockType Scope Name "Omega" Ports [1] Position [435, 244, 465, 276] Floating off Location [135, 76, 1435, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "750" SaveName "ScopeData1" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Omega dot" Ports [1] Position [320, 149, 350, 181] Floating off Location [1948, 758, 2272, 997] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [420, 332, 450, 363] InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Outport Name "A" Position [290, 28, 320, 42] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "w" Position [355, 203, 385, 217] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "O" Position [555, 288, 585, 302] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Divide" SrcPort 1 Points [25, 0] Branch { DstBlock "Angular Acc" DstPort 1 } Branch { DstBlock "Integrator" DstPort 1 } Branch { Points [0, -70] DstBlock "A" DstPort 1 } } Line { SrcBlock "Integrator" SrcPort 1 Points [30, 0] Branch { Points [0, 30] DstBlock "Integrator1" DstPort 1 } Branch { Points [70, 0; 0, -25] Branch { DstBlock "Omega dot" DstPort 1 } Branch { Points [0, -20] DstBlock "w" DstPort 1 } } } Line { SrcBlock "Integrator1" SrcPort 1 Points [5, 0] Branch { Points [0, -25] DstBlock "Omega" DstPort 1 } Branch { Points [100, 0; 0, 15] Branch { DstBlock "Relational\nOperator" DstPort 1 } Branch { Points [0, -5] DstBlock "O" DstPort 1 } } } Line { SrcBlock "Initial Position" SrcPort 1 Points [50, 0] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [15, 0; 0, 85; -225, 0] DstBlock "Integrator1" DstPort 2 } Line { SrcBlock "Crank Inertia" SrcPort 1 Points [10, 0] DstBlock "Divide" DstPort 2 } Line { SrcBlock "Torque" SrcPort 1 DstBlock "Divide" DstPort 1 } Line { SrcBlock "Initial RPM" SrcPort 1 DstBlock "Integrator" DstPort 2 } } } Block { BlockType Scope Name "Crank Speed in rad/s" Ports [1] Position [550, 124, 580, 156] Floating off Location [254, 272, 1435, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.95" YMax "1.05" SaveName "ScopeData5" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "Crank length S see Heys, page 44" Tag "adsfasdf" Ports [1] Position [695, 234, 725, 266] Floating off Location [384, 380, 1136, 776] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Constant Name "Crank offeset (half stroke) (m)" Position [45, 250, 105, 280] Value "0.043" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Scope Name "Energy" Ports [1] Position [1130, 574, 1160, 606] Floating off Location [147, 201, 997, 588] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-15" YMax "15" SaveName "ScopeData7" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Constant Name "IC" Position [555, 760, 620, 790] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Inertia" Position [45, 55, 75, 85] Value "1000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Position" Position [1165, 685, 1195, 715] Value "pi" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial Position1" Position [1190, 765, 1220, 795] Value "3*pi" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Initial rad/s" Position [45, 155, 75, 185] Value "5" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Integrator Name "Integrator" Ports [2, 1] Position [1040, 561, 1080, 619] ExternalReset "either" } Block { BlockType Logic Name "Logical\nOperator" Ports [2, 1] Position [1365, 707, 1395, 738] Operator "XOR" AllPortsSameDT off OutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType SubSystem Name "More real air" Ports [3, 1] Position [1215, 51, 1350, 119] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "More real air" Location [149, 373, 933, 700] 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 Constant Name "AIR O+H (g/mol)" Position [355, 143, 450, 177] Value "137.329184" OutDataType "sfix(16)" OutScaling "2^0" } 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 Constant Name "R bar" Position [25, 75, 115, 115] Value "8.314472" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "R1" Position [545, 161, 600, 199] Value "1000" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "RxT" 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 "mass (g)" 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 Product Name "mol (n)" 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 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 "RxT" 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 "mol (n)" SrcPort 1 Points [0, -5; 40, 0; 0, 40] DstBlock "mass (g)" DstPort 1 } Line { SrcBlock "mass (g)" 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 "AIR O+H (g/mol)" SrcPort 1 Points [20, 0; 0, -55] DstBlock "mass (g)" DstPort 2 } Line { SrcBlock "RxT" SrcPort 1 Points [35, 0; 0, 15] DstBlock "mol (n)" DstPort 2 } Line { SrcBlock "P x V" SrcPort 1 Points [80, 0; 0, -65] DstBlock "mol (n)" DstPort 1 } Line { SrcBlock "R bar" SrcPort 1 Points [0, -30; 115, 0] DstBlock "RxT" DstPort 2 } } } Block { BlockType Product Name "P x V" Ports [2, 1] Position [945, 555, 995, 590] 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 [780, 570, 830, 605] 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 "Piston Diameter (m)" Position [40, 405, 100, 435] Value "0.086" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Piston Force" Ports [3, 3] Position [175, 397, 345, 543] 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" } Block { BlockType Outport Name "Piston\nPressure" Position [370, 303, 400, 317] Port "3" 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 [25, 0] Branch { Points [95, 0] DstBlock "Force" DstPort 2 } Branch { Points [55, 0] DstBlock "Piston\nPressure" DstPort 1 } } 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, 7] Position [465, 342, 665, 558] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Piston Position based on Geometry" Location [-12, 83, 1256, 716] 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 Offset" Position [25, 28, 55, 42] IconDisplay "Port number" } Block { BlockType Inport Name "Omega" Position [200, 33, 230, 47] 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 Area" Position [15, 200, 45, 215] Orientation "down" Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "Piston Force" Position [530, 343, 560, 357] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "Compression Ratio" Position [195, 418, 225, 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 "Length S" Position [700, 58, 730, 72] IconDisplay "Port number" } Block { BlockType Outport Name "V" Position [1240, 133, 1270, 147] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Phi" Position [765, 178, 795, 192] Port "3" IconDisplay "Port number" } Block { BlockType Outport Name "Torque" Position [905, 358, 935, 372] Port "4" IconDisplay "Port number" } Block { BlockType Outport Name "Swept Volume" Position [535, 413, 565, 427] Port "5" IconDisplay "Port number" } Block { BlockType Outport Name "Total Cylinder Volume" Position [870, 528, 900, 542] Port "6" IconDisplay "Port number" } Block { BlockType Outport Name "Clearance Volume" Position [875, 573, 905, 587] Port "7" IconDisplay "Port number" } Line { SrcBlock "Clearance Volume Solver" SrcPort 1 Points [140, 0] Branch { Points [35, 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 Volume" DstPort 1 } } Line { SrcBlock "Phi solver" SrcPort 1 Points [0, -75; 95, 0] Branch { Labels [0, 0] Points [0, 140] DstBlock "Torque Solver" DstPort 1 } Branch { DstBlock "Phi" 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] Branch { Labels [0, 0] Points [0, 75] DstBlock "Volume Calc" DstPort 3 } Branch { DstBlock "Length S" DstPort 1 } } Line { SrcBlock "Omega" 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] Branch { DstBlock "Swept Volume" DstPort 1 } Branch { Points [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 Scope Name "Power" Ports [1] Position [870, 609, 900, 641] Floating off Location [115, 171, 965, 558] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-15" YMax "15" SaveName "ScopeData8" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Power1" Ports [1] Position [865, 679, 895, 711] Floating off Location [115, 171, 965, 558] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-15" YMax "15" SaveName "ScopeData9" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Power2" Ports [1] Position [415, 609, 445, 641] Floating off Location [102, 507, 952, 894] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-15" YMax "15" SaveName "ScopeData14" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Power4" Ports [1] Position [220, 619, 250, 651] Floating off Location [188, 239, 1038, 626] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-15" YMax "15" SaveName "ScopeData17" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType SubSystem Name "Pressure" Ports [4, 1] Position [850, 773, 970, 847] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Pressure" Location [691, 286, 1189, 586] 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 "specific heat" Position [45, 173, 75, 187] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Tnew" Position [45, 58, 75, 72] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Told" Position [45, 103, 75, 117] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "Pold" Position [45, 13, 75, 27] Port "4" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant" Position [60, 235, 90, 265] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "Divide" Ports [2, 1] Position [240, 172, 270, 203] 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 [135, 62, 165, 93] 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 Math Name "Math\nFunction" Ports [2, 1] Position [230, 92, 260, 123] Operator "pow" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Sum Name "Subtract" Ports [2, 1] Position [140, 172, 170, 203] 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 "mult" Ports [2, 1] Position [190, 16, 220, 49] 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 Outport Name "Pnew" Position [365, 98, 395, 112] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Constant" SrcPort 1 Points [20, 0; 0, -55] DstBlock "Subtract" DstPort 2 } Line { SrcBlock "specific heat" SrcPort 1 Points [30, 0] Branch { DstBlock "Subtract" DstPort 1 } Branch { Points [0, -20; 115, 0] DstBlock "Divide" DstPort 1 } } Line { SrcBlock "Subtract" SrcPort 1 Points [25, 0; 0, 5] DstBlock "Divide" DstPort 2 } Line { SrcBlock "Tnew" SrcPort 1 Points [20, 0; 0, 5] DstBlock "Divide1" DstPort 1 } Line { SrcBlock "Told" SrcPort 1 Points [20, 0; 0, -25] DstBlock "Divide1" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 Points [20, 0; 0, 20] DstBlock "Math\nFunction" DstPort 1 } Line { SrcBlock "Divide" SrcPort 1 Points [0, -35; -80, 0; 0, -40] DstBlock "Math\nFunction" DstPort 2 } Line { SrcBlock "Pold" SrcPort 1 Points [45, 0; 0, 5] DstBlock "mult" DstPort 1 } Line { SrcBlock "Math\nFunction" SrcPort 1 Points [0, -40; -90, 0] DstBlock "mult" DstPort 2 } Line { SrcBlock "mult" SrcPort 1 Points [110, 0; 0, 70] DstBlock "Pnew" DstPort 1 } } } Block { BlockType Scope Name "Pressure1" Ports [1] Position [1345, 819, 1375, 851] Floating off Location [87, 264, 1016, 708] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "100000" YMax "100375" SaveName "ScopeData11" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [1275, 662, 1305, 693] InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType RelationalOperator Name "Relational\nOperator1" Position [1280, 742, 1310, 773] InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [135, 110, 155, 130] 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 SubSystem Name "Switch For Heat Addition" Ports [4, 1] Position [1270, 198, 1410, 337] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Switch For Heat Addition" Location [103, 463, 1089, 720] 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 "Expansion\nPressure" Position [210, 38, 240, 52] IconDisplay "Port number" } Block { BlockType Inport Name "Compression\nPressure" Position [30, 33, 60, 47] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Crank Position" Position [30, 88, 60, 102] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "Atmospheric Pressure" Position [55, 153, 85, 167] Port "4" IconDisplay "Port number" } Block { BlockType Switch Name "Compression\nExpansion\nSwitch" Position [470, 70, 500, 100] Criteria "u2 > Threshold" Threshold "2*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Expansion\nExhaust\nSwitch" Position [550, 25, 580, 55] Criteria "u2 > Threshold" Threshold "3*pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Intake\nCompression\nSwitch" Position [175, 80, 205, 110] Criteria "u2 > Threshold" Threshold "pi" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Piston Pressure" Position [655, 33, 685, 47] IconDisplay "Port number" } Line { SrcBlock "Intake\nCompression\nSwitch" SrcPort 1 DstBlock "Compression\nExpansion\nSwitch" DstPort 3 } Line { SrcBlock "Compression\nExpansion\nSwitch" SrcPort 1 Points [30, 0] DstBlock "Expansion\nExhaust\nSwitch" DstPort 3 } Line { SrcBlock "Crank Position" SrcPort 1 Points [75, 0] Branch { DstBlock "Intake\nCompression\nSwitch" DstPort 2 } Branch { Points [0, 75; 115, 0; 0, -85; 140, 0] Branch { DstBlock "Compression\nExpansion\nSwitch" DstPort 2 } Branch { Points [0, -45] DstBlock "Expansion\nExhaust\nSwitch" DstPort 2 } } } Line { SrcBlock "Expansion\nExhaust\nSwitch" SrcPort 1 DstBlock "Piston Pressure" DstPort 1 } Line { SrcBlock "Expansion\nPressure" SrcPort 1 Points [50, 0; 0, 30] DstBlock "Compression\nExpansion\nSwitch" DstPort 1 } Line { SrcBlock "Compression\nPressure" SrcPort 1 Points [20, 0; 0, 45] DstBlock "Intake\nCompression\nSwitch" DstPort 1 } Line { SrcBlock "Atmospheric Pressure" SrcPort 1 Points [20, 0; 0, -55] Branch { DstBlock "Intake\nCompression\nSwitch" DstPort 3 } Branch { Points [0, -75] DstBlock "Expansion\nExhaust\nSwitch" DstPort 1 } } } } Block { BlockType Constant Name "T1" Position [870, 565, 900, 595] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "T2" Position [985, 70, 1015, 100] Value "300" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Terminator Name "Terminator" Position [770, 470, 790, 490] } Block { BlockType Terminator Name "Terminator2" Position [680, 90, 700, 110] } Block { BlockType Constant Name "Torque N/M" Position [45, 105, 75, 135] Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Scope Name "Volume" Ports [1] Position [855, 374, 885, 406] Floating off Location [164, 104, 1164, 482] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } SaveName "ScopeData6" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType SubSystem Name "While Iterator\nSubsystem" Ports [3, 2] Position [665, 715, 770, 785] TreatAsAtomicUnit on MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "While Iterator\nSubsystem" Location [99, 105, 1106, 621] 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" Block { BlockType Inport Name "Told" Position [25, 138, 55, 152] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "rv" Position [115, 23, 145, 37] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Inport Name "IC" Position [130, 418, 160, 432] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant" Position [110, 350, 140, 380] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Constant1" Position [450, 58, 470, 82] OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Display Name "Display" Ports [1] Position [520, 375, 610, 405] Decimation "1" Lockdown off } Block { BlockType If Name "If" Ports [1, 2] Position [125, 271, 225, 309] IfExpression "u1 > 3" } Block { BlockType Math Name "Math\nFunction" Ports [2, 1] Position [555, 32, 585, 63] Operator "pow" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [200, 337, 230, 368] Operator "<" InputSameDT off LogicOutDataTypeMode "boolean" OutDataTypeStr "boolean" } Block { BlockType Scope Name "Scope1" Ports [1] Position [30, 234, 60, 266] Floating off Location [260, 529, 584, 768] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.95" YMax "1.05" SaveName "ScopeData15" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [665, 259, 695, 291] Floating off Location [724, 491, 1048, 730] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0.95" YMax "1.05" SaveName "ScopeData10" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType SubSystem Name "Specific Heat" Ports [1, 1] Position [255, 24, 390, 96] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Specific Heat" Location [70, 195, 825, 575] 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 [55, 113, 85, 127] IconDisplay "Port number" } Block { BlockType Fcn Name "Cp" Position [280, 45, 340, 75] Expr "(2.75270E+1)+2*(4.90270E-3)*u(1)+3*(-1.12290E-6)*u(1)^2+4*(1.56948E-10)*u(1)^3+5*(-8.99417E-15)*u(" "1)^4" } Block { BlockType Fcn Name "Cv" Position [285, 175, 345, 205] Expr "(2.75270E+1)-8.3143+2*(4.90270E-3)*u(1)+3*(-1.12290E-6)*u(1)^2+4*(1.56948E-10)*u(1)^3+5*(-8.99417E" "-15)*u(1)^4" } Block { BlockType Product Name "Divide" Ports [2, 1] Position [415, 117, 445, 148] 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 Outport Name "specific heat" Position [595, 123, 625, 137] IconDisplay "Port number" } Line { SrcBlock "Temperature" SrcPort 1 Points [115, 0; 0, -60] Branch { DstBlock "Cp" DstPort 1 } Branch { Points [0, 130] DstBlock "Cv" DstPort 1 } } Line { SrcBlock "Cv" SrcPort 1 Points [25, 0; 0, -50] DstBlock "Divide" DstPort 2 } Line { SrcBlock "Cp" SrcPort 1 Points [50, 0; 0, 65] DstBlock "Divide" DstPort 1 } Line { SrcBlock "Divide" SrcPort 1 Points [65, 0; 0, -5] DstBlock "specific heat" DstPort 1 } } } Block { BlockType Sum Name "Subtract" Ports [2, 1] Position [500, 42, 530, 73] Inputs "+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" Position [175, 55, 205, 85] Criteria "u2 > Threshold" Threshold "1" InputSameDT off OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Product Name "T22" Ports [2, 1] Position [460, 120, 510, 155] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType WhileIterator Name "While Iterator" Ports [2, 1] Position [270, 383, 345, 427] MaxIters "8" ResetStates "reset" ShowIterationPort on } Block { BlockType Outport Name "Tnew" Position [730, 118, 760, 132] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "specific heat" Position [745, 198, 775, 212] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "rv" SrcPort 1 Points [75, 0; 0, -10; 315, 0] DstBlock "Math\nFunction" DstPort 1 } Line { SrcBlock "Specific Heat" SrcPort 1 Points [0, 10; 25, 0; 0, -20; 15, 0] Branch { DstBlock "Subtract" DstPort 1 } Branch { Points [0, 155] DstBlock "specific heat" DstPort 1 } } Line { SrcBlock "Math\nFunction" SrcPort 1 Points [35, 0; 0, 50; -180, 0] DstBlock "T22" DstPort 1 } Line { SrcBlock "IC" SrcPort 1 Points [35, 0; 0, -10] DstBlock "While Iterator" DstPort 2 } Line { SrcBlock "While Iterator" SrcPort 1 Points [0, -15; 25, 0] Branch { Points [0, 65; -285, 0; 0, -385] DstBlock "Switch" DstPort 2 } Branch { DstBlock "Display" DstPort 1 } } Line { SrcBlock "Constant" SrcPort 1 Points [40, 0] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Told" SrcPort 1 Points [70, 0] Branch { Points [0, 0; 0, -85] DstBlock "Switch" DstPort 1 } Branch { DstBlock "T22" DstPort 2 } } Line { SrcBlock "T22" SrcPort 1 Points [25, 0] Branch { Points [0, 35; -380, 0] DstBlock "Switch" DstPort 3 } Branch { Points [30, 0; 0, -15; 20, 0] Branch { DstBlock "Tnew" DstPort 1 } Branch { Points [0, 150] DstBlock "Scope2" DstPort 1 } } } Line { SrcBlock "Switch" SrcPort 1 Points [10, 0] Branch { Points [0, 130; -205, 0] DstBlock "Scope1" DstPort 1 } Branch { Points [5, 0; 0, -10] DstBlock "Specific Heat" DstPort 1 } } Line { SrcBlock "Constant1" SrcPort 1 Points [5, 0; 0, -5] DstBlock "Subtract" DstPort 2 } Line { SrcBlock "Subtract" SrcPort 1 Points [0, -5] DstBlock "Math\nFunction" DstPort 2 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [10, 0; 0, 40] DstBlock "While Iterator" DstPort 1 } } } Block { BlockType Scope Name "crank accel in rad/s^2" Ports [1] Position [560, 54, 590, 86] Floating off Location [188, 149, 1369, 771] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } SaveName "ScopeData18" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Product Name "rv (Compression ratio)" Ports [2, 1] Position [450, 730, 500, 765] Inputs "*/" 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 "A" Position [440, 63, 470, 77] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "w" Position [440, 113, 470, 127] Port "2" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "O" Position [445, 163, 475, 177] Port "3" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "Inertia" SrcPort 1 DstBlock "Crank Position" DstPort 1 } Line { SrcBlock "Crank Position" SrcPort 1 Points [30, 0] Branch { DstBlock "A" DstPort 1 } Branch { Points [0, 30; 90, 0] Branch { DstBlock "Terminator2" DstPort 1 } Branch { Points [0, -30] DstBlock "crank accel in rad/s^2" DstPort 1 } } } Line { SrcBlock "Crank Position" SrcPort 2 Points [40, 0] Branch { DstBlock "w" DstPort 1 } Branch { Points [0, 20; 20, 0] Branch { DstBlock "Crank Speed in rad/s" DstPort 1 } Branch { Points [0, 455] DstBlock "P x V2" DstPort 2 } } } Line { SrcBlock "Crank Position" SrcPort 3 Points [40, 0; 0, 0] Branch { Points [0, 0] DstBlock "O" DstPort 1 } Branch { Labels [0, 0] Points [0, 40; -30, 0; 0, 190] DstBlock "Piston Position based on Geometry" DstPort 2 } Branch { Points [0, 40; 335, 0] Branch { DstBlock "Crank Angle in Omega" DstPort 1 } Branch { Points [0, 75] Branch { DstBlock "Switch For Heat Addition" DstPort 3 } Branch { Points [0, 370; 385, 0; 0, 15] Branch { DstBlock "Relational\nOperator" DstPort 1 } Branch { Points [0, 80] DstBlock "Relational\nOperator1" DstPort 1 } } } } } Line { SrcBlock "Piston Diameter (m)" SrcPort 1 DstBlock "Piston Force" DstPort 1 } Line { SrcBlock "Initial rad/s" SrcPort 1 DstBlock "Crank Position" DstPort 3 } Line { SrcBlock "Piston Force" SrcPort 1 Points [25, 0; 0, 80] Branch { Points [0, 5] DstBlock "Piston Position based on Geometry" DstPort 5 } Branch { Points [0, 125] DstBlock "Power2" DstPort 1 } } Line { SrcBlock "Piston Position based on Geometry" SrcPort 4 Points [25, 0; 0, 130] Branch { DstBlock "P x V2" DstPort 1 } Branch { Points [-550, 0] DstBlock "Sum" DstPort 2 } } Line { SrcBlock "Torque N/M" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Compression Ratio x:1" SrcPort 1 Points [285, 0; 0, -65] DstBlock "Piston Position based on Geometry" DstPort 6 } Line { SrcBlock "Piston Position based on Geometry" SrcPort 2 Points [60, 0] Branch { Points [0, 295; -345, 0; 0, 70] DstBlock "rv (Compression ratio)" DstPort 2 } Branch { DstBlock "Volume" DstPort 1 } } Line { Labels [0, 0] SrcBlock "Crank offeset (half stroke) (m)" SrcPort 1 Points [305, 0; 0, 100] DstBlock "Piston Position based on Geometry" DstPort 1 } Line { SrcBlock "Piston Position based on Geometry" SrcPort 1 Points [0, -110] DstBlock "Crank length S see Heys, page 44" DstPort 1 } Line { Labels [0, 0] SrcBlock "Connecting Rod Length (m)" SrcPort 1 Points [295, 0; 0, 115] DstBlock "Piston Position based on Geometry" DstPort 3 } Line { SrcBlock "Piston Position based on Geometry" SrcPort 3 Points [105, 0] DstBlock "Angle between Connecting rod and vertical" DstPort 1 } Line { SrcBlock "Piston Position based on Geometry" SrcPort 6 Points [5, 0] Branch { Points [0, 155; -270, 0; 0, 75] DstBlock "rv (Compression ratio)" DstPort 1 } Branch { Points [390, 0; 0, -305; 90, 0; 0, -100] DstBlock "More real air" DstPort 3 } } Line { Labels [0, 0] SrcBlock "Atm Pressure(Pa)" SrcPort 1 Points [75, 0] Branch { Points [0, 175] Branch { DstBlock "Switch For Heat Addition" DstPort 4 } Branch { Points [0, 545; -315, 0; 0, -25] DstBlock "Pressure" DstPort 4 } } Branch { Points [110, 0] DstBlock "More real air" DstPort 2 } } Line { Labels [0, 0] SrcBlock "Piston Force" SrcPort 2 DstBlock "Piston Position based on Geometry" DstPort 4 } Line { SrcBlock "Piston Position based on Geometry" SrcPort 5 DstBlock "Terminator" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Crank Position" DstPort 2 } Line { SrcBlock "T2" SrcPort 1 Points [30, 0] Branch { Points [0, 460; -330, 0; 0, 155; -85, 0] Branch { Points [0, 25] DstBlock "While Iterator\nSubsystem" DstPort 1 } Branch { Points [-95, 0; 0, 120] DstBlock "Pressure" DstPort 3 } } Branch { Points [90, 0; 0, -20] DstBlock "More real air" DstPort 1 } } Line { SrcBlock "P x V2" SrcPort 1 Points [15, 0] Branch { Points [0, 35] DstBlock "Power" DstPort 1 } Branch { Points [0, -35; 80, 0] DstBlock "P x V" DstPort 1 } } Line { SrcBlock "T1" SrcPort 1 DstBlock "P x V" DstPort 2 } Line { Labels [2, 0] SrcBlock "Initial Position" SrcPort 1 Points [0, -15] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Initial Position1" SrcPort 1 Points [20, 0; 0, -15] DstBlock "Relational\nOperator1" DstPort 2 } Line { SrcBlock "Logical\nOperator" SrcPort 1 Points [30, 0; 0, -85; -430, 0; 0, -35] DstBlock "Integrator" DstPort 2 } Line { SrcBlock "Relational\nOperator1" SrcPort 1 Points [20, 0; 0, -30] DstBlock "Logical\nOperator" DstPort 2 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [20, 0; 0, 35] DstBlock "Logical\nOperator" DstPort 1 } Line { SrcBlock "Switch For Heat Addition" SrcPort 1 Points [240, 0; 0, 605; -365, 0] Branch { Points [0, -40] DstBlock "Pressure1" DstPort 1 } Branch { Points [-1130, 0] DstBlock "Piston Force" DstPort 3 } } Line { SrcBlock "Crank Case Pressure (Pa)" SrcPort 1 DstBlock "Piston Force" DstPort 2 } Line { SrcBlock "P x V" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 DstBlock "Energy" DstPort 1 } Line { SrcBlock "While Iterator\nSubsystem" SrcPort 1 Points [15, 0; 0, 10] Branch { Points [0, 55] DstBlock "Pressure" DstPort 2 } Branch { Points [45, 0; 0, -50] DstBlock "Power1" DstPort 1 } } Line { SrcBlock "IC" SrcPort 1 DstBlock "While Iterator\nSubsystem" DstPort 3 } Line { SrcBlock "While Iterator\nSubsystem" SrcPort 2 Points [60, 0] DstBlock "Pressure" DstPort 1 } Line { SrcBlock "rv (Compression ratio)" SrcPort 1 DstBlock "While Iterator\nSubsystem" DstPort 2 } Line { SrcBlock "Piston Force" SrcPort 3 Points [0, 90; -145, 0] DstBlock "Power4" DstPort 1 } Line { SrcBlock "Pressure" SrcPort 1 Points [135, 0; 0, -560; 25, 0] Branch { Points [0, -35] DstBlock "Switch For Heat Addition" DstPort 1 } Branch { DstBlock "Switch For Heat Addition" DstPort 2 } } } } # Finite State Machines # # Stateflow Version 7.1 (R2008a) dated Sep 3 2008, 03:53:58 # # Stateflow { machine { id 1 name "MarkIIrevbron" created "04-Feb-2009 11:33:47" isLibrary 0 firstTarget 2 sfVersion 71014000.000007 } target { id 2 name "sfun" description "Default Simulink S-Function Target." machine 1 linkNode [1 0 0] } }