|
[Sponsors] |
How to import a data file (excel,txt or csv)to Fluent or CFD-Post? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 5, 2015, 11:14 |
How to import a data file (excel,txt or csv)to Fluent or CFD-Post?
|
#1 |
New Member
Join Date: May 2013
Posts: 21
Rep Power: 13 |
Hi!
My objective is to import to Fluent or CFD-post a data file done in Excel. This Excel file have the "nodenumber", "x-coordinate", "y-coordinate", "new_parameter". This "new_parameter" was determined in Excel. So, I already have an Excel file, also a txt file (already converted) and csv file (already converted) like this: nomenumber, x-coordinate, y-coordinate, z-coordinate, new_parameter 1,-0.00000123736464,-0.0017365363,0,0.763536373 2,0.00003425625,-0.0019373763,0,0.77660838383 3,-0.00006835662,-0.00736363,0,0.7798373732 I already tried to import the excel or txt or csv file to fluent or CFD-post (through several ways) but I canīt get. After importing to Fuent or CFD-Post, my final objective is to obtain this "new parameter" drawn in 3D dimension of the geometry. Do anyone know a simple way to import this file (excel, txt or csv) to fluent or CFD-Post? I am wainting for an answer. Thank you very much! |
|
January 5, 2015, 19:58 |
|
#2 |
Senior Member
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 211
Rep Power: 17 |
as far as my fluent knowledge goes, you can't just import csv data into fluent for visualisation. one option i can think of is to convert the excel file into a file that is readable by fluent, like cgns, which also offers the advantage that you can store flow solutions like this "new_parameter".
that is rather tricky and a long shot, but since you are using excel, i assume you are getting data out of fluent, do some post processing in excel and then you want to read the post processed values back into fluent / cfd-post, right? both fluent and cfd-post have their inbuild calculators so whatever you are doing in excel may be accomplished within fluent / cfd-post without the need to export and reimport data to/from a csv file. can you elaborate on what you want to do exactly in this csv file (what is "new_parameter")? |
|
January 6, 2015, 00:52 |
|
#3 |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
If you have a base Fluent case already with the geometry, you can use a UDF to read in the data from the file (in any format that you care to parse) and put it into User-Defined Memory. You have "nodenumber" as a value. If the node information was pulled from the Fluent case/geometry in order, you can just write directly to the node storage using the N_UDMI macro.
If the nodes are not in the same order as the Fluent base case, your UDF is going to have to sort and search to get the node data copied into the right place. In any case, I doubt that there is anything in the excel spreadsheet that could not just be coded directly into the UDF and then compute the data in place, rather than dumping to files and parsing back and forth. If however you don't have a base Fluent case/geometry and your intention is to just pull the x,y,z + data values into a CFD code in order to visualize them, you are wasting your time. A list of node location and function values represents only a point cloud--there is no connectivity/geometry and Fluent/CFX is not going to be able to make sense of it. Take a look at Paraview. I think they have some plugins to display pointcloud data. Or maybe here: http://pointclouds.org/documentation...ualization.php |
|
January 7, 2015, 11:54 |
|
#4 |
New Member
Join Date: May 2013
Posts: 21
Rep Power: 13 |
Thank you for everyone. I already found this problem.
However, consequently, I have another.... Do anyone know, how can I export from Fluent the matrix with the links between the nodes of the mesh? Like this (for exemple): [Faces]0, 1, 23, 4, 56, 7, 89, 10, 11(...) Thanks in advance. |
|
January 7, 2015, 11:56 |
|
#5 |
New Member
Join Date: May 2013
Posts: 21
Rep Power: 13 |
I mean, like this:
[Faces] 0, 1, 2 3, 4, 5 6, 7, 8 9, 10, 11 (...) Thanks in advance. |
|
October 28, 2015, 04:36 |
|
#6 |
New Member
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 12 |
[QUOTE=mprinkey;526238]If you have a base Fluent case already with the geometry, you can use a UDF to read in the data from the file (in any format that you care to parse) and put it into User-Defined Memory.
can you please specify how this can be done. |
|
February 17, 2017, 15:51 |
|
#7 |
New Member
Filipa
Join Date: Feb 2017
Posts: 1
Rep Power: 0 |
Hi. I have exactly the same problem as you (the first problem). What you do for solve this? Thanks
|
|
March 27, 2017, 08:06 |
|
#8 |
New Member
Join Date: May 2013
Posts: 21
Rep Power: 13 |
||
May 17, 2017, 09:53 |
N_UDMI/structure reference not implemented
|
#9 |
New Member
Join Date: Sep 2010
Location: Wuhan, China
Posts: 23
Rep Power: 16 |
I interpreted the following UDF, and allocated node memery, but Fluent reports an error: 'line 18: structure refrence not implemented'. I dont know why, so i am really grateful if anyone could tell me how to deal with this.
#include "udf.h" DEFINE_ON_DEMAND(IG) { real x,y; int n; Domain *d; Thread *t; Node *v; cell_t c; d=Get_Domain(1); thread_loop_c(t,d) { begin_c_loop(c,t) { c_node_loop (c,t,n) /*n is the local index number*/ { v = C_NODE(c,t,n) ;/*to obtain the global cell node number*/ N_UDMI(v,0) =NODE_X(v);; } } end_c_loop(c,t) } } |
|
May 17, 2017, 11:02 |
|
#10 |
New Member
Join Date: Sep 2010
Location: Wuhan, China
Posts: 23
Rep Power: 16 |
the N_UDMI macro should be compiled rather than interpreted
|
|
June 20, 2017, 08:58 |
|
#11 |
New Member
lj
Join Date: Oct 2013
Posts: 1
Rep Power: 0 |
||
January 12, 2018, 15:51 |
|
#12 |
New Member
Ahmed Hassan
Join Date: Nov 2017
Posts: 10
Rep Power: 9 |
How did you solve the first problem ?
|
|
September 5, 2018, 02:37 |
|
#13 |
Member
Leonardo
Join Date: Nov 2017
Posts: 37
Rep Power: 9 |
I have the same problem... how did you solve it?
|
|
January 28, 2020, 00:56 |
|
#14 |
New Member
Rupali
Join Date: Oct 2019
Posts: 14
Rep Power: 7 |
I had inserted a udf of velocity profile consisting of different values of velocity at different time steps in the .txt format. The magnitude of velocity as in my tabulated data is both negative and positive. So, the problem I am facing is that fluent is only reading the positive values of velocities and neglecting the negative values of velocities. Because of which the velocity profile is not exactly what I want to implement. Can anyone suggest a proper solution to my problem?
|
|
January 28, 2020, 18:51 |
|
#15 |
Senior Member
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 416
Rep Power: 15 |
Maybe you need two or three different velocity profiles. One for U, one for V, one for W. Then it can be negative
|
|
January 29, 2020, 00:44 |
|
#16 |
New Member
Rupali
Join Date: Oct 2019
Posts: 14
Rep Power: 7 |
I have attached the velocity profile graph. For this particular velocity profile I have written a UDF in tabulated form. I have data for time and velocity respectively. So, I am not able to understand how to construct two or three velocity profile from the tabulated data which I have? Please help me with this.
|
|
January 31, 2020, 05:52 |
UDF not required
|
#17 |
Senior Member
|
Hi Rupali
Since the velocity is a function of time alone, you may use a transient profile instead of a UDF. As far as direction is concerned, you already know it. Currently, with the UDF, you already have a direction specification given at the boundary, default is Normal to Boundary. If it is default and the boundary is planar, then you know the direction.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wmake compiling new solver | mksca | OpenFOAM Programming & Development | 14 | June 22, 2018 07:29 |
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error | FerdiFuchs | OpenFOAM Community Contributions | 27 | April 16, 2014 16:14 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 12:46 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |