How to force a Beginning Value in Simscape
11 views (last 30 days)
In many blocks of Simscape, for example the Constant Volume Chamber (G) block, the user can specify a number of initial or Beginning Values for the blocks variables or states. The Simscape Solver then decides whether to override that value when the Simulink simulation is run. The user can specify a priority for the Beginning Value, with options High, Low or None. However, even with the Priority set to High, the Solver sometimes modifies the initial values from the specified Beginning Value. Note: this happens even when I untick the 'Start simulation from steady state' box in the Solver Configuration menu.
Thus, is there a way to really force the use of the Beginning Value as the actual initial value of the variable in the block? Or is there a recognised alternative to the standard Constant Volume Chamber (G) block in these circumstances?
As background: The example that I am working on is a bottle of gas with a fixed volume (the 'Constant Volume Chamber (G)' block) where the gas outflow is determined (partly) by the initial gas pressure and temperature of the gas in the bottle. Therefore, I really need those values to be exactly as I specify them. In a small development model this all works fine. However, when I integrate the bottle with its connected tubes and valves in a larger network, Simscape keeps changing the inital pressure. I know that some of the initial values in other parts of the overall Simscape model are way off steady-state conditions (there are warning messages about that in the diagnostics), so that may be part of the problem. However, it is quite a challenge to calculate the (or even just a closer) full steady state of this system, with given boundary conditions and selected initial conditions, in MATLAB.