-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hierarchy of stream connectors. #3551
Comments
Here is a model somewhat dual to the one above, which I would consider valid. model Model2
connector C
flow Real n_flow;
Real p;
end C;
connector D
stream Real h_outflow;
C c;
end D;
D d( c.p = 1, h_outflow = 2);
equation
end Model2; |
@qlambert-pro I'll give you my user's perspective, having participated in the definition of the stream connectors 15 years ago. The rationale of stream connector is to model advection between different connected components. The idea is describe a fluid that flows carrying some specific conveyed quantities, e.g. specific enthalpy or mass fractions, which are governed by balance equations in connection sets that involve the products of the conveyed quantities with the flows. From a modeller's point of view Another possible application is two-phase inhomogeneous flow: in this case there would be only one physical flange represented by connector On the contrary, @hubertus65, @rfranke, @Harisankar-Allimangalath, @dzimmer, @thorade can comment on that, but I guess what I wrote above should be the established consensus among the users. I re-read the specification carefully, and I agree it is not clear from this point of view. Section 15 was written having a simple ,flat connector in mind, not a hierarchically structured one, and it was already complicated enough 😅. Section 9 instead allows to build connectors containing other connectors. Unfortunately, Section 9 does not introduce any terminology for that, e.g. defining "hierarchically structured connectors" or "sub-connectors", so the link between the two sections is ambiguous. Maybe the issue can be resolved by indicating in Section 15 that the flow variable and the corresponding stream variables are located "at the same level", but I am not sure what is the right terminology for that. @qlambert-pro you can propose an amendment and I can comment on that. @HansOlsson can also help with that for sure. |
I agree, and to me the "at the same level" would be kind of redundant - the idea is that It may still be possible to add it, but we have to be careful. The risk is that by adding "at the same level" at one place we will then have to consider other constructs, since either they also need the restriction "at the same level" or they should consider sub-components. |
Possibly, but @qlambert-pro's initial remark in the ticket seems to imply otherwise. From a modelling point of view, the requirement of the flow variable and stream variable(s) to be "at the same level" is what we meant. We never meant to be looking for the flow variable one level up or down, in case of structured connectors. Stating this in Section 15 would limit the scope of this restriction to stream variables, so it shouldn't impact other construct. |
According to my interpretation of section 15.1, the following is invalid.
e
is astream
connector since it has variables withstream
prefix, but it also has twoflow
variables withflow
prefix.What is the consensus?
The text was updated successfully, but these errors were encountered: