Index: mttroot/mtt/lib/comp/compound/Chemical/Rate/Rate_cr.r ================================================================== --- mttroot/mtt/lib/comp/compound/Chemical/Rate/Rate_cr.r +++ mttroot/mtt/lib/comp/compound/Chemical/Rate/Rate_cr.r @@ -1,20 +1,20 @@ %% 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, +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 k,q,h,n,Conc,Temp LET - Rate(k,q,h,n,flow,2, +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); Index: mttroot/mtt/lib/comp/compound/GasDynamics/CG/CG_cr.r ================================================================== --- mttroot/mtt/lib/comp/compound/GasDynamics/CG/CG_cr.r +++ mttroot/mtt/lib/comp/compound/GasDynamics/CG/CG_cr.r @@ -4,35 +4,38 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % $Id$ % % $Log$ +% % Revision 1.1 1998/03/04 15:38:16 peterg +% % Initial revision +% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OPERATOR CG; % Port 1 : temperature -FOR ALL c_v,r,Enthalpy,Stored_Mass,Volume -LET CG(c_v,r, effort, 1, +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 c_v,r,Enthalpy,Stored_Mass,Volume -LET CG(c_v,r, effort, 2, +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 c_v,r,Enthalpy,Stored_Mass,Volume -LET CG(c_v,r, effort, 3, +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); Index: mttroot/mtt/lib/comp/compound/GasDynamics/RG/RG_cr.r ================================================================== --- mttroot/mtt/lib/comp/compound/GasDynamics/RG/RG_cr.r +++ mttroot/mtt/lib/comp/compound/GasDynamics/RG/RG_cr.r @@ -4,19 +4,22 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 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 gamma,R,A,T_u,P_u,T_d,P_d -LET RG(gamma,R,A, flow, 1, +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) ) @@ -23,23 +26,23 @@ *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, +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 gamma,R,A,T_u,P_u,T_d,P_d -LET RG(gamma,R,A, flow, 3, +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) ) @@ -46,12 +49,12 @@ *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, +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) ) Index: mttroot/mtt/lib/comp/compound/Thermal/CU/CU_cr.r ================================================================== --- mttroot/mtt/lib/comp/compound/Thermal/CU/CU_cr.r +++ mttroot/mtt/lib/comp/compound/Thermal/CU/CU_cr.r @@ -11,10 +11,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% 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 @@ -27,50 +30,50 @@ 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, +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 c_v,gamma,m,InternalEnergy,Volume -LET CU(ideal_gas,c_v,gamma,m,effort,2, +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 c_v,gamma,m,Temperature,Volume -LET CU(ideal_gas,c_v,gamma,m,state,1, +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 c_v,gamma,m,Temperature,Volume -LET CU(ideal_gas,c_v,gamma,m,effort,2, +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 c_v,gamma,m,InternalEnergy,Pressure -LET CU(ideal_gas,c_v,gamma,m,effort,1, +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 c_v,gamma,m,InternalEnergy,Pressure -LET CU(ideal_gas,c_v,gamma,m,state,2, +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; Index: mttroot/mtt/lib/comp/compound/Thermal/CompressibleFlow/Density/Density_cr.r ================================================================== --- mttroot/mtt/lib/comp/compound/Thermal/CompressibleFlow/Density/Density_cr.r +++ mttroot/mtt/lib/comp/compound/Thermal/CompressibleFlow/Density/Density_cr.r @@ -2,34 +2,34 @@ % 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, +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 R,Temperature,Pressure,Nothing -LET Density(specific_volume,ideal_gas,R,effort,3, +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 rho,Temperature,Pressure,Nothing -LET Density(density,incompressible,rho,effort,3, +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 rho,Temperature,Pressure,Nothing -LET Density(specific_volume,incompressible,rho,effort,3, +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; Index: mttroot/mtt/lib/comp/compound/Thermal/CompressibleFlow/Poly/Poly_cr.r ================================================================== --- mttroot/mtt/lib/comp/compound/Thermal/CompressibleFlow/Poly/Poly_cr.r +++ mttroot/mtt/lib/comp/compound/Thermal/CompressibleFlow/Poly/Poly_cr.r @@ -4,12 +4,12 @@ OPERATOR Poly; % Ideal gas % Temperature output on port [T2] -FOR ALL alpha,P1,P2,T1,Nothing -LET Poly(alpha,effort,4, +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; Index: mttroot/mtt/lib/comp/compound/Thermal/IncompressibleFlow/Tank/Tank_cr.r ================================================================== --- mttroot/mtt/lib/comp/compound/Thermal/IncompressibleFlow/Tank/Tank_cr.r +++ mttroot/mtt/lib/comp/compound/Thermal/IncompressibleFlow/Tank/Tank_cr.r @@ -2,19 +2,19 @@ % 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, +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 rho,c_p,c,Volume,Energy -LET tank(rho,c_p,c,effort,2, +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; Index: mttroot/mtt/lib/comp/simple/ES_alias.m ================================================================== --- mttroot/mtt/lib/comp/simple/ES_alias.m +++ mttroot/mtt/lib/comp/simple/ES_alias.m @@ -3,13 +3,22 @@ ############################################################### ## 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 Index: mttroot/mtt/lib/comp/simple/FMR_alias.m ================================================================== --- mttroot/mtt/lib/comp/simple/FMR_alias.m +++ mttroot/mtt/lib/comp/simple/FMR_alias.m @@ -3,14 +3,17 @@ ############################################################### ## 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 = '3'; + alias.mod = '2'; endfunction Index: mttroot/mtt/lib/cr/r/cm.cr ================================================================== --- mttroot/mtt/lib/cr/r/cm.cr +++ mttroot/mtt/lib/cr/r/cm.cr @@ -10,10 +10,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% 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 @@ -21,21 +24,21 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OPERATOR cm; %Linear electrical bit -FOR ALL c_0,x_0,elec_state,mech_state LET -cm(c_0,x_0,effort,1, +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 c_0,x_0,elec_state,mech_state LET -cm(c_0,x_0,effort,2, +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;; Index: mttroot/mtt/lib/cr/r/lcos.cr ================================================================== --- mttroot/mtt/lib/cr/r/lcos.cr +++ mttroot/mtt/lib/cr/r/lcos.cr @@ -14,39 +14,42 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% 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 gain, input, causality, gain_causality, outport, inport, +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(gain_causality, gain, causality, outport, +LET lcos(comp_type, 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, +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(gain_causality, gain, causality, outport, +LET lcos(comp_type, gain_causality, gain, causality, outport, input, causality, inport, m_input, m_causality, 3) = input/(cos(m_input)*gain); END;; Index: mttroot/mtt/lib/cr/r/lsin.cr ================================================================== --- mttroot/mtt/lib/cr/r/lsin.cr +++ mttroot/mtt/lib/cr/r/lsin.cr @@ -14,39 +14,42 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% 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 gain, input, causality, gain_causality, outport, inport, +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(gain_causality, gain, causality, outport, +LET lsin(comp_type, 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, +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(gain_causality, gain, causality, outport, +LET lsin(comp_type, gain_causality, gain, causality, outport, input, causality, inport, m_input, m_causality, 3) = input/(sin(m_input)*gain); END;;