Clear Filters
Clear Filters

Two phase fluid : Initial conditions solve failed to converge.

4 views (last 30 days)
Hi everyone,
I am discovering SimScape. I am trying to simulate a simple piston under a two phase pressurized fluid.
However, I keep getting that error: Initial conditions solve failed to converge.
I really don't understand what is the issue but apparently it comes from my piston model (Translational Mechanical Converter 2P). If I remove it I have no error left.
Thank you very much for your answers !
Here the model and the complete error (model also attached):
=== Simulation (Elapsed: 3 sec) ===
Warning:First solve for initial conditions failed to converge. Trying again with all high priorities relaxed to low.
Warning:Second solve for initial conditions failed to converge. Trying again with all variable targets ignored.
Error:An error occurred while running the simulation and the simulation was terminated
Caused by:
['Test/Solver Configuration']: Initial conditions solve failed to converge.
all components and nodal across variables involved
Cannot solve for one or more variables, including dynamic variable derivatives:
Time derivative of 'Ideal_Translational_Motion_Sensor.x' (Position)
Time derivative of 'Translational_Mechanical_Converter_2P.interface_displacement' (Interface displacement)
Time derivative of 'Translational_Mechanical_Converter_2P.mass' (Fluid mass)
Time derivative of 'Translational_Mechanical_Converter_2P.u_I' (Specific internal energy of fluid volume)
'Ideal_Translational_Motion_Sensor.R.v' (Velocity)
'Ideal_Translational_Motion_Sensor.V' (V)
'Ideal_Translational_Motion_Sensor.v' (Velocity)
'Pressure_Internal_Energy_Sensor_2P.A.u' (Specific internal energy)
'Pressure_Internal_Energy_Sensor_2P.U' (U)
'Reservoir_2P.A.u' (Specific internal energy)
'Reservoir_2P.Phi_A' (Energy flow rate into port A)
'Reservoir_2P.convection_A.Phi' (Energy flow rate into the port)
'Reservoir_2P.convection_A.mdot' (Mass flow rate into the port)
'Reservoir_2P.convection_A.port.u' (Specific internal energy)
'Reservoir_2P.mdot_A' (Mass flow rate into port A)
'Translational_Mechanical_Converter_2P.A.u' (Specific internal energy)
'Translational_Mechanical_Converter_2P.Phi_A' (Energy flow rate into port A)
'Translational_Mechanical_Converter_2P.R.v' (Velocity)
'Translational_Mechanical_Converter_2P.convection_A.Phi' (Energy flow rate into the port)
'Translational_Mechanical_Converter_2P.convection_A.mdot' (Mass flow rate into the port)
'Translational_Mechanical_Converter_2P.convection_A.port.u' (Specific internal energy)
'Translational_Mechanical_Converter_2P.interface_velocity' (Interface velocity)
'Translational_Mechanical_Converter_2P.mdot_A' (Mass flow rate into port A)
'Two_Phase_Fluid_Properties_2P.A.u' (Specific internal energy)
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:
all components involved
'Test/Ideal Translational Motion Sensor'
Equation location is:
'D:\PROGRAMMES\MatlabR2020a\toolbox\physmod\simscape\library\m\+foundation\+mechanical\+sensors\velocity.ssc' (line 42)
'Test/Reservoir (2P)'
Equation locations are:
'D:\PROGRAMMES\MatlabR2020a\toolbox\physmod\simscape\library\m\+foundation\+two_phase_fluid\+elements\reservoir.ssc' (line 129)
'D:\PROGRAMMES\MatlabR2020a\toolbox\physmod\simscape\library\m\+foundation\+two_phase_fluid\+elements\reservoir.ssc' (line 132)
'Test/Translational Mechanical Converter (2P)'
Equation locations are:
'D:\PROGRAMMES\MatlabR2020a\toolbox\physmod\simscape\library\m\+foundation\+two_phase_fluid\+elements\translational_mechanical_converter.ssc' (line 213)
'D:\PROGRAMMES\MatlabR2020a\toolbox\physmod\simscape\library\m\+foundation\+two_phase_fluid\+elements\translational_mechanical_converter.ssc' (line 226)

Accepted Answer

Joris Naudin
Joris Naudin on 27 May 2020
Hi handsome boi,
I replaced the infinite volume reservoir with a constant volume and it worked !
My guess is since the solver cannot change the conditions on the infinite reservoir, and there is initial conditions on the piston chamber, it creates 2 conditions for only one possible state (so doesn't work).
Also you should add a mass to the piston (it works without but I just don't know how it calculates without it ?)
Love <3

More Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!