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

Trying to input a .csv file as a profile data

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Opaque
  • 1 Post By Dacaptain1615

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 9, 2019, 15:28
Default Trying to input a .csv file as a profile data
  #1
New Member
 
orvy
Join Date: Jul 2019
Posts: 7
Rep Power: 7
Dacaptain1615 is on a distinguished road
Hello

I am working on a conjugate heat transfer model using Maxwell and CFX. Maxwell i am using to determine the ohmic losses of a conductor and then using those losses and the heat input into the system of the conductor in a box. My question pertains to an error i am getting once i try to input these losses as a .csv file. CFX gives me an error that i do not know how to solve. i read other threads on here but could not fix my issues after reading them. I attached both a snip of the error and mu .csv excel file.


Thank you for your help, i appreciate it.
Attached Images
File Type: png Error message.PNG (14.3 KB, 94 views)
File Type: png excel image.PNG (30.6 KB, 144 views)

Last edited by Dacaptain1615; July 10, 2019 at 10:14.
Dacaptain1615 is offline   Reply With Quote

Old   July 9, 2019, 18:52
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,832
Rep Power: 33
Opaque will become famous soon enough
Remove the _ from the [Name], i.e. Current Inlet 1
Opaque is offline   Reply With Quote

Old   July 10, 2019, 08:23
Default
  #3
New Member
 
orvy
Join Date: Jul 2019
Posts: 7
Rep Power: 7
Dacaptain1615 is on a distinguished road
Thank you for the suggestion opaque, but i had already tried that before.
Dacaptain1615 is offline   Reply With Quote

Old   July 10, 2019, 09:17
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,832
Rep Power: 33
Opaque will become famous soon enough
It seems a small file.

Could you attach it to the thread? or copy/paste the full file in the thread?
Opaque is offline   Reply With Quote

Old   July 10, 2019, 10:31
Default
  #5
New Member
 
orvy
Join Date: Jul 2019
Posts: 7
Rep Power: 7
Dacaptain1615 is on a distinguished road
I tried uploading the file but the file was way too big. it had about 250k rows of data. i uploaded a truncated version.
Attached Files
File Type: zip New Compressed (zipped) Folder.zip (3.0 KB, 19 views)
Dacaptain1615 is offline   Reply With Quote

Old   July 10, 2019, 11:02
Default
  #6
Senior Member
 
Join Date: Jun 2009
Posts: 1,832
Rep Power: 33
Opaque will become famous soon enough
Seen this before with Excel. It saves the file assuming all the rows have the same number of columns, and it adds several commas for the missing columns.

Open the file in Wordpad/Notepad or any text editor, remove the commas after the section header, i.e. [Name], [Spatial Fields], [Data], etc.

Another advice, be careful with Excel floating point format. You may have a .csv file with several significant digits, and Excel with truncate your values to two/three significant digits by default (depending on your preferences if I recall)

Summary: careful with Excel when editing .csv files for ANSYS CFX
Opaque is offline   Reply With Quote

Old   July 10, 2019, 11:51
Default
  #7
New Member
 
orvy
Join Date: Jul 2019
Posts: 7
Rep Power: 7
Dacaptain1615 is on a distinguished road
I see, the format i am using in excel is wrong in some way. Maxwell outputs the data in a .fld ( field file) and i need a .csv in CFX. Is there another way to easily convert between these different file formats? other than excel,

I also opened the files in notepad and removed the extra commas, attached a picture below and i am still receiving the same error.
Attached Images
File Type: png Notepad csv.PNG (7.6 KB, 87 views)
Dacaptain1615 is offline   Reply With Quote

Old   July 10, 2019, 12:46
Default
  #8
Senior Member
 
Join Date: Jun 2009
Posts: 1,832
Rep Power: 33
Opaque will become famous soon enough
I removed the commas, and it worked for me.

Could you attach the latest version? and post the latest error message?
Opaque is offline   Reply With Quote

Old   July 10, 2019, 14:51
Default
  #9
New Member
 
orvy
Join Date: Jul 2019
Posts: 7
Rep Power: 7
Dacaptain1615 is on a distinguished road
yea here it is, the error message is the same as the initial error i was getting before. can you also upload the one that you did so that i can see the difference between your and mine. I might just take the one you did and paste the data for all my parts below that.
Attached Files
File Type: zip New Compressed (zipped) Folder.zip (281 Bytes, 16 views)
Dacaptain1615 is offline   Reply With Quote

Old   July 10, 2019, 15:35
Default
  #10
Senior Member
 
Join Date: Jun 2009
Posts: 1,832
Rep Power: 33
Opaque will become famous soon enough
Uploading mine will not help you much since you will not know what is happening on your side.

Something is not standard on how the file was saved.

If I open it in Notepad, minor modification, saved it and reload I get same error

However, if I open it in Wordpad, same minor modification, saved it and reload the error goes away.

How are you editing the file, which editor?
anan12345 likes this.
Opaque is offline   Reply With Quote

Old   July 10, 2019, 16:07
Default
  #11
New Member
 
orvy
Join Date: Jul 2019
Posts: 7
Rep Power: 7
Dacaptain1615 is on a distinguished road
I am using Notepad.
Dacaptain1615 is offline   Reply With Quote

Old   July 10, 2019, 16:28
Default
  #12
New Member
 
orvy
Join Date: Jul 2019
Posts: 7
Rep Power: 7
Dacaptain1615 is on a distinguished road
OMG that completely fixed it. it was notepad this entire time, cause i previously removed those extra commas on notepad before you said that it can be an issue and saved it as a .csv. but now that i did it in wordpad it worked.

You are the best, thank you for all your help. you just fixed 2 days of frustration not knowing what was wrong.
anan12345 likes this.
Dacaptain1615 is offline   Reply With Quote

Old   June 4, 2022, 15:53
Default
  #13
Member
 
Join Date: Apr 2020
Posts: 76
Rep Power: 6
mz_uon is on a distinguished road
Hello

I am trying to import coordinates for a point cloud in CFD-post. See the CSV file in the image. However, I keep getting an error when I try to import. Could you please suggest how can I fix this? None of the solutions described above solved my problem, hence posting this.

Thank you



Quote:
Originally Posted by Dacaptain1615 View Post
OMG that completely fixed it. it was notepad this entire time, cause i previously removed those extra commas on notepad before you said that it can be an issue and saved it as a .csv. but now that i did it in wordpad it worked.

You are the best, thank you for all your help. you just fixed 2 days of frustration not knowing what was wrong.
Attached Images
File Type: png Capture.PNG (9.2 KB, 32 views)
mz_uon is offline   Reply With Quote

Old   June 4, 2022, 20:02
Default
  #14
Senior Member
 
Join Date: Jun 2009
Posts: 1,832
Rep Power: 33
Opaque will become famous soon enough
You are using an incomplete mixed format for import

Either delete the [Data] section, or add the [Name] and [Spatial Fields] section

For example,

X [m], Y [m], Z[m]
..
..

or

[Name]
MyPointCloud

[Spatial Fields]
X, Y, Z

[Data]
X [m], Y [m], Z[m]
..
..

The last one should import in CFX-Pre if additional data columns are provided. If I recall CFD-Post should import both formats.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   June 5, 2022, 07:49
Default
  #15
Member
 
Join Date: Apr 2020
Posts: 76
Rep Power: 6
mz_uon is on a distinguished road
Hi

Thanks for your answer, but I still get this error (see image).


Quote:
Originally Posted by Opaque View Post
You are using an incomplete mixed format for import

Either delete the [Data] section, or add the [Name] and [Spatial Fields] section

For example,

X [m], Y [m], Z[m]
..
..

or

[Name]
MyPointCloud

[Spatial Fields]
X, Y, Z

[Data]
X [m], Y [m], Z[m]
..
..

The last one should import in CFX-Pre if additional data columns are provided. If I recall CFD-Post should import both formats.
Attached Images
File Type: png Capture.PNG (7.0 KB, 20 views)
mz_uon is offline   Reply With Quote

Old   November 7, 2022, 08:09
Default
  #16
Member
 
Join Date: Apr 2020
Posts: 76
Rep Power: 6
mz_uon is on a distinguished road
Hello

Does anyone know how to resolve this? Will greatly appreciate your help. I am just trying to extract data (in CFD-post) from a list of user input points (.csv file etc.).

Thank you
mz_uon is offline   Reply With Quote

Old   November 7, 2022, 16:34
Default
  #17
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,781
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Isn't the file format fully described in the documentation? See CFD-Post documentation section 8.8.1.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is online now   Reply With Quote

Old   November 7, 2022, 17:52
Default
  #18
Member
 
Join Date: Apr 2020
Posts: 76
Rep Power: 6
mz_uon is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Isn't the file format fully described in the documentation? See CFD-Post documentation section 8.8.1.
Hello

Thanks for your comment. I have seen the document but it is not clear. I posted the question in another forum with my sample .csv file, but it did not load. Can you please share one if you have?

Thank you
mz_uon 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 08:46
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 17:34
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


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