Reading results fields from res file using Userfortran/Junction Box
I want to read e.g. velocity components, pressure, etc. from an existing steady-state solution file (.res file) to compute source terms for another simulation (another means with different boundary conditions) on the same grid. Could anyone tell me what is the best way to achieve this? Ot in other world, how can I hack a CFX res file using a userfortran.
Writing a source term is not difficult using CEL functions, however, my problem is that the source term of momentum equations is a function of an older/existing solution (u,v,w etc.) field.
Any help or hint in this regards would deeply be appriciated.
PS: I tried to use CFX-Pre to load certain variables from the existing solution. However this approach is too slow and for practical reasons not viable.
In your first simulation create AV's equal to velocity components, pressure etc. In your second simulation write the source term in terms of the AV's, then don't solve the AV's, so they don't get updated (expert parameter, perhaps: solve scalars = f).
thanks for this practical idea. I assume if I make a restart (with -ini and -interp options) from the initial run, the values of AVs from the old simulation will be available in the new run.
In fact my source term is a mixture of fields from existing or older and the current solution.
For instance for u component of velocity S_u = rho w_old (du/dz)_actual
This approach does not allow me to define new AV in the second run.
I shall soon try it.
|All times are GMT -4. The time now is 09:09.|