フィルターのクリア

How can I show Through variables of a Composite Block in Simscape

1 回表示 (過去 30 日間)
Cedric Götze
Cedric Götze 2015 年 7 月 23 日
回答済み: Cedric Götze 2015 年 7 月 27 日
Hello
is it possible to show a through variable in the simscape blocks variable section of a composite block.
variables(Access=privat)
G = {0,'kg/s'};
Q = {0,'J/s'};
end
I integrated the following objects:
components(Hidden=true)
chamber = foundation.pneumatic.elements.chamber(Volume=Volume);
orifice = foundation.pneumatic.elements.orifice(Area=Area);
atmosphere = foundation.pneumatic.elements.atmospheric_reference;
end
And connected them with
connections
connect(chamber.A, A);
connect(orifice.A, A);
connect(orifice.B, atmosphere.A);
end
The Across Variables are show right, but the the through variables create an error
equations
p == A.p;
T == A.T;
G == A.G;
Q == A.Q;
end
Error:
Unexpected function or variable 'A'.
Branches can't be used when components are used. Has anybody some kind of idea, for instant by using function setup?
By the way G chamber + G orifice = G and Q chamber + Q orifice = Q.
Thank's in advanced.

採用された回答

Cedric Götze
Cedric Götze 2015 年 7 月 27 日
The Answer was easier than I expected
equations
p == A.p; % Pressure
T == A.T; % Temperature
G == orifice.G + chamber.G; % Mass flow
Q == orifice.Q1 + chamber.Q; % Heat flow
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComposite Components についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by