|
[Sponsors] |
how to export every data w.r.t time to txt file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 11, 2008, 11:40 |
how to export every data w.r.t time to txt file
|
#1 |
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~!
|
|
February 11, 2008, 13:32 |
Re: how to export every data w.r.t time to txt fil
|
#2 |
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 |
|
February 11, 2008, 13:43 |
Re: how to export every data w.r.t time to txt fil
|
#3 |
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 |
|
February 11, 2008, 17:22 |
Re: how to export every data w.r.t time to txt fil
|
#4 |
Guest
Posts: n/a
|
Answer the first question: Why do you need this data? What do you intend to do with it?
|
|
February 11, 2008, 17:36 |
Re: how to export every data w.r.t time to txt fil
|
#5 |
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 |
|
February 11, 2008, 20:22 |
Re: how to export every data w.r.t time to txt fil
|
#6 |
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. |
|
February 11, 2008, 21:59 |
Re: how to export every data w.r.t time to txt fil
|
#7 |
Guest
Posts: n/a
|
Hi, you can create such data sets using cel interpolation... Thank you.
|
|
February 12, 2008, 16:13 |
Re: how to export every data w.r.t time to txt fil
|
#8 |
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 |
|
February 12, 2008, 16:31 |
Re: how to export every data w.r.t time to txt fil
|
#9 |
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.
|
|
February 12, 2008, 18:01 |
Re: how to export every data w.r.t time to txt fil
|
#10 |
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?
|
|
February 12, 2008, 19:48 |
Re: how to export every data w.r.t time to txt fil
|
#11 |
Guest
Posts: n/a
|
These gathered all data points will be used for designing obtimized neural network strucure of the system. Thank you...
|
|
February 13, 2008, 10:39 |
Re: how to export every data w.r.t time to txt fil
|
#12 |
Guest
Posts: n/a
|
So you're planning to train the neural network based on the results at each node? Interesting.
|
|
February 13, 2008, 11:00 |
Re: how to export every data w.r.t time to txt fil
|
#13 |
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 |
|
February 13, 2008, 20:32 |
Re: how to export every data w.r.t time to txt fil
|
#14 |
Guest
Posts: n/a
|
Thank you so much for your kind answer, CycLone. Have a great day~!
|
|
February 17, 2010, 01:14 |
|
#15 |
New Member
hun
Join Date: May 2009
Posts: 27
Rep Power: 17 |
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 |
|
February 17, 2010, 11:40 |
|
#16 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
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. |
|
February 17, 2010, 21:23 |
|
#17 |
New Member
hun
Join Date: May 2009
Posts: 27
Rep Power: 17 |
Hi Lance
I tried many times but it doesn't work. the error still appear. Can you check it again. thanks Hung |
|
February 17, 2010, 21:27 |
|
#18 |
New Member
hun
Join Date: May 2009
Posts: 27
Rep Power: 17 |
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 |
|
February 18, 2010, 07:22 |
|
#19 |
New Member
Carlos
Join Date: Oct 2009
Posts: 18
Rep Power: 17 |
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 |
|
February 19, 2010, 21:08 |
|
#20 |
New Member
hun
Join Date: May 2009
Posts: 27
Rep Power: 17 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |