-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompactTM.sysml
More file actions
73 lines (64 loc) · 2.56 KB
/
Copy pathCompactTM.sysml
File metadata and controls
73 lines (64 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package CompactTM {
private import TM::*;
part tankModelcompact :> tankModel {
part redefines tank {
attribute redefines tankDiameter = 3.9[m];
attribute redefines dischargeCoefficient = 3.2;
}
flow LH2 from valve.valveBehavior.valveOutput.Qo to tank.tankBehavior.tankInput.Qin;
}
requirement smallTMRequirement : TankRequirement {
subject references tankModelcompact.tank;
doc /* The diameter of the small tank shall be lower than 4[m] */
assume constraint { tankModelcompact.tank.tankDiameter < 4[m] }
}
analysis smallTMAnalysis : TankAnalysis {
subject references tankModelcompact;
}
requirement maxHeightRequirementSmall :> smallTMRequirement : MaxHeightRequirement {
subject references tankModelcompact.tank;
doc /* The maximum height allowable of the small tank is 10 [m]. */
attribute redefines requiredMaxHeight = 10 [m];
}
analysis maxHeightAnalysisSmall : MaxHeightAnalysis {
subject references tankModelcompact;
redefines simCond {
redefines fromTime = 50[s];
redefines toTime = 400[s];
}
@MgS::Extension::MATLAB {
command = (
"try, set_param('TM','StartTime','50','StopTime','400'); catch, end"
);
}
return simulatedMaxHeight : LengthValue = tankModelcompact.tank.tankBehavior.tankOutput.h{
@MgS::SimRet {
ret = Retrieval::MAX; name = "simulatedMaxHeight";
}
}
}
requirement minVolumeRequirementSmall :> smallTMRequirement : MinVolumeRequirement {
subject references tankModelcompact.tank;
doc /* The target minimum volume of small TMs is 100 [L]. */
attribute redefines requiredMinVolume = 100 [L];
}
analysis minVolumeAnalysisSmall : MinVolumeAnalysis {
subject references tankModelcompact;
redefines simCond {
redefines fromTime = 50[s];
redefines toTime = 400[s];
}
@MgS::Extension::MATLAB {
command = (
"try, set_param('TM','StartTime','50','StopTime','400'); catch, end"
);
}
return simulatedFinalVolume:VolumeFlowRateValue = tankModelcompact.tank.tankBehavior.tankOutput.V{
@MgS::SimRet {
ret = Retrieval::FINAL; name = "simulatedFinalVolume";
}
}
}
satisfy minVolumeRequirementSmall by tankModelcompact.tank;
satisfy maxHeightRequirementSmall by tankModelcompact.tank;
}