Why do I receive the following error: Error: domain parameters propagation error. Domain parameters are propagated to the same set of nodes from sources?

9 views (last 30 days)
I am creating a custom Simscape Fluids component from a subsystem using the 'subsystem2ssc' function. This creates the following file: myComponent.ssc. When I then load the myComponent.ssc into my model and then run it, I receive the following error:
Error compiling Simscape network for model testbphe.
Caused by:
· Error: domain parameters propagation error. Domain parameters are propagated to the same set of nodes from sources: 'Two_Phase_Fluid_Properties_2P.A' and 'Two_Phase_Fluid_Properties_2P1.A'. Each node may only have at most one source of propagation.
I have also created a functionally equivalent Simscape component. However, this Simscape component does not result in the same error when the model is run. Note that there is also the subsystem used to generate the custom Simscape component myComponent.ssc. This subsystem also does not cause an error when the model is run.
Why is this happening? Is there a potential workaround to this issue?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Apr 2019
The reason why the domain parameters propagation error is thrown is because when 'ssc2subsystem' is applied to the Simulink subsystem, the resulting block (myComponent.ssc) is now treated a single Simscape block, which would propagate domain parameters between all 4 of its ports. The Two-Phase Fluid Properties block's function is to specify the domain parameters to be propagated throughout the connected network of the same domain. Since you now have one on the left side and another one on the right side, it throws an error to let you know that you cannot specify the domain parameters twice.
To resolve this issue, in the file myComponent.ssc, add the attribute "Propagation = blocks" to the component declaration. That is, replace the first line with this:
component(Propagation = blocks) myComponent
This will let Simscape know that the block myComponent should not propagate domain parameters between all 4 of its ports. Instead, it will look into the internal connections based on the connect statements to decide how the domain parameters should be propagated.

More Answers (0)

Categories

Find more on Foundation and Custom Domains in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!