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
|
# %% Initial revision
# %%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Set the inputs
if ((t>=0.0)&&(t<1.0)) #Compression
OttoCycle__Heat = 0.0; # Entropy flow
OttoCycle__Work = -0.8; # Volume rate-of-change
endif;
if ((t>=1.0)&&(t<2.0)) #Heating
OttoCycle__Heat = 1000; # Entropy flow
OttoCycle__Work = 0.0; # Volume rate-of-change
endif;
if ((t>=2.0)&&(t<3.0)) #Expansion
OttoCycle__Heat = 0.0; # Entropy flow
OttoCycle__Work = 0.8; # Volume rate-of-change
endif;
if (t>=3.0) #Cooling
OttoCycle__Heat = -1000; # Entropy flow
OttoCycle__Work = 0.0; # Volume rate-of-change
endif;
|
|
|
|
|
|
|
|
|
|
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
|
# %% Initial revision
# %%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Set the inputs
if ((t>=0.0)&&(t<1.0)) #Compression
OttoCycle__Heat__u = 0.0; # Entropy flow
OttoCycle__Work__u = -0.8; # Volume rate-of-change
endif;
if ((t>=1.0)&&(t<2.0)) #Heating
OttoCycle__Heat__u = 1000; # Entropy flow
OttoCycle__Work__u = 0.0; # Volume rate-of-change
endif;
if ((t>=2.0)&&(t<3.0)) #Expansion
OttoCycle__Heat__u = 0.0; # Entropy flow
OttoCycle__Work__u = 0.8; # Volume rate-of-change
endif;
if (t>=3.0) #Cooling
OttoCycle__Heat__u = -1000; # Entropy flow
OttoCycle__Work__u = 0.0; # Volume rate-of-change
endif;
|