|
[Sponsors] |
Is there an equivalent of "NODE_POS_NEED_UPDATE" for face values? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 24, 2015, 13:21 |
Is there an equivalent of "NODE_POS_NEED_UPDATE" for face values?
|
#1 |
New Member
V.Leb
Join Date: Jun 2015
Posts: 8
Rep Power: 11 |
Hi,
I'm trying to use DEFINE_PROFILE in a transient case and the problem I encounter is that my velocity component data file (which has data for *all* time steps, not just a single one) is read every iteration as opposed to time step, so I was wondering if there is an equivalent to NODE_POS_NEED_UPDATE used in DEFINE_GRID_MOTION? Or is there an alternative way? Code:
#include "udf.h" DEFINE_PROFILE(v_component, thread, position) { face_t f; real x[ND_ND]; real y; double v; real t = CURRENT_TIME; FILE *v_values; v_values = fopen("v_intp.txt","r"); begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; fscanf(v_values, "%lf\n", &v); Message("The v is %lf\n", v); Message("The x is %f\n", x[0]); F_PROFILE(f, thread, position) = v; } end_f_loop(f, thread) } Last edited by Leb; July 24, 2015 at 14:50. Reason: Clarification |
|
July 24, 2015, 17:02 |
|
#2 | |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
Quote:
|
||
July 24, 2015, 17:36 |
|
#3 |
New Member
V.Leb
Join Date: Jun 2015
Posts: 8
Rep Power: 11 |
Thanks for your reply, but as I mentioned, I do *not* want to update the profile every iteration, but every time step.
I was hoping that I could use something like this: Code:
if (t = 0.000000) u_values = fopen("u_comp_0.txt","r"); else { u_values = fopen(strcat(strcat(foo,str),bar ),"r"); } Code:
strcat(strcat(foo,str),bar ) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
using chemkin | JMDag2004 | OpenFOAM Pre-Processing | 2 | March 8, 2016 23:38 |
cyclic BC - modify boundary face values | marluc | OpenFOAM Programming & Development | 0 | May 4, 2015 17:50 |
Velocity values are normal but pressure values are too big | rv82 | OpenFOAM Running, Solving & CFD | 4 | April 13, 2015 04:59 |
Setting patch field values equal to internal field values | leroyv | OpenFOAM Programming & Development | 1 | October 21, 2014 16:49 |
strange node values @ solid/fluid interface - help | JB | FLUENT | 2 | November 1, 2008 13:04 |