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

how to export every data w.r.t time to txt file

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2008, 10:40
Default how to export every data w.r.t time to txt file
  #1
jaho
Guest
 
Posts: n/a
Hello. I would like to ask you a question regariding export method. Actually, I did transient simulation to see the temperature change w.r.t time at every node. I tried to find the way to export all data at every node to txt or xls file in cfx-post. If I use a chart, then I could just export only data as many as point's no. that I defined (not all points). Also, if I use the export (file -> export)in cfx-post , I am able to get the temperature values at every point but these temperatures are only the values at the last time step (not all time steps). Could you please let me know how to export every datum (temp.) for every point at all time steps (or each time step)? Thank you so much for your concern. Have a great day~!
amin_gls likes this.
  Reply With Quote

Old   February 11, 2008, 12:32
Default Re: how to export every data w.r.t time to txt fil
  #2
CycLone
Guest
 
Posts: n/a
Firstly, why? I ask because there may be a better way to do what you are ultimately trying to do.

You can write a macro to loop through all of the trn files and export the data at each timestep. Start by recording a small session where you load a trn file and export the results. You can then put a PERL loop around this and subsitute PERL variables for the timestep number.

Before you do this or ask more details on how (to which I'll refer you to past discussion on this forum, user documentation and tech tips on the ANSYS customer portal), please answer my first question.

-CycLone
  Reply With Quote

Old   February 11, 2008, 12:43
Default Re: how to export every data w.r.t time to txt fil
  #3
jaho
Guest
 
Posts: n/a
Dear CycLone,

Thank you for your kind answer. CycLone, actually I am a notice CFX user. Unfortunately, I don't know about macro and PERL variable... Also, I have to hurry up to solve this problem because of meeting with Prof... If you don't mind, could you please explain this in detain or take an simple exampe if possible? Thanks again. Have a good day, CycLone.

-Jaho
  Reply With Quote

Old   February 11, 2008, 16:22
Default Re: how to export every data w.r.t time to txt fil
  #4
CycLone
Guest
 
Posts: n/a
Answer the first question: Why do you need this data? What do you intend to do with it?
  Reply With Quote

Old   February 11, 2008, 16:36
Default Re: how to export every data w.r.t time to txt fil
  #5
Jaho Seo
Guest
 
Posts: n/a
Sorry about that. Let me explain about this. Let's say that the total simulation time is 50 sec. By the way, at the end of every 1 sec, I changed input conditions. Thus, what I need is not the final output at the end step time but the output at every second. So, each datum is important. These gathered all data points will be used for fiding optimum condition. If you need the explanation in detail, please let me know. Thank you, CycLone.

- Jaho
  Reply With Quote

Old   February 11, 2008, 19:22
Default Re: how to export every data w.r.t time to txt fil
  #6
Rogerio Fernandes Brito
Guest
 
Posts: n/a
How did you change, at the end of every 1 sec, your input conditions?

If you are using a few points, u can use "monitor points" on CFX-Pre. You must enter each point (x;y;z) for monitoring (checking) the temperatures!

Can you send me your .cfx file?

I use CFX-v5.6.

  Reply With Quote

Old   February 11, 2008, 20:59
Default Re: how to export every data w.r.t time to txt fil
  #7
jaho
Guest
 
Posts: n/a
Hi, you can create such data sets using cel interpolation... Thank you.

  Reply With Quote

Old   February 12, 2008, 15:13
Default Re: how to export every data w.r.t time to txt fil
  #8
CycLone
Guest
 
Posts: n/a
Hi Jaho,

It sound like you forgot to set the transient output up before the run. The results file only contains the solution at the last timestep. If you need intermediate results, you need to set up the transient output in the Output Control panel in CFX-Pre. There is way to recover this information after the fact.

If you are running version 11 and had payed attention to the warnings, you would have seen that this is missing. You might want to run through a transient tutorial before continuing, just in case there is more you are missing.

Sorry to be the bearer of bad news, but you'll have to run your analysis again.

-CycLone
  Reply With Quote

Old   February 12, 2008, 15:31
Default Re: how to export every data w.r.t time to txt fil
  #9
Jaho Seo
Guest
 
Posts: n/a
Hi, CycLone. Thank you for your kind answer. For my transient simulation, I set up the transient output in the output Control panel in CFX-Pre. So, I have 'trn' files as many as total step time number. In this case, how can I solve my problem? (The only solution is what you said already (i.e., macro))? Thank you again, CycLone.
  Reply With Quote

Old   February 12, 2008, 17:01
Default Re: how to export every data w.r.t time to txt fil
  #10
CycLone
Guest
 
Posts: n/a
So, back to my original question. What do you want to calculate from the transient results, i.e. what would you do with the text files you want to export?
  Reply With Quote

Old   February 12, 2008, 18:48
Default Re: how to export every data w.r.t time to txt fil
  #11
Jaho Seo
Guest
 
Posts: n/a
These gathered all data points will be used for designing obtimized neural network strucure of the system. Thank you...
  Reply With Quote

Old   February 13, 2008, 09:39
Default Re: how to export every data w.r.t time to txt fil
  #12
CycLone
Guest
 
Posts: n/a
So you're planning to train the neural network based on the results at each node? Interesting.

  Reply With Quote

Old   February 13, 2008, 10:00
Default Re: how to export every data w.r.t time to txt fil
  #13
CycLone
Guest
 
Posts: n/a
Here's a crude session that will do the trick. Copy and paste it into your command window in Post and substitute your starting and finishing iteration numbers as well as your desire filename. Leave the "$i" in the name, as I have done below; Post will substitute the current value of the PERL variable $i into the name when it writes the file. You should first do a manual export to select the variables you want.

!$start = 0;
!$finish = 100;

!for($i=$start,$i<=$finish,$i++) {
> load timestep=$i

EXPORT:
Export File = export_$i.csv
END
>export
!}

-CycLone
yanqoue likes this.
  Reply With Quote

Old   February 13, 2008, 19:32
Default Re: how to export every data w.r.t time to txt fil
  #14
Jaho Seo
Guest
 
Posts: n/a
Thank you so much for your kind answer, CycLone. Have a great day~!
  Reply With Quote

Old   February 17, 2010, 00:14
Default
  #15
New Member
 
hun
Join Date: May 2009
Posts: 27
Rep Power: 16
hung is on a distinguished road
CycLone,
can you check the code again?
because when I used that code to export the data
the ERROR
Overwrite not allowed: export_2.dat
how can i solve it?
thanks

Hung
hung is offline   Reply With Quote

Old   February 17, 2010, 10:40
Default
  #16
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22
Lance is on a distinguished road
Just out of curiosity, have you read the error message?
" ERROR
Overwrite not allowed: export_2.dat"

You're not allowed to overwrite the file, so just simply manually delete the file and run the PERL script again? I am sure that will work.
Lance is offline   Reply With Quote

Old   February 17, 2010, 20:23
Default
  #17
New Member
 
hun
Join Date: May 2009
Posts: 27
Rep Power: 16
hung is on a distinguished road
Hi Lance
I tried many times but it doesn't work.
the error still appear.
Can you check it again.
thanks

Hung
hung is offline   Reply With Quote

Old   February 17, 2010, 20:27
Default
  #18
New Member
 
hun
Join Date: May 2009
Posts: 27
Rep Power: 16
hung is on a distinguished road
For example i leave the state
!$start = 0;
!$finish = 33;
the error will be ExportExecutor::invoke - Overwrite not allowed: export_1.csv
when i chang the start to 1
the error will be export_2.csv
thanks

Hung
hung is offline   Reply With Quote

Old   February 18, 2010, 06:22
Unhappy
  #19
New Member
 
Carlos
Join Date: Oct 2009
Posts: 18
Rep Power: 16
Carlitos is on a distinguished road
I have the same problem as you, Hung. I've tried to delete the file in order to overcoming the overwrite but it doesn't work. Does anyone may help us?

Regards

Carlitos
Carlitos is offline   Reply With Quote

Old   February 19, 2010, 20:08
Default
  #20
New Member
 
hun
Join Date: May 2009
Posts: 27
Rep Power: 16
hung is on a distinguished road
Hi,
I tried to do the manual way first.
overwrite the file
and then tried with the code.
the error message did not appear, but the export is only for 1 step.
it doesnot work for the next step
can someone check and give me the right code.
thanks

Hung
hung 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
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07


All times are GMT -4. The time now is 20:51.