📄 engine1.mdl
字号:
}
Block {
BlockType Terminator
Name "Terminator"
Position [325, 223, 340, 237]
ShowName off
}
Block {
BlockType SubSystem
Name "Throttle & Manifold"
Ports [2, 1]
Position [135, 177, 235, 248]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "Throttle & Manifold"
Location [169, 219, 945, 572]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "portrait"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Throttle Ang."
Position [20, 25, 40, 45]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "Engine Speed, N"
Position [260, 140, 280, 160]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Saturate
Name "0 <= theta <= 90"
Position [85, 23, 105, 47]
NamePlacement "alternate"
UpperLimit "90"
LowerLimit "0"
LinearizeAsGain on
}
Block {
BlockType Constant
Name "Atmospheric\nPressure, Pa\n(bar)"
Position [90, 85, 110, 105]
Value "1.0"
VectorParams1D on
}
Block {
BlockType SubSystem
Name "Intake Manifold"
Ports [2, 2]
Position [420, 46, 615, 124]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "Intake Manifold"
Location [79, 420, 630, 689]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "mdot Input \n(g/s)"
Position [30, 80, 50, 100]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "N (rad/sec)"
Position [225, 140, 245, 160]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [325, 61, 330, 179]
BackgroundColor "black"
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Fcn
Name "Pumping"
Position [375, 109, 440, 131]
Expr "-0.366 + 0.08979*u[1]*u[2] - 0.0337*u[2"
"]*u[1]*u[1] + 0.0001*u[1]*u[2]*u[2]"
}
Block {
BlockType Gain
Name "RT/Vm"
Position [145, 70, 240, 110]
Gain "0.41328"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [100, 80, 120, 100]
ShowName off
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Integrator
Name "p0 = 0.543 bar"
Ports [1, 1]
Position [260, 61, 290, 119]
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition ".543"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Outport
Name "mdot to \nCylinder\n (g/s)"
Position [500, 110, 520, 130]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Manifold Pressure,\nPm (bar)"
Position [405, 15, 425, 35]
Port "2"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "mdot Input \n(g/s)"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "RT/Vm"
SrcPort 1
DstBlock "p0 = 0.543 bar"
DstPort 1
}
Line {
SrcBlock "N (rad/sec)"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Pumping"
DstPort 1
}
Line {
SrcBlock "p0 = 0.543 bar"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Mux"
DstPort 1
}
Branch {
Points [0, -65]
DstBlock "Manifold Pressure,\nPm (bar)"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "RT/Vm"
DstPort 1
}
Line {
SrcBlock "Pumping"
SrcPort 1
Points [20, 0]
Branch {
Points [0, 90; -355, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "mdot to \nCylinder\n (g/s)"
DstPort 1
}
}
Annotation {
Position [267, 243]
Text "Intake Manifold Vacuum"
FontSize 16
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "Throttle"
Ports [3, 1]
Position [150, 19, 390, 111]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "Throttle"
Location [25, 222, 609, 667]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Throttle Angle,\ntheta (deg)"
Position [65, 65, 85, 85]
NamePlacement "alternate"
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "Manifold Pressure,\nPm (bar)"
Position [65, 110, 85, 130]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "Atmospheric Pressure,\nPa (bar) "
Position [65, 180, 85, 200]
Port "3"
LatchInput off
Interpolate on
}
Block {
BlockType MinMax
Name "MinMax"
Ports [2, 1]
Position [240, 100, 265, 215]
ShowName off
Function "min"
Inputs "2"
Port {
PortNumber 1
Name "pratio"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
}
Block {
BlockType Product
Name "Product"
Ports [3, 1]
Position [470, 22, 490, 338]
ShowName off
Inputs "3"
Multiplication "Element-wise(.*)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [180, 112, 210, 143]
ShowName off
Inputs "*/"
Multiplication "Element-wise(.*)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [180, 167, 210, 198]
ShowName off
Inputs "/*"
Multiplication "Element-wise(.*)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Constant
Name "Sonic Flow "
Position [345, 190, 365, 210]
Value "1.0"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [150, 275, 170, 295]
ShowName off
IconShape "round"
Inputs "+-|"
SaturateOnIntegerOverflow on
}
Block {
BlockType Switch
Name "Switch"
Position [420, 148, 445, 212]
ShowName off
Threshold "0.5"
}
Block {
BlockType Fcn
Name "f(theta)"
Position [110, 64, 440, 86]
NamePlacement "alternate"
Expr "2.821 - 0.05231*u + 0.10299*u*u - 0.000"
"63*u*u*u"
}
Block {
BlockType Signum
Name "flow direction"
Position [300, 269, 335, 301]
}
Block {
BlockType Fcn
Name "g(pratio)"
Position [315, 148, 390, 172]
NamePlacement "alternate"
Expr "2*sqrt(u - u*u)"
}
Block {
BlockType Outport
Name "Throttle \nFlow, mdot\n (g/s)"
Position [535, 170, 555, 190]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Manifold Pressure,\nPm (bar)"
SrcPort 1
Points [40, 0]
Branch {
Points [0, 55]
Branch {
Points [0, 110]
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "Product2"
DstPort 1
}
}
Branch {
DstBlock "Product1"
DstPort 1
}
}
Line {
SrcBlock "Product2"
SrcPort 1
DstBlock "MinMax"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "MinMax"
DstPort 1
}
Line {
SrcBlock "Atmospheric Pressure,\nPa (bar) "
SrcPort 1
Points [70, 0]
Branch {
Points [0, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
DstBlock "Product2"
DstPort 2
}
}
Branch {
Points [0, -55]
DstBlock "Product1"
DstPort 2
}
}
Line {
SrcBlock "g(pratio)"
SrcPort 1
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Sonic Flow "
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "flow direction"
SrcPort 1
DstBlock "Product"
DstPort 3
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "flow direction"
DstPort 1
}
Line {
Name "pratio"
Labels [1, 0]
SrcBlock "MinMax"
SrcPort 1
Points [20, 0]
Branch {
Points [0, 20]
DstBlock "Switch"
DstPort 2
}
Branch {
DstBlock "g(pratio)"
DstPort 1
}
}
Line {
SrcBlock "Throttle Angle,\ntheta (deg)"
SrcPort 1
DstBlock "f(theta)"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Throttle \nFlow, mdot\n (g/s)"
DstPort 1
}
Line {
SrcBlock "f(theta)"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Annotation {
Position [291, 372]
Text "Throttle Flow vs. Valve Angle and Press"
"ure"
FontSize 16
FontWeight "bold"
}
}
}
Block {
BlockType Outport
Name "Mass Airflow Rate"
Position [660, 55, 680, 75]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "0 <= theta <= 90"
SrcPort 1
DstBlock "Throttle"
DstPort 1
}
Line {
SrcBlock "Throttle Ang."
SrcPort 1
DstBlock "0 <= theta <= 90"
DstPort 1
}
Line {
SrcBlock "Throttle"
SrcPort 1
DstBlock "Intake Manifold"
DstPort 1
}
Line {
SrcBlock "Engine Speed, N"
SrcPort 1
Points [120, 0]
DstBlock "Intake Manifold"
DstPort 2
}
Line {
SrcBlock "Intake Manifold"
SrcPort 2
Points [20, 0; 0, 80; -585, 0; 0, -120]
DstBlock "Throttle"
DstPort 2
}
Line {
SrcBlock "Intake Manifold"
SrcPort 1
DstBlock "Mass Airflow Rate"
DstPort 1
}
Line {
SrcBlock "Atmospheric\nPressure, Pa\n(bar)"
SrcPort 1
DstBlock "Throttle"
DstPort 3
}
}
}
Block {
BlockType SubSystem
Name "Vehicle\nDynamics"
Ports [2, 1]
Position [575, 162, 615, 238]
ShowPortLabels on
TreatAsAtomicUnit off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -