问题
I'm facing a problem with modelling diffusion in Dymola. I want to have two seprate volumes (filled with air), which can be joined and thus exchange heat via diffusion. My approach was using the Modelica.Fluid library and connect two ClosedVolumes with a Valve. But as I found out, this library doesn't regard difussion.
What would be the best way to accomplish such a model?
回答1:
This limitation is due to the use of stream connector in the Modelica.Fluid library.
One way to solve this is to develop a fluid connector which do not rely on stream connector but only on potential and flow variables. Unfortunately in this case you'll have to solve yourself numerical problems for solving flow reversal and zero-flow singularity.
One example is described in the paper "A physical solution for solving the zero-flow singularity in static thermal-hydraulics mixing models" presenting in the Modelica conference 2014. Basically, adding diffusion helps to solve zero-flow singularity and they use a regularized step function to solve flow reversal. Other regularization functions can be found in Modelica.Fluid.Utilities
.
Hope this help, Best regards.
来源:https://stackoverflow.com/questions/28408540/modelling-diffusion-in-dymola-modelica