Can I optimise a dynamic model where the objective function is equal just a variable?

5 ビュー (過去 30 日間)
CB5
CB5 2018 年 3 月 21 日
コメント済み: CB5 2018 年 3 月 22 日
I am trying to run an optimisation in Matlab. I have modelled a hydrogen refuelling station. The model basically consists of one tank and the car tank, and the hydrogen flows from the tank to the car.
This is a dynamic model where the pressure and mass inside each tanks change with time. For the tank in the station the mass and pressure decreases and for the car increases until it gets a 100% full.
My objective is to find the minimum size of the tank of the station (i.e. its volume) that achieves a filling of 100% in the car.
I have several problems:
1. I don’t know if I can do this with an optimisation tool, as my function to minimise in reality is just a volume. (so I don’t know if there is any other way I can write it)
2. the constraint will be that the % =100 , however to be able to know the this, the model has to be run, therefore I don’t know how to write this in a constraint form
Thank you
  2 件のコメント
Torsten
Torsten 2018 年 3 月 21 日
If the pressure in the tank of the hydrogen refuelling station is high enough, its volume can be as small as you like.
CB5
CB5 2018 年 3 月 21 日
The problem is that the pressure inside has a limit

サインインしてコメントする。

採用された回答

Are Mjaavatten
Are Mjaavatten 2018 年 3 月 21 日
What do you mean by 100% full? Is this defined by the hydrogen mass in the car or by the pressure?
Either way, you will need to run the dynamic model for the whole filling period to know how the temperature and pressure in both tanks change with time.
Create a function
deltafill = fill(tankvol)
This function shuold take the station tank volume as input and return the final filling percent minus 100 as output. Obviously, it must call your simulator to achieve this.
Then solve fill(tankvol) = 0, e.g by fzero:
minvol = fzero(@fill,v0)
If you want your model to be accurate, heat transfer between tanks and ambient is essential. You should also take into account that hydrogen at high pressures does not behave as an ideal gas. You may want to take a look at Thermo: Compressible real gas tool in the Mathworks file exchange.
Of course, if you are allowed to make the unrealistic assumptions of ideal gas and that the final temperatures in both tanks are given, then the problem reduces to a linear relationship between station tank volume and the number of moles in the car. This may be useful as a reality check on the more complex simulation results, though.
  5 件のコメント
Are Mjaavatten
Are Mjaavatten 2018 年 3 月 22 日
This is a common filling procedure, so I might have guessed. However, the problem is no longer so clear-cut, as there are many options as to which variables are known and which to calculate. I suggest that you extend your simulator to handle the multi-tank situation and play around with it a bit. Then try to figure out the precise problems that you want to solve. The simulator can form the basis for formulating a host of problems, depending on the situation:
For design, you may want to determine tank volumes or piping and valve sizes. During operation, you may want to minimize the filling time or the compressor work for refilling the station tanks. And so on.
You may end up with a nonlinear equation system or an optimization problem in several variables. These will normally require the Optimization Toolbox.
CB5
CB5 2018 年 3 月 22 日
I have a model that works for more than one tank and it works as a cascade system.
The way it works is that I set up the volumes and pressures before run it.
For example for two tanks, I have tried to do a system where : function input is volume and f (1) = V(1) - V(2) f(2) = car% - 100 using fsolve function
However, it tells me that there is no solution, do you know how else I can do it ?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeThermal Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by