CFD Online URL
[Sponsors]
Home > Forums > CFX

3 Dimensional User Function

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 29, 2012, 02:13
Question 3 Dimensional User Function
  #1
Senior Member
 
Ashkan Javadzadegan
Join Date: Sep 2010
Posts: 221
Rep Power: 7
ashtonJ is on a distinguished road
Dear All,

I am trying to import 3 dimensional data into user function in CFX-Pre.

my data is like below:
X,Y,Z,Velocity
1,2,4,0.2
.....

I got the following error after importing data.

ERROR
Incorrect number of arguments specified in CEL FUNCTION 'Function 1'.
Expected number: 3; actual: 1.

Please let me know where the problem is from.

Thank you.
Kind regards,
AshtonJ
ashtonJ is offline   Reply With Quote

Old   February 29, 2012, 03:16
Default
  #2
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 480
Rep Power: 10
Lance is on a distinguished road
Make sure the header in the file is in a format similar to this:

Code:
[Name]
myname
[Spatial Fields]
x,y,z
[Data]
x [ m ], y [ m ], z [ m ], Velocity [ m/s ]
Lance is offline   Reply With Quote

Old   February 29, 2012, 03:49
Default
  #3
Senior Member
 
Ashkan Javadzadegan
Join Date: Sep 2010
Posts: 221
Rep Power: 7
ashtonJ is on a distinguished road
Thank you.

I arranged the data in following format.

[Name]
VelocityMag
[Spatial Fields]
x,y,z
[Data]
1,2,2,0.2

Then, I tried to import the data into User function with three dimensional option. It gave the following error:

3 Data item() could not be read as a number.

Please help me to fix this.

Thank you.
Kind regards,
ashkan
ashtonJ is offline   Reply With Quote

Old   February 29, 2012, 03:53
Default
  #4
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 480
Rep Power: 10
Lance is on a distinguished road
You misunderstood, make sure the header is in the format I suggested. Then your file would look something like:
Code:
[Name] 
myname 
[Spatial Fields] 
x,y,z 
[Data] 
x [ m ], y [ m ], z [ m ], Velocity [ m/s ]
1,11,12,20
12,11,12,20
.....
Lance is offline   Reply With Quote

Old   May 14, 2014, 04:50
Default 3 Dimensional User Function
  #5
New Member
 
Mehdi Ramezanpour
Join Date: May 2014
Posts: 2
Rep Power: 0
meram is on a distinguished road
Sorry for bumping a 3 years old thread, I arranged a 3d data in following format(as Mr. lance suggested):

[Name]
myname
[Spatial Fields]
x,y,z
[Data]
x [ m ], y [ m ], z [ m ], Velocity [ m/s ]
1,11,12,20
12,11,12,20
15,13,14,18

but it gave the following error:

"1 Data item() could not be read as a number."

then I decided to define it without importing data as shown in the attached image,

but then it gave the following error:


"ERROR
Incorrect number of arguments specified in CEL FUNCTION 'Function 1'.
Expected number: 3; actual: 1."


Please help me to fix this.

image address:

http://www.tinypic.com/view.php?pic=sxnq6r&s=8#.U3MeOFfG21t

Last edited by meram; May 14, 2014 at 13:58.
meram is offline   Reply With Quote

Old   May 14, 2014, 07:36
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 9,880
Rep Power: 78
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Before you accuse CFX of having a bug - have you done the basic checks?

Have you checked your carriage returns are correct (Linux versus Windows)?
Have you confirmed that there is a carriage return after the last line?
Have you tried it with another data set?
ghorrocks is offline   Reply With Quote

Old   May 14, 2014, 13:26
Default
  #7
New Member
 
Mehdi Ramezanpour
Join Date: May 2014
Posts: 2
Rep Power: 0
meram is on a distinguished road
Hi Mr. Horrocks,
Thanks for your attention; I really appreciate your help.

just now i have solved my problem,
there were two mistakes in my previous work:
1- Imported text file should not have any header.
2- I should define units for every argument (m, m, m) in "Argument units field"


best regards,


Mehdi

Last edited by meram; May 15, 2014 at 10:21.
meram is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 14:06
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51
User Defined Function for convection coefficient ereiss FLUENT 1 July 8, 2004 17:10
User define flux function kethireddy FLUENT 0 July 5, 2004 05:53


All times are GMT -4. The time now is 11:54.