help needed for accessing previous step values
Hi all:
I have been frustrated for a long time to try to make a UDF with a previous step variable. I would like to access the previous step value of C_STRAIN_RATE_MAG(c,tc), for the current calculation. I tried UDMI and UDSI_M1 but I could not get it right. I would really appreciate if anyone knows how to do it?:confused: |
I am facing problem with previous time step macros
I want to provide convective boundary condition at my domain outlet and I am trying to do that by relating the current time step U velocity for the cells in the cell thread on the outlet face with the U velocity of the cells from the previous time step. I tried using the F_U_M1 macro. But I am getting "segmentation error". Can anybody help me?
|
Pretty sure that M1 and M2 variables only exist for cell values, not face ones. You need to save current face variables in a F_UDMI and access at the next time step before updating them. There is a post hanging around about this very specific task (using UDMI to store variables from previous time steps).
|
Accessing previous time step values
Thank you so much. I was able to find the thread regarding using UDMs for accessing variable values at previous time steps.
https://www.cfd-online.com/Forums/fl...-used-udf.html I have one more doubt. I see that in all programs, F_UDMI is used inside the begin_f_loop(). In that case can a UDM location store multiple values corresponding to multiple faces in a face thread? |
Yes, note that this:
F_UDMI(f,t,i) is the way F_UDMI is accessed, where f is the local face index, t is the face thread and i is the (i-1)-th F_UDMI variable (i starts at 0). |
Quote:
for example: Code:
/*for specifying u velocity*/ |
All times are GMT -4. The time now is 02:15. |