|
[Sponsors] |
December 5, 2008, 09:44 |
Saving of monitor points in batch mode.
|
#1 |
Guest
Posts: n/a
|
Hi all,
I am trying to run several simulations in batch mode via Perl. After one simulation is finished the value of some variables calculated in the finished run should be used to determine which simulation has to be started next. I made a monitor point from these points. I can not find a way to export this data in batch mode. Does anyone know how to solve this problem? I am using CFX 11. Thanks in advance, Martijn |
|
December 5, 2008, 20:47 |
Re: Saving of monitor points in batch mode.
|
#2 |
Guest
Posts: n/a
|
You can extract the monitor data from the results but a better solution would be to run a session file in CFX-Post in batch mode (with some Perl commands to write the data to file).
By the way, there is capability coming with version 12 (configurations) that will allow you to set this all up in advance in CFX-Pre! -CycLone |
|
December 8, 2008, 06:54 |
Re: Saving of monitor points in batch mode.
|
#3 |
Guest
Posts: n/a
|
Go on launer -> command line. type cfx5dfile -help. There is a command read-mon or something like that. You got text with all monitor data. With a little experience in data processing and programming you will be able to extract the data you want.
Heard that 12 there will be improvement. |
|
December 10, 2008, 10:36 |
Re: Saving of monitor points in batch mode.
|
#4 |
Guest
Posts: n/a
|
Thanks!
With the following (part of a) perl file I could read my monitor points: system("cfx5dfile LastResidu.res -read-monitor -output output.csv"); open (Outputcsvfile, "output.csv") || die "couldn't open the file!"; $NumberOfLinesInFile=0; while ($record = <Outputcsvfile>) { $NumberOfLinesInFile=$NumberOfLinesInFile+1; } $LineNumber=0; while ($record = <Outputcsvfile>) { # Loop over regels $record2=$record; $LineNumber=$LineNumber+1; if ($LineNumber eq $NumberOfLinesInFile) { @field = parse_csv($record); chomp(@field); $DispLastIteration=$field[172]; # $field now contains the last iteration value of a certain monitor point. } } exit; sub parse_csv { my $text = shift; my @new = (); push( @new, $+ ) while $text =~ m{ "([^\"\\]*(?:\\.[^\"\\]*)*)",? | ([^,]+),? | , }gx; push( @new, undef ) if substr( $text, -1, 1 ) eq ','; return @new; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running Ansys in BAtch Mode | kuleuvenstudent | ANSYS | 1 | October 18, 2017 12:11 |
saving figures in batch mode | R.D.Prabhu | FLUENT | 6 | June 12, 2014 11:33 |
to run a replayfile in batch mode from UNIX | froztbear | ANSYS Meshing & Geometry | 4 | May 13, 2014 08:00 |
cfdpost in batch mode | taichijulie | CFX | 1 | October 25, 2010 15:29 |
Prosurf in batch mode | Dhruv | Siemens | 1 | September 19, 2005 18:02 |