|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Ashkan Javadzadegan
Join Date: Sep 2010
Posts: 255
Rep Power: 17 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 ![]() |
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 ] |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Ashkan Javadzadegan
Join Date: Sep 2010
Posts: 255
Rep Power: 17 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 ![]() |
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 ..... |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Mehdi Ramezanpour
Join Date: May 2014
Posts: 2
Rep Power: 0 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,902
Rep Power: 144 ![]() ![]() ![]() ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Mehdi Ramezanpour
Join Date: May 2014
Posts: 2
Rep Power: 0 ![]() |
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. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |