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

problem about udf in fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2018, 01:13
Default problem about udf in fluent
  #1
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 8
zhihuawan is on a distinguished road
I now meet a problem about udf,can you help me?when I interpret it to the fluent,it gives errors "error:E:fluent/volume.c;line 28arse error." The udf are as follows:

/************************************************** *********************
udfexample.c
UDF for specifying volume profile boundary condition
************************************************** **********************/

#include "udf.h"

DEFINE_PROFILE(inlet_volume, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y, h;
face_t f;
h = -0.0009; /* inlet height in m */
begin_f_loop(f,thread)
{
F_CENTROID(x, f, thread);
y = x[1];
if (y<h)
{
F_PROFILE(f, thread, position) =1;
}
else {
F_PROFILE(f, thread, position) =0;
}
end_f_loop(f, thread)

}
zhihuawan is offline   Reply With Quote

Old   January 16, 2018, 02:19
Default
  #2
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 9
annan is on a distinguished road
Hi, do you have another udf called volume.c ?
annan is offline   Reply With Quote

Old   January 16, 2018, 02:47
Default [QUOTE=annan;678264]Hi, do you have another udf called volume.c ?[/QUOTE]
  #3
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 8
zhihuawan is on a distinguished road
Quote:
Originally Posted by annan View Post
Hi, do you have another udf called volume.c ?
yes,I have,how can I send to you,by email?
zhihuawan is offline   Reply With Quote

Old   January 16, 2018, 02:53
Default
  #4
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 9
annan is on a distinguished road
So your problem does not come from the UDF you pasted in your post (inlet_volume), it actually comes from your other udf named volume.c, you have an error in line 28
annan is offline   Reply With Quote

Old   January 16, 2018, 20:07
Default [QUOTE=annan;678272]So your problem does not come from the UDF you pasted in your pos
  #5
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 8
zhihuawan is on a distinguished road
Quote:
Originally Posted by annan View Post
So your problem does not come from the UDF you pasted in your post (inlet_volume), it actually comes from your other udf named volume.c, you have an error in line 28
thanks for your reply,but what reasons may lead to this error,I have three Ansys
versions in my computer,like Ansys 14.0, Ansys 14.5,and Ansys 18.0,do you think it will influence the udf interpretion,thank for your kindness.
zhihuawan is offline   Reply With Quote

Old   January 17, 2018, 01:47
Default
  #6
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 9
annan is on a distinguished road
If you try to open read or write to a directory with spaces in the name for instance, you'll get this error. And from my experience, sometimes it can be due to the header files .h, so it depends really on your udf and the name of your directory. Don't hesitate to send your code so that I can take a look at it
annan is offline   Reply With Quote

Old   January 17, 2018, 03:22
Default
  #7
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
You asked the same question here, and got the answer from obscureed.
To repeat it here: you missed a }.

You don't need to ask the same question multiple times, it does not help.
pakk is offline   Reply With Quote

Old   January 17, 2018, 07:47
Default [QUOTE=annan;678264]Hi, do you have another udf called volume.c ?[/QUOTE]
  #8
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 8
zhihuawan is on a distinguished road
Quote:
Originally Posted by annan View Post
Hi, do you have another udf called volume.c ?
Hi,I do not have another udf called volume.c
zhihuawan is offline   Reply With Quote

Old   January 17, 2018, 07:51
Default [QUOTE=annan;678412]If you try to open read or write to a directory with spaces in th
  #9
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 8
zhihuawan is on a distinguished road
Quote:
Originally Posted by annan View Post
If you try to open read or write to a directory with spaces in the name for instance, you'll get this error. And from my experience, sometimes it can be due to the header files .h, so it depends really on your udf and the name of your directory. Don't hesitate to send your code so that I can take a look at it
I cannot understand "open read or write to a directory with spaces in the name",there is no spaces in my directory .What is the header files.h?I want to send you the code, but I just know to paste it to the forums,I do not how to put the udf files in the forums,can you tell me how to do it ?Thank you.
zhihuawan is offline   Reply With Quote

Old   January 17, 2018, 07:55
Default [QUOTE=pakk;678426]You asked the same question [URL="https://www.cfd-online.com/Forum
  #10
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 8
zhihuawan is on a distinguished road
Quote:
Originally Posted by pakk View Post
You asked the same question here, and got the answer from obscureed.
To repeat it here: you missed a }.

You don't need to ask the same question multiple times, it does not help.

Yes ,you are right ,but in that place, nobody answer my question,so I have no choice but to ask it again ,if I distrub you,I feel very sorry.Thank you.
zhihuawan is offline   Reply With Quote

Old   January 17, 2018, 09:27
Default
  #11
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Quote:
Originally Posted by zhihuawan View Post
Yes ,you are right ,but in that place, nobody answer my question,so I have no choice but to ask it again ,if I distrub you,I feel very sorry.Thank you.
You are mistaken: your question was answered.
I repeated the answer above: you missed a }.

Last edited by pakk; January 17, 2018 at 10:41.
pakk is offline   Reply With Quote

Old   January 17, 2018, 21:31
Default [QUOTE=pakk;678461]You are mistaken: your question was answered. I repeated the answe
  #12
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 8
zhihuawan is on a distinguished road
Quote:
Originally Posted by pakk View Post
You are mistaken: your question was answered.
I repeated the answer above: you missed a }.
Thank you a lot,I missed it ,you help me a lot,but I when I compiled the udf ,it give me error,can you help me ?it said the udf library I am trying to load(libudf) is not compiled for parallel use on the current platform(win 64)
Attached Images
File Type: jpg IMG_5436.jpg (175.7 KB, 5 views)
zhihuawan is offline   Reply With Quote

Old   January 18, 2018, 03:55
Default
  #13
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
You don't need to ask the same question multiple times, it does not help. Please continue this discussion in the other thread.
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
problem of running parallel Fluent on linux cluster ivanbuz FLUENT 15 September 23, 2017 19:12
UDF for 3d boundary conditions problem in fluent pawanh Fluent UDF and Scheme Programming 8 July 19, 2013 14:27
problem in using parallel process in fluent 14 aydinkabir88 FLUENT 1 July 10, 2013 02:00
problem with udf programming in fluent saranyasimi Main CFD Forum 0 December 1, 2009 12:19
fluent udf problem for 3d case srsahu Fluent UDF and Scheme Programming 0 July 28, 2009 07:25


All times are GMT -4. The time now is 23:17.