Overview
Comment:Sorted out errors in the equations
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: e479e36883e71d26293ddb0c92df5dc1ef570661ca560afd97c5fbaa06d83e0c
User & Date: gawthrop@users.sourceforge.net on 1998-07-21 16:13:20
Other Links: branch diff | manifest | tags
Context
1998-07-21
16:26:05
Now has aliased parameters. check-in: daddc9965f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:13:20
Sorted out errors in the equations check-in: e479e36883 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:25:50
Initial revision check-in: 0da63e7c3f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/simple/FP_eqn.m from [61ef987daa] to [764e3abe81].

13
14
15
16
17
18
19




20
21
22
23
24
25
26


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




% %% Revision 1.2  1998/06/29 09:54:16  peterg
% %% Changed name from ES to FP
% %%
% %% Revision 1.1  1998/06/29 09:53:22  peterg
% %% Initial revision
% %%
% %% Revision 1.3  1998/03/27 10:59:43  peterg







>
>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.3  1998/07/07 15:00:04  peterg
% %% Replaced e_ by f_
% %%          s_ by p_
% %%
% %% Revision 1.2  1998/06/29 09:54:16  peterg
% %% Changed name from ES to FP
% %%
% %% Revision 1.1  1998/06/29 09:53:22  peterg
% %% Initial revision
% %%
% %% Revision 1.3  1998/03/27 10:59:43  peterg
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
80
81
end


% There are 2 ports; extract the information
f_bond = bonds(1,:);
p_bond = bonds(2,:);

% The efforts are the same - but the enthalpy side has relative T
if f_bond(1)==1 %effort imposed on the enthalpy bond 
%  fprintf(eqnfile,'%s := %s + t_0;\n' , ...
  fprintf(eqnfile,'%s := %s;\n' , ...
    varname(name,bond_number(2), 1), ...
    varname(name,bond_number(1), 1) );
else %effort imposed on the entropy bond 
%  fprintf(eqnfile,'%s := %s - t_0;\n' , ...
  fprintf(eqnfile,'%s := %s;\n' , ...
    varname(name,bond_number(1), 1), ...
    varname(name,bond_number(2), 1) );
end;

% The flows need to be converted - use the absolute temp on the
% entropy side
if f_bond(2)==-1 %flow imposed on the enthalpy bond 
  fprintf(eqnfile,'%s := %s/%s;\n' , ...





    varname(name,bond_number(2), -1), ...
    varname(name,bond_number(1), -1), ...
    varname(name,bond_number(2), 1) );
else % flow imposed on the entropy bond 
    fprintf(eqnfile,'%s := %s*%s;\n' , ...
    varname(name,bond_number(1), -1), ...
    varname(name,bond_number(2), -1), ...
    varname(name,bond_number(2), 1) );
end;







|
|
<
|
|
|
|
<
|
|
|


|
<
|

>
>
>
>
>



<
<
<
<
<

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
80
81





82
end


% There are 2 ports; extract the information
f_bond = bonds(1,:);
p_bond = bonds(2,:);

% The efforts are the same
if p_bond(1)==1 %effort imposed on the pseudo bond 

    fprintf(eqnfile,'%s := %s;\n' , ...
    varname(name,bond_number(1), 1), ...
    varname(name,bond_number(2), 1) );
else %effort imposed on the true bond 

    fprintf(eqnfile,'%s := %s;\n' , ...
    varname(name,bond_number(2), 1), ...
    varname(name,bond_number(1), 1) );
end;

% The flows need to be converted

if p_bond(2)==-1 %flow imposed on the pseudo bond 
  fprintf(eqnfile,'%s := %s/%s;\n' , ...
    varname(name,bond_number(1), -1), ...
    varname(name,bond_number(2), -1), ...
    varname(name,bond_number(1), 1) );
else % flow imposed on the true bond 
    fprintf(eqnfile,'%s := %s*%s;\n' , ...
    varname(name,bond_number(2), -1), ...
    varname(name,bond_number(1), -1), ...
    varname(name,bond_number(2), 1) );





end;


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