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

UDF could not be used in parallel by batch file, but could be used in single running

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2015, 05:10
Default UDF could not be used in parallel by batch file, but could be used in single running
  #1
New Member
 
Jenifer
Join Date: Oct 2014
Posts: 5
Rep Power: 12
768643480 is on a distinguished road
Hi, I defined the inlet velocity as below,
#include "udf.h"
DEFINE_PROFILE(unsteady_velocity,thread,position)
{
#if !RP_HOST
real pos[ND_ND];
real x,y;
face_t f;
real DH=0.02;
real F=2400.;
real t=RP_Get_Real("flow-time");
begin_f_loop(f,thread)
{
F_CENTROID(pos,f,thread);
y=pos[1];
F_PROFILE(f,thread,position)=(0.01568+0.00784*sin( 2.*3.14159*F*0.00001568*t/DH/DH))*2.*(1.-4.*y*y/DH/DH);
}
end_f_loop(f,thread)
#endif
}

I can run the case in parallel by gui, and on the command line outside the batch system, the UDF will work in these two situations. but every time I run the case in parallel by batch file(I had to use batch file in current system for a long iterations), errors will appear.
Reading "zhgxsin600try-p.dat"...
Parallel variables...
Error: chip-exec: function "unsteady_velocity" not found.
Error: chip-exec: function "unsteady_velocity" not found.
Error: chip-exec: function "unsteady_velocity" not found.
Error: chip-exec: function "unsteady_velocity" not found.
Done.
The case could run, but the inlet velocity will keep zero.

Dese there anybody could give me some suggestions to correct my error? Thanks a lot.
768643480 is offline   Reply With Quote

Old   March 24, 2015, 07:32
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Sounds like the batch process for Fluent couldn't find your boundary condition UDF. Are you sure the UDF has compiled and loaded successfully?
`e` is offline   Reply With Quote

Old   March 24, 2015, 08:44
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Could it be that in you gui test it is single precision, and in the batch test it is double precision or vice versa?
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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 09:46
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 18:25
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46


All times are GMT -4. The time now is 16:51.