How to make the dynamic model in Dymola agree with the steady-state design result?

Viewed 190

Modelica modeling is the first principle modeling, so how to test the model and set an effective benchmark is important, for example, I could design a fluid network as my wish, but when building a dynamic simulation model, I need to know the detailed geometry structure and parameters to set up every piece of my model. Usually, I would build a steady-state model with simple energy and mass conservation laws, then design every piece of equipment based on the corresponding design manual, but when I put every dynamic component together, when simulation till steady-state, the result is different from the steady-state model more or less. So I was wondering if I should modify my workflow to make the dynamic model agree with the steady-state model. Any suggestions are welcome.

#dymola #modelica

1 Answers

To my understanding of the question, your parameter values are fixed and physically known. I would attempt the following approach as a heuristic to identify the (few) component(s) that one needs to carefully investigate in order to understand how they influence or violates the assumed first principles.

This is just as a first trial and it could be subject to further improvement and fine-tuning.

  1. Consider the set of significant set of variables xd(p,t) \in R^n and parameters p. Note that p also includes significant start values. p in R^m includes only the set of additional parameters not available in the steady state model.

  2. Denote the corresponding variables of the steady state model by x_s

  3. Denote a time point where the dynamic model is "numerically" in "semi-" steady-state by t*

  4. Consider the function C(xd(p,t*),xs) = ||D||^2 with D = xd(p,t*) - xs

It could be beneficial to describe C as a vector rather than a single valued function.

  1. Compute the partial derivatives of C w.t. p expressed in terms of dxd/dp, i.e.

    dC/dp = d[D^T D]/dp

       = d[(x_d-x_s)^T (x_d - x_s)]/dp
    
       = (dx_d/dp)^T D + ...
    
  2. Consider scaling the above function, i.e. dC/dp * p/C (avoid expected numerical issues via some epsilon-tricks)

Here you get a ranking of most significant parameters which are causing the apparent differences. The hopefully few number of components including these parameters could be the ones causing such violation.

If this still does not help, may be due to expected high correlation among parameters, I would go further and consider a dummy parameter identification problem, out of which a more rigorous ranking of significant model parameters can be obtained.

If the Modelica language had capabilities for expressing dynamic parameter sensitivities, all the above computation can be easily carried out as a single Modelica model (with a slightly modified formulation).

For instance, if we had something like der(x,p) corresponding to dx/dp, one could simply state

dcdp = der(C,p)  

An alternative approach is proposed via the DerXP library

Related