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

CFD-Post import data as variable

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

Like Tree1Likes
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2022, 07:47
Default CFD-Post import data as variable
  #1
New Member
 
Benjamin
Join Date: Jul 2015
Posts: 21
Rep Power: 10
Benzouz is on a distinguished road
Hi everyone,

I notice it is possible to export data from a variable as csv from CFD-Post, but I was wondering if it would be possible to do the same for importing data?

My goal would be to export a few variables, perform some calculations on them to create a new variable (using better tools than the expressions or macro available in CFD-Post), and then re-importing that variable into CFD-Post.

The reason for this is because I would like to perform some matrix calculations or use complex numbers, which are not possible in CFD-Post from what I found.

Thank you!
Benzouz is offline   Reply With Quote

Old   July 19, 2022, 19:21
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I do not know of a good way to do this. Your best bet would be to do it during the solver (maybe as a user fortran routine, it could even just read a text file) and write the result of that to a additional variable in the solver. Then it will be available in the post processor.

If you are doing advanced post processing like this you might want to consider more sophisticated post processors like tecplot, ensight or fieldview.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   July 20, 2022, 10:14
Default
  #3
Senior Member
 
Join Date: Jun 2009
Posts: 1,803
Rep Power: 32
Opaque will become famous soon enough
Quote:
Originally Posted by Benzouz View Post
Hi everyone,

I notice it is possible to export data from a variable as csv from CFD-Post, but I was wondering if it would be possible to do the same for importing data?

My goal would be to export a few variables, perform some calculations on them to create a new variable (using better tools than the expressions or macro available in CFD-Post), and then re-importing that variable into CFD-Post.

The reason for this is because I would like to perform some matrix calculations or use complex numbers, which are not possible in CFD-Post from what I found.

Thank you!
How complex is your calculation than cannot be done using expressions? I guess you are writing an expression of some sort externally, correct?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   August 2, 2022, 06:36
Default
  #4
New Member
 
Benjamin
Join Date: Jul 2015
Posts: 21
Rep Power: 10
Benzouz is on a distinguished road
Thank you for your answers. I was away last week so I didn't get to reply earlier.

In the end I used the import command to load my csv:
>import type=Generic, filename=C:/file.csv

The thing is that I needed to check the Line and Face Connectivity when exporting the data otherwise I wouldn't be able to reload it properly after my calculation.

By the way by complex I meant the use of complex numbers, with real and imaginary parts, which I don't think CFD-post can handle.
Benzouz is offline   Reply With Quote

Old   August 2, 2022, 07:26
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
While CFD-Post does not natively support complex number functions, you can write a complex number as two scalar variables and then define complex number functions from those two variables. Obviously this is not as nice as native functions but it could be worth considering to to avoid the hassle of exporting data and doing the function somewhere else.
Benzouz likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Reply

Tags
cfd-post, import, variable

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
Query-HOW TO EXTRACT MONITOR PLOT DATA AND IMPORT ON CFD POST Mfaizan CFX 6 June 9, 2016 21:18
[OpenFOAM] Import CFD data for visualizing in paraview rpk ParaView 0 March 29, 2012 04:46
emag beta feature: charge density charlotte CFX 4 March 22, 2011 09:14
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27


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