|
I am trying to build a Simscape component which models a heat exchanger for two flowing, compressible fluids. I'm using the Pneumatic domain. My heat exchanger component has 4 nodes: two for "fluid 1" and two for "fluid 2". The two fluids' mass flow rates are conserved, but they exchange heat. Hence, for a given fluid, energy is not conserved. However, taking both fluids into account, energy is conserved.
As a starting point, I used the Simscape demo "ssc_pneumatic_motor.mdl", which demonstrates how a Simscape component can trade energy between two domains (pneumatic and mechanical.rotational). The Simscape component that exchanges the energy is called rotational_converter.ssc.
I replaced the rotational_converter with my own component called "pneumatic_dual_resistive_tubes.ssc". This Simscape component is meant to act like two independent resistive tubes which transfer two pneumatic fluids through them, incurring a pressure drop in each fluid due to the resistive nature of its tube. The tubes do not interact with each other; that is, they don't exchange heat. I copied the code from the build-in resistive_tube.ssc that ships with Simscape. The purpose of this test was to determine whether a single Simscape component could have two independent domains of the same type.
This model runs. This is surprising because it conflicts with advice given to me by MathWorks in a Technical Service Request: "Unfortunately, the cause of the issue is that Simscape saw the fluids belonging to the same domain."
It was good to demonstrate that a single component can have two domains of the same type going into it. But I was concerned that this only worked because the two fluids' sets of equations were decoupled from each other. To test this, I next linked the two fluids' equations to each other in a simple way: I changed the equations so that the outgoing heat for fluid 1 depends on the fluid temperature from fluid 2, and vice versa. This makes the fluids' equations dependent on each other.
This model runs as well. This suggests that a heat exchanger component should be possible in Simscape.
The next test was to try to make the model closer to a heat exchanger. That requires the following steps:
1. The heat exchanger's output nodes are not at a specific temperature and pressure, so I removed the "atmospheric reference" blocks.
2. The two fluids have different physical properties, so I need to add two Gas Properties blocks, one for each fluid.
However, when I do either of these steps, it breaks the model. Depending on which configuration I try, I get different error messages:
Removing the "atmospheric reference blocks" results in this error:
>>>>>>>>>>>>>>>
Initial conditions solve failed to converge.
...Nonlinear solver: Linear Algebra error. Failed to solve using iteration matrix.
......Equations of one or more components may be dependent or inconsistent. This can cause problems in transient initialization. Here is the set of components involved:
'my_ssc_pneumatic_motor_06/Measure flow1/Pneumatic Pressure & Temperature Sensor'
Equation location is:
'C:/Program Files/MATLAB/R2011b/toolbox/physmod/simscape/library/m/+foundation/+pneumatic/+sensors/pressure_temperature.ssc' (line 19)
Equations of one or more components may be dependent or inconsistent. This can cause problems in transient initialization. Here is the set of components involved:
'my_ssc_pneumatic_motor_06/Measure flow/Pneumatic Pressure & Temperature Sensor'
Equation location is:
'C:/Program Files/MATLAB/R2011b/toolbox/physmod/simscape/library/m/+foundation/+pneumatic/+sensors/pressure_temperature.ssc' (line 19)
Equations (including nonlinear equations) of one or more components may be dependent or inconsistent. This can cause problems in transient initialization. Here is the set of components involved:
'my_ssc_pneumatic_motor_06/Pneumatic Dual Resistive Tube03'
Equation locations are:
'C:/Doc/Simulator/+PPSimscapeLibrary/+thermofluidic/pneumatic_dual_resistive_tubes_03.ssc' (line 117)
'C:/Doc/Simulator/+PPSimscapeLibrary/+thermofluidic/pneumatic_dual_resistive_tubes_03.ssc' (line 118)
'C:/Doc/Simulator/+PPSimscapeLibrary/+thermofluidic/pneumatic_dual_resistive_tubes_03.ssc' (line 133)
'C:/Doc/Simulator/+PPSimscapeLibrary/+thermofluidic/pneumatic_dual_resistive_tubes_03.ssc' (line 134)
<<<<<<<<<<<<<<<<<
Adding two Gas Properties blocks results in this error:
>>>>>>>>>>>>>>>
Attemping to overresolve an already resolved value. Perhaps too many domain specific global parameter blocks have been attached to the network.
<<<<<<<<<<<<<<<<
That concludes the description of the problem.
Does anyone have any experience with debugging these types of Simscape errors?
Regards,
Justin
|