|
[Sponsors] |
help needed for accessing previous step values |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 23, 2016, 12:44 |
help needed for accessing previous step values
|
#1 |
New Member
louis
Join Date: Aug 2016
Posts: 3
Rep Power: 10 |
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? |
|
April 6, 2017, 15:42 |
I am facing problem with previous time step macros
|
#2 |
New Member
Karthikeyan
Join Date: Nov 2016
Posts: 14
Rep Power: 10 |
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?
|
|
April 7, 2017, 05:22 |
|
#3 |
Senior Member
|
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).
|
|
April 7, 2017, 09:17 |
Accessing previous time step values
|
#4 |
New Member
Karthikeyan
Join Date: Nov 2016
Posts: 14
Rep Power: 10 |
Thank you so much. I was able to find the thread regarding using UDMs for accessing variable values at previous time steps.
Previous time step variable to be used in UDF 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? |
|
April 7, 2017, 09:46 |
|
#5 |
Senior Member
|
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). |
|
April 7, 2017, 09:58 |
|
#6 | |
New Member
Karthikeyan
Join Date: Nov 2016
Posts: 14
Rep Power: 10 |
Quote:
for example: Code:
/*for specifying u velocity*/ begin_f_loop(f,t) { F_PROFILE(f,t,i) = F_UDMI(1); /*values to be assigned to boundary face in the next time step*/ } end_f_loop(f,t) begin_f_loop(f,t) { F_UDMI(1) = (.....) + F_U(f,t); /*calculation in the current time step*/ } end_f_loop(f,t) |
||
Tags |
udf, udmi, udsi |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transient simulation not converging | skabilan | OpenFOAM Running, Solving & CFD | 14 | December 17, 2019 00:12 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
AMI interDyMFoam for mixer nu problem | danny123 | OpenFOAM Programming & Development | 8 | September 6, 2013 03:34 |
same geometry,structured and unstructured mesh,different behaviour. | sharonyue | OpenFOAM Running, Solving & CFD | 13 | January 2, 2013 23:40 |
UDF and previous time step macros | Aleex | FLUENT | 2 | January 23, 2011 10:39 |