|
[Sponsors] |
May 20, 2021, 02:59 |
The function of UDSI
|
#1 |
New Member
Join Date: May 2020
Posts: 8
Rep Power: 5 |
Hi, guys,
I met a strange problem. I wrote a udf and used UDSI to store variable C_K and C_DUDX CODE: DEFINE_ADJUST(NNtraining, d) { Thread *t; cell_t c; real k; real epsilon; real C_mu; C_mu=0.09; thread_loop_c(t,d) { begin_c_loop(c,t) { k=C_K(c,t); epsilon=C_D(c,t); C_UDSI(c,t,0)=k; C_UDSI(c,t,1)=C_DUDX(c,t); } end_c_loop(c,t) } } In theory, when I look up contours. The results of Scalar-0 and turbulent kinetic energy should be the same. And the results of Scalar-1 and dX-velocity/dx should be the same. But in fact, they are different. That's why? Could anybody help me? |
|
May 20, 2021, 18:49 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
to monitor variable you do probably want to use C_UDMI instead of C_UDSI (which is scalar)
if the difference still is here I can't predict
__________________
best regards ****************************** press LIKE if this message was helpful |
|
May 20, 2021, 21:51 |
|
#3 |
New Member
Join Date: May 2020
Posts: 8
Rep Power: 5 |
Sad.
The difference is still here. |
|
May 23, 2021, 10:56 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 |
How big is the difference that we are talking about? Orders of magnitude, or after the sixth decimal?
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] RefineMesh Error and Foam warning | jiahui_93 | OpenFOAM Meshing & Mesh Conversion | 4 | March 3, 2018 11:32 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 09:56 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |
Compilation errors in ThirdPartymallochoard | feng_w | OpenFOAM Installation | 1 | January 25, 2009 06:59 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 20:50 |