Implementation of an expression with reference to an earlier timestep
i've got a problem I cannot solve with the cfx tutorials.
In my simulation i have got several openings with loss coefficients. These loss coefficients depend on the mass flow and should change to achieve a certain mass flow.
My idea ist to have a time dependent loss coefficient.
every timestep the delta(L) is calculated with the actual mass flow which isn't a problem at all. But i don't know how to refer to an expression from an earlier time step.
thank you for you help!
If you know the mass flows then why not just apply a mass flow boundary?
Thank you for your answer.
I don't think I can apply a mass flow boundary condition to an opening.
Even if it was possible, the idea is to simulate the dynamic behaviour of a system which tries to achieve a certain condition.
I have no idea what your final sentence means.
Sorry for my bad english.
What I tried to say is the following:
I want to have model with loss coefficients set for the openings.
These loss coefficients can should be calculated at every timestep during my transient simulation. To do so I always need the loss coefficient from en earlier timestep.
My idea was to export the value of the loss coefficient L(t=0) to an external data file. Then doing the calculation and having L(t=1) as an input for the next timestep. Is there an easy way to do so?
You will have to use fortran to read and write to the file, and if you are using fortran then you can simply store the old value so no need to write to a file.
You have two options available:
1) User fortran
2) Use the trick which allows you to access scalars from previous time steps (do a search on the forum to find this)
I think option 1 is best for your application based on what you have described.
|All times are GMT -4. The time now is 01:35.|