Overview
Comment:Updated for new MTT
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: e7296f7eecc7564f2c4acb63fad801fbee6159a5b785a3b19a89f1764afa02ba
User & Date: gawthrop@users.sourceforge.net on 2003-08-19 15:44:55
Other Links: branch diff | manifest | tags
Context
2003-08-19
15:49:43
Don't build in -oct option check-in: 21c8f0fea2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:44:55
Updated for new MTT check-in: e7296f7eec user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:40:25
Fix _ prob in section headers. check-in: 575ee17dfd user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/compound/Chemical/Rate/Rate_cr.r from [1c605288a8] to [461ff05253].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
%% CR file for rate-of reaction component RATE

OPERATOR Rate;

% Reaction rate
FOR ALL k,q,h,n,Conc,Temp LET
    Rate(k,q,h,n,flow,1,
         Conc,effort,1,
	 Temp,effort,2
	 ) 
	 = k*Conc^n*e^(-q/Temp);

% Heat
FOR ALL k,q,h,n,Conc,Temp LET
    Rate(k,q,h,n,flow,2,
         Conc,effort,1,
	 Temp,effort,2
	 ) 
	 = k*Conc^n*h*e^(-q/Temp);

END;





|
|






|
|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
%% CR file for rate-of reaction component RATE

OPERATOR Rate;

% Reaction rate
FOR ALL comp,k,q,h,n,Conc,Temp LET
    Rate(comp,k,q,h,n,flow,1,
         Conc,effort,1,
	 Temp,effort,2
	 ) 
	 = k*Conc^n*e^(-q/Temp);

% Heat
FOR ALL comp,k,q,h,n,Conc,Temp LET
    Rate(comp,k,q,h,n,flow,2,
         Conc,effort,1,
	 Temp,effort,2
	 ) 
	 = k*Conc^n*h*e^(-q/Temp);

END;

Modified mttroot/mtt/lib/comp/compound/GasDynamics/CG/CG_cr.r from [277d0d5c65] to [1677b660d4].

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
%SUMMARY CG	CR two-port C thermal pseudo Bond Graph for gas dynamics


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % $Id$
% % $Log$



% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



OPERATOR CG;

% Port 1 : temperature
FOR ALL c_v,r,Enthalpy,Stored_Mass,Volume
LET CG(c_v,r, effort, 1,
		Enthalpy,state,1,
		Stored_Mass,state,2,
		Volume,state,3)
	 = Enthalpy/(c_v*Stored_Mass);

% Port 2 : Pressure
FOR ALL c_v,r,Enthalpy,Stored_Mass,Volume
LET CG(c_v,r, effort, 2,
		Enthalpy,state,1,
		Stored_Mass,state,2,
		Volume,state,3)
	 = (R/c_v)*(Enthalpy/Volume);

% Port 3 : (Also) Pressure
FOR ALL c_v,r,Enthalpy,Stored_Mass,Volume
LET CG(c_v,r, effort, 3,
		Enthalpy,state,1,
		Stored_Mass,state,2,
		Volume,state,3)
	 = (R/c_v)*(Enthalpy/Volume);

END;;









>
>
>







|
|






|
|






|
|







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
%SUMMARY CG	CR two-port C thermal pseudo Bond Graph for gas dynamics


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % $Id$
% % $Log$
% % Revision 1.1  1998/03/04 15:38:16  peterg
% % Initial revision
% %
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



OPERATOR CG;

% Port 1 : temperature
FOR ALL COMP, c_v,r,Enthalpy,Stored_Mass,Volume
LET CG(COMP, c_v,r, effort, 1,
		Enthalpy,state,1,
		Stored_Mass,state,2,
		Volume,state,3)
	 = Enthalpy/(c_v*Stored_Mass);

% Port 2 : Pressure
FOR ALL COMP, c_v,r,Enthalpy,Stored_Mass,Volume
LET CG(COMP, c_v,r, effort, 2,
		Enthalpy,state,1,
		Stored_Mass,state,2,
		Volume,state,3)
	 = (R/c_v)*(Enthalpy/Volume);

% Port 3 : (Also) Pressure
FOR ALL COMP, c_v,r,Enthalpy,Stored_Mass,Volume
LET CG(COMP, c_v,r, effort, 3,
		Enthalpy,state,1,
		Stored_Mass,state,2,
		Volume,state,3)
	 = (R/c_v)*(Enthalpy/Volume);

END;;

Modified mttroot/mtt/lib/comp/compound/GasDynamics/RG/RG_cr.r from [2b2ce5b134] to [e11fae6313].

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
%SUMMARY RG	CR for 2 port gas dymanics R: isentropic nozzle


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % $Id$
% % $Log$



% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



OPERATOR RG;

% Port 1 : Enthalpy flow
FOR ALL gamma,R,A,T_u,P_u,T_d,P_d
LET RG(gamma,R,A, flow, 1,
		T_u,effort,1,
		P_u,effort,2,
		T_d,effort,3,
		P_d,effort,4)
	 = A*( P_u/sqrt(T_u) )
           *sqrt( (2*gamma)/(R*(gamma-1)) )
           *sqrt( (P_d/P_u)^(2/gamma) - (P_d/P_u)^((1+gamma)/gamma) )
           *(gamma/(gamma-1))*R*T_u;

% Port 2 : Mass flow
FOR ALL gamma,R,A,T_u,P_u,T_d,P_d
LET RG(gamma,R,A, flow, 2,
		T_u,effort,1,
		P_u,effort,2,
		T_d,effort,3,
		P_d,effort,4)
	 = A*( P_u/sqrt(T_u) )
           *sqrt( (2*gamma)/(R*(gamma-1)) )
           *sqrt( (P_d/P_u)^(2/gamma) - (P_d/P_u)^((1+gamma)/gamma) );

% Port 3 : Enthalpy flow
FOR ALL gamma,R,A,T_u,P_u,T_d,P_d
LET RG(gamma,R,A, flow, 3,
		T_u,effort,1,
		P_u,effort,2,
		T_d,effort,3,
		P_d,effort,4)
	 = A*( P_u/sqrt(T_u) )
           *sqrt( (2*gamma)/(R*(gamma-1)) )
           *sqrt( (P_d/P_u)^(2/gamma) - (P_d/P_u)^((1+gamma)/gamma) )
           *(gamma/(gamma-1))*R*T_u;

% Port 4 : Mass flow
FOR ALL gamma,R,A,T_u,P_u,T_d,P_d
LET RG(gamma,R,A, flow, 4,
		T_u,effort,1,
		P_u,effort,2,
		T_d,effort,3,
		P_d,effort,4)
	 = A*( P_u/sqrt(T_u) )
           *sqrt( (2*gamma)/(R*(gamma-1)) )
           *sqrt( (P_d/P_u)^(2/gamma) - (P_d/P_u)^((1+gamma)/gamma) );








>
>
>







|
|










|
|









|
|










|
|







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
%SUMMARY RG	CR for 2 port gas dymanics R: isentropic nozzle


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % $Id$
% % $Log$
% % Revision 1.1  1998/03/04 15:37:48  peterg
% % Initial revision
% %
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



OPERATOR RG;

% Port 1 : Enthalpy flow
FOR ALL COMP, gamma,R,A,T_u,P_u,T_d,P_d
LET RG(COMP, gamma,R,A, flow, 1,
		T_u,effort,1,
		P_u,effort,2,
		T_d,effort,3,
		P_d,effort,4)
	 = A*( P_u/sqrt(T_u) )
           *sqrt( (2*gamma)/(R*(gamma-1)) )
           *sqrt( (P_d/P_u)^(2/gamma) - (P_d/P_u)^((1+gamma)/gamma) )
           *(gamma/(gamma-1))*R*T_u;

% Port 2 : Mass flow
FOR ALL COMP, gamma,R,A,T_u,P_u,T_d,P_d
LET RG(COMP, gamma,R,A, flow, 2,
		T_u,effort,1,
		P_u,effort,2,
		T_d,effort,3,
		P_d,effort,4)
	 = A*( P_u/sqrt(T_u) )
           *sqrt( (2*gamma)/(R*(gamma-1)) )
           *sqrt( (P_d/P_u)^(2/gamma) - (P_d/P_u)^((1+gamma)/gamma) );

% Port 3 : Enthalpy flow
FOR ALL COMP, gamma,R,A,T_u,P_u,T_d,P_d
LET RG(COMP, gamma,R,A, flow, 3,
		T_u,effort,1,
		P_u,effort,2,
		T_d,effort,3,
		P_d,effort,4)
	 = A*( P_u/sqrt(T_u) )
           *sqrt( (2*gamma)/(R*(gamma-1)) )
           *sqrt( (P_d/P_u)^(2/gamma) - (P_d/P_u)^((1+gamma)/gamma) )
           *(gamma/(gamma-1))*R*T_u;

% Port 4 : Mass flow
FOR ALL COMP, gamma,R,A,T_u,P_u,T_d,P_d
LET RG(COMP, gamma,R,A, flow, 4,
		T_u,effort,1,
		P_u,effort,2,
		T_d,effort,3,
		P_d,effort,4)
	 = A*( P_u/sqrt(T_u) )
           *sqrt( (2*gamma)/(R*(gamma-1)) )
           *sqrt( (P_d/P_u)^(2/gamma) - (P_d/P_u)^((1+gamma)/gamma) );

Modified mttroot/mtt/lib/comp/compound/Thermal/CU/CU_cr.r from [d23d96eb5a] to [796052bb26].

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
74
75
76
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.1  1997/12/07 20:45:21  peterg
% %% Initial revision
% %%
% %% Revision 1.1  1996/11/02  10:21:19  peterg
% %% Initial revision
% %%
% %% Revision 1.1  1996/09/12 11:18:26  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


OPERATOR CU;

%% Integral/Integral causality
Port 1 - Thermal
FOR ALL c_v,gamma,m,InternalEnergy,Volume
LET CU(ideal_gas,c_v,gamma,m,effort,1,
	InternalEnergy, state, 1,
	Volume, state, 2)
         = InternalEnergy/(m*c_v);

Port 2 - Mechanical
FOR ALL c_v,gamma,m,InternalEnergy,Volume
LET CU(ideal_gas,c_v,gamma,m,effort,2,
	InternalEnergy, state, 1,
	Volume, state, 2)
         = (gamma-1)*(InternalEnergy)/Volume;

%% Derivative/Integral causality
Port 1 - Thermal
FOR ALL c_v,gamma,m,Temperature,Volume
LET CU(ideal_gas,c_v,gamma,m,state,1,
	Temperature, effort, 1,
	Volume, state, 2)
         = Temperature*(m*c_v);

Port 2 - Mechanical
FOR ALL c_v,gamma,m,Temperature,Volume
LET CU(ideal_gas,c_v,gamma,m,effort,2,
	Temperature, effort, 1,
	Volume, state, 2)
         = (gamma-1)*(m*c_v)*(Temperature)/Volume;

%% Integral/Derivative causality
Port 1 - Thermal
FOR ALL c_v,gamma,m,InternalEnergy,Pressure
LET CU(ideal_gas,c_v,gamma,m,effort,1,
	InternalEnergy, state, 1,
	Pressure, effort, 2)
         = InternalEnergy/(m*c_v);

Port 2 - Mechanical
FOR ALL c_v,gamma,m,InternalEnergy,Pressure
LET CU(ideal_gas,c_v,gamma,m,state,2,
	InternalEnergy, state, 1,
	Pressure, effort, 2)
         = (gamma-1)*(InternalEnergy)/Pressure;


END;







>
>
>
















|
|





|
|






|
|





|
|






|
|





|
|






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
74
75
76
77
78
79
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 10:34:56  peterg
% %% Put under RCS
% %%
% %% Revision 1.1  1997/12/07 20:45:21  peterg
% %% Initial revision
% %%
% %% Revision 1.1  1996/11/02  10:21:19  peterg
% %% Initial revision
% %%
% %% Revision 1.1  1996/09/12 11:18:26  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


OPERATOR CU;

%% Integral/Integral causality
Port 1 - Thermal
FOR ALL COMPONENT,  c_v,gamma,m,InternalEnergy,Volume
LET CU(COMPONENT, ideal_gas,c_v,gamma,m,effort,1,
	InternalEnergy, state, 1,
	Volume, state, 2)
         = InternalEnergy/(m*c_v);

Port 2 - Mechanical
FOR ALL COMPONENT,  c_v,gamma,m,InternalEnergy,Volume
LET CU(COMPONENT, ideal_gas,c_v,gamma,m,effort,2,
	InternalEnergy, state, 1,
	Volume, state, 2)
         = (gamma-1)*(InternalEnergy)/Volume;

%% Derivative/Integral causality
Port 1 - Thermal
FOR ALL COMPONENT,  c_v,gamma,m,Temperature,Volume
LET CU(COMPONENT, ideal_gas,c_v,gamma,m,state,1,
	Temperature, effort, 1,
	Volume, state, 2)
         = Temperature*(m*c_v);

Port 2 - Mechanical
FOR ALL COMPONENT,  c_v,gamma,m,Temperature,Volume
LET CU(COMPONENT, ideal_gas,c_v,gamma,m,effort,2,
	Temperature, effort, 1,
	Volume, state, 2)
         = (gamma-1)*(m*c_v)*(Temperature)/Volume;

%% Integral/Derivative causality
Port 1 - Thermal
FOR ALL COMPONENT,  c_v,gamma,m,InternalEnergy,Pressure
LET CU(COMPONENT, ideal_gas,c_v,gamma,m,effort,1,
	InternalEnergy, state, 1,
	Pressure, effort, 2)
         = InternalEnergy/(m*c_v);

Port 2 - Mechanical
FOR ALL COMPONENT,  c_v,gamma,m,InternalEnergy,Pressure
LET CU(COMPONENT, ideal_gas,c_v,gamma,m,state,2,
	InternalEnergy, state, 1,
	Pressure, effort, 2)
         = (gamma-1)*(InternalEnergy)/Pressure;


END;

Modified mttroot/mtt/lib/comp/compound/Thermal/CompressibleFlow/Density/Density_cr.r from [5fd3e01e3d] to [e0f1508d57].

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
% Constitutive relation file for Density (Density_cr.r)
% Generated by MTT at Wed Mar 11 11:01:28 GMT 1998

OPERATOR Density;

% Ideal gas
FOR ALL R,Temperature,Pressure,Nothing
LET Density(density,ideal_gas,R,effort,3,
	Pressure,effort,1,
	Temperature,effort,2,
	Nothing,flow,3
	) = Pressure/(R*Temperature);

FOR ALL R,Temperature,Pressure,Nothing
LET Density(specific_volume,ideal_gas,R,effort,3,
	Pressure,effort,1,
	Temperature,effort,2,
	Nothing,flow,3
	) = (R*Temperature)/Pressure;

% Incompressible
FOR ALL rho,Temperature,Pressure,Nothing
LET Density(density,incompressible,rho,effort,3,
	Pressure,effort,1,
	Temperature,effort,2,
	Nothing,flow,3
	) = rho;

FOR ALL rho,Temperature,Pressure,Nothing
LET Density(specific_volume,incompressible,rho,effort,3,
	Pressure,effort,1,
	Temperature,effort,2,
	Nothing,flow,3
	) = 1/rho;

END;






|
|





|
|






|
|





|
|






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
% Constitutive relation file for Density (Density_cr.r)
% Generated by MTT at Wed Mar 11 11:01:28 GMT 1998

OPERATOR Density;

% Ideal gas
FOR ALL COMPONENT,  R,Temperature,Pressure,Nothing
LET Density(COMPONENT, density,ideal_gas,R,effort,3,
	Pressure,effort,1,
	Temperature,effort,2,
	Nothing,flow,3
	) = Pressure/(R*Temperature);

FOR ALL COMPONENT,  R,Temperature,Pressure,Nothing
LET Density(COMPONENT, specific_volume,ideal_gas,R,effort,3,
	Pressure,effort,1,
	Temperature,effort,2,
	Nothing,flow,3
	) = (R*Temperature)/Pressure;

% Incompressible
FOR ALL COMPONENT,  rho,Temperature,Pressure,Nothing
LET Density(COMPONENT, density,incompressible,rho,effort,3,
	Pressure,effort,1,
	Temperature,effort,2,
	Nothing,flow,3
	) = rho;

FOR ALL COMPONENT,  rho,Temperature,Pressure,Nothing
LET Density(COMPONENT, specific_volume,incompressible,rho,effort,3,
	Pressure,effort,1,
	Temperature,effort,2,
	Nothing,flow,3
	) = 1/rho;

END;

Modified mttroot/mtt/lib/comp/compound/Thermal/CompressibleFlow/Poly/Poly_cr.r from [ad1eaacee8] to [60c0a3c72c].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
% Constitutive relation file for Poly (Poly_cr.r)
% Generated by MTT at Wed Mar 11 11:01:28 GMT 1998

OPERATOR Poly;

% Ideal gas

% Temperature output on port [T2]
FOR ALL alpha,P1,P2,T1,Nothing
LET Poly(alpha,effort,4,
	P1,effort,1,
	P2,effort,2,
	T1,effort,3,
	Nothing,flow,4
	) = T1*(P2/P1)^alpha;










|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
% Constitutive relation file for Poly (Poly_cr.r)
% Generated by MTT at Wed Mar 11 11:01:28 GMT 1998

OPERATOR Poly;

% Ideal gas

% Temperature output on port [T2]
FOR ALL COMPONENT,  alpha,P1,P2,T1,Nothing
LET Poly(COMPONENT, alpha,effort,4,
	P1,effort,1,
	P2,effort,2,
	T1,effort,3,
	Nothing,flow,4
	) = T1*(P2/P1)^alpha;


Modified mttroot/mtt/lib/comp/compound/Thermal/IncompressibleFlow/Tank/Tank_cr.r from [79aee20085] to [2d58561817].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
% Constitutive relation file for Tank (Tank_cr.r)
% Generated by MTT at Thu Mar  5 10:30:23 GMT 1998

OPERATOR tank;

%Pressure
FOR ALL rho,c_p,c,Volume,Energy
LET tank(rho,c_p,c,effort,1,
	Volume,state,1,
	Energy,state,2
	) = (Volume*rho)/c;

%Temperature
FOR ALL rho,c_p,c,Volume,Energy
LET tank(rho,c_p,c,effort,2,
	Volume,state,1,
	Energy,state,2
	) = Energy/(Volume*rho*c_p);

END;






|
|





|
|





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
% Constitutive relation file for Tank (Tank_cr.r)
% Generated by MTT at Thu Mar  5 10:30:23 GMT 1998

OPERATOR tank;

%Pressure
FOR ALL COMPONENT, rho,c_p,c,Volume,Energy
LET tank(COMPONENT, rho,c_p,c,effort,1,
	Volume,state,1,
	Energy,state,2
	) = (Volume*rho)/c;

%Temperature
FOR ALL COMPONENT, rho,c_p,c,Volume,Energy
LET tank(COMPONENT, rho,c_p,c,effort,2,
	Volume,state,1,
	Energy,state,2
	) = Energy/(Volume*rho*c_p);

END;

Modified mttroot/mtt/lib/comp/simple/ES_alias.m from [682108bc4c] to [2c3cf765fe].

1
2
3
4
5
6
7



8
9
10
11
12






13
14
15
function alias = ES_alias	# Port aliases for ES

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



###############################################################

  alias.in     = '1';
  alias.out    = '2';







endfunction









>
>
>





>
>
>
>
>
>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function alias = ES_alias	# Port aliases for ES

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1998/07/02 14:47:53  peterg
## Initial revision
##
###############################################################

  alias.in     = '1';
  alias.out    = '2';

  alias.e     = '1';
  alias.s     = '2';

  alias.enthalpy     = '1';
  alias.entropy      = '2';

endfunction


Modified mttroot/mtt/lib/comp/simple/FMR_alias.m from [fb7f54e190] to [85c12f71ad].

1
2
3
4
5
6
7



8
9
10
11
12
13
14
15
16
function alias = FMR_alias	# Port aliases for FMR

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



###############################################################

  alias.in     = '1';
  alias.out    = '2';
  alias.mod    = '3';

endfunction









>
>
>




|




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function alias = FMR_alias	# Port aliases for FMR

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1998/07/02 14:47:14  peterg
## Initial revision
##
###############################################################

  alias.in     = '1';
  alias.out    = '2';
  alias.mod    = '2';

endfunction


Modified mttroot/mtt/lib/cr/r/cm.cr from [c86e6a6abf] to [2b06c8ed91].

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
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.1  1996/11/02  10:21:19  peterg
% %% Initial revision
% %%
% %% Revision 1.1  1996/09/12 11:18:26  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


OPERATOR cm;
%Linear electrical bit
FOR ALL c_0,x_0,elec_state,mech_state LET
cm(c_0,x_0,effort,1,
	elec_state,state,1,
	mech_state,state,2
	)
	= elec_state/(c_0*x_0/mech_state);

%Nonlinear mechanical bit
FOR ALL c_0,x_0,elec_state,mech_state LET
cm(c_0,x_0,effort,2,
	elec_state,state,1,
	mech_state,state,2
	)
	= -(c_0*x_0)*((elec_state/mech_state)^2)/2; 

END;;







>
>
>











|
|






|
|






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
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 09:18:38  peterg
% %% put under RCS
% %%
% %% Revision 1.1  1996/11/02  10:21:19  peterg
% %% Initial revision
% %%
% %% Revision 1.1  1996/09/12 11:18:26  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


OPERATOR cm;
%Linear electrical bit
FOR ALL comp,c_0,x_0,elec_state,mech_state LET
cm(comp,c_0,x_0,effort,1,
	elec_state,state,1,
	mech_state,state,2
	)
	= elec_state/(c_0*x_0/mech_state);

%Nonlinear mechanical bit
FOR ALL comp,c_0,x_0,elec_state,mech_state LET
cm(comp,c_0,x_0,effort,2,
	elec_state,state,1,
	mech_state,state,2
	)
	= -(c_0*x_0)*((elec_state/mech_state)^2)/2; 

END;;

Modified mttroot/mtt/lib/cr/r/lcos.cr from [ae185fb84f] to [09845c166a].

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


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.1  1996/11/02 10:18:07  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


OPERATOR lcos;

%DESCRIPTION three port component: EMTF
FOR ALL gain, input, causality, gain_causality, outport, inport,
	 m_input, m_causality
SUCH THAT (
	(causality = gain_causality) AND (outport = 2)
	OR
	(causality NEQ gain_causality) AND (outport = 1)
	)
LET lcos(gain_causality, gain, causality, outport, 
	input, causality, inport,
	m_input, m_causality, 3)
	 = cos(m_input)*gain*input;

FOR ALL gain, input, causality, gain_causality, outport, inport,
	 m_input, m_causality
SUCH THAT (
	(causality NEQ gain_causality) AND (outport = 2)
	OR
	(causality = gain_causality) AND (outport = 1)
	)
LET lcos(gain_causality, gain, causality, outport, 
	input, causality, inport,
	m_input, m_causality, 3)
	 = input/(cos(m_input)*gain);

END;;







>
>
>









|






|




|






|





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


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.2  1998/03/04 17:51:02  peterg
% %% Added END
% %%
% %% Revision 1.1  1996/11/02 10:18:07  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


OPERATOR lcos;

%DESCRIPTION three port component: EMTF
FOR ALL comp_type, gain, input, causality, gain_causality, outport, inport,
	 m_input, m_causality
SUCH THAT (
	(causality = gain_causality) AND (outport = 2)
	OR
	(causality NEQ gain_causality) AND (outport = 1)
	)
LET lcos(comp_type, gain_causality, gain, causality, outport, 
	input, causality, inport,
	m_input, m_causality, 3)
	 = cos(m_input)*gain*input;

FOR ALL comp_type, gain, input, causality, gain_causality, outport, inport,
	 m_input, m_causality
SUCH THAT (
	(causality NEQ gain_causality) AND (outport = 2)
	OR
	(causality = gain_causality) AND (outport = 1)
	)
LET lcos(comp_type, gain_causality, gain, causality, outport, 
	input, causality, inport,
	m_input, m_causality, 3)
	 = input/(cos(m_input)*gain);

END;;

Modified mttroot/mtt/lib/cr/r/lsin.cr from [e44298d701] to [0a475c4148].

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


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.1  1996/11/02 10:18:25  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


OPERATOR lsin;

%DESCRIPTION three port component: EMTF
FOR ALL gain, input, causality, gain_causality, outport, inport,
	 m_input, m_causality
SUCH THAT (
	(causality = gain_causality) AND (outport = 2)
	OR
	(causality NEQ gain_causality) AND (outport = 1)
	)
LET lsin(gain_causality, gain, causality, outport, 
	input, causality, inport,
	m_input, m_causality, 3)
	 = sin(m_input)*gain*input;

FOR ALL gain, input, causality, gain_causality, outport, inport,
	 m_input, m_causality
SUCH THAT (
	(causality NEQ gain_causality) AND (outport = 2)
	OR
	(causality = gain_causality) AND (outport = 1)
	)
LET lsin(gain_causality, gain, causality, outport, 
	input, causality, inport,
	m_input, m_causality, 3)
	 = input/(sin(m_input)*gain);

END;;







>
>
>









|






|




|






|





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


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.2  1998/03/04 17:51:37  peterg
% %% Added END
% %%
% %% Revision 1.1  1996/11/02 10:18:25  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


OPERATOR lsin;

%DESCRIPTION three port component: EMTF
FOR ALL comp_type, gain, input, causality, gain_causality, outport, inport,
	 m_input, m_causality
SUCH THAT (
	(causality = gain_causality) AND (outport = 2)
	OR
	(causality NEQ gain_causality) AND (outport = 1)
	)
LET lsin(comp_type, gain_causality, gain, causality, outport, 
	input, causality, inport,
	m_input, m_causality, 3)
	 = sin(m_input)*gain*input;

FOR ALL comp_type, gain, input, causality, gain_causality, outport, inport,
	 m_input, m_causality
SUCH THAT (
	(causality NEQ gain_causality) AND (outport = 2)
	OR
	(causality = gain_causality) AND (outport = 1)
	)
LET lsin(comp_type, gain_causality, gain, causality, outport, 
	input, causality, inport,
	m_input, m_causality, 3)
	 = input/(sin(m_input)*gain);

END;;


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]