CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

The function of UDSI

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2021, 02:59
Default The function of UDSI
  #1
New Member
 
Join Date: May 2020
Posts: 8
Rep Power: 5
3014214149 is on a distinguished road
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?
3014214149 is offline   Reply With Quote

Old   May 20, 2021, 18:49
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Old   May 20, 2021, 21:51
Default
  #3
New Member
 
Join Date: May 2020
Posts: 8
Rep Power: 5
3014214149 is on a distinguished road
Sad.

The difference is still here.
3014214149 is offline   Reply With Quote

Old   May 23, 2021, 10:56
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
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".
pakk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 01:48.