CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CD-adapco

extracting the subtitle

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 21, 2001, 13:52
Default extracting the subtitle
  #1
Joern Beilke
Guest
 
Posts: n/a
Is there a way to extract the subtitle from an existing case using a script? Usually cdsave can be used to get information about most settings in the .mdl file, but the subtitle is not saved there.

Next problem: is there a command to list all existing plla's with the contents, position, ...
  Reply With Quote

Old   September 24, 2001, 08:45
Default Re: extracting the subtitle
  #2
steve
Guest
 
Posts: n/a
If you do a "status" while in the plot module, it will list all plla's with complete information. I don't think there is anyway to extract the subtitle.
  Reply With Quote

Old   September 24, 2001, 09:12
Default Re: extracting the subtitle
  #3
Jon
Guest
 
Posts: n/a
Is this rhyming-slang?
  Reply With Quote

Old   September 25, 2001, 07:57
Default Re: extracting the subtitle
  #4
stefan
Guest
 
Posts: n/a
You say that you use the cdsave command to get the model title. I assume that you open the generated .inp file and read the title from there. You could do something similar with a plot file or a postscript file generated out of it. Make a plot with at least the title and subtitle on it. As they are normally located at the same position, you can easily find out the location where the subtitle is generated in the plot or postscript file and then read it from there.
  Reply With Quote

Old   September 25, 2001, 08:09
Default Re: extracting the subtitle
  #5
Joern Beilke
Guest
 
Posts: n/a
I already did it

Here is the perl script to extract title and subtitle from the plot file:



#!/usr/bin/perl
################################################## ####################
# (c) Joern Beilke , 2001
################################################## ####################

if (!defined $ARGV[0]) {
print "USAGE : subtitle.pl casename\n";
exit;
}

my $casename = $ARGV[0];

open(IN , "<${casename}.plot") || die "Datei '${casename}.plot' ist nicht vorhanden";
@alles = <IN>;
$text = join("",@alles);
$text =~ s/\n//g;

while ($text =~ /.*2,0.15,0.7,5,1,([\d]+),(.{120}).*/g) {
$i = $1;
$title = substr($2,0,$i);
print "TITLE: $title\n";
}

while ($text =~ /.*2,0.15,0.45,5,1,([\d]+),(.{120}).*/g) {
$i = $1;
$title = substr($2,0,$i);
print "SUBTITLE1: $title\n";
}

while ($text =~ /.*2,0.15,0.2,5,1,([\d]+),(.{120}).*/g) {
$i = $1;
$title = substr($2,0,$i);
print "SUBTITLE2: $title\n";
}
  Reply With Quote

Old   October 8, 2001, 11:40
Default Re: extracting the subtitle
  #6
Joern Beilke
Guest
 
Posts: n/a
The line

@alles = ; must be changed to

@alles = <IN>;

The correct version was posted but one has to look at the html-source to get it. The "<IN>" was interpreted as a html-command.
  Reply With Quote

Old   October 8, 2001, 12:17
Default Re: extracting the subtitle
  #7
Joern Beilke
Guest
 
Posts: n/a
Even when I put in the correct html command to create the "less than" sign, it does not work correctly.

So please look at the "page source" to get the correct version.
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting the data usker CD-adapco 1 October 4, 2008 09:15
extracting output from the udf brusly FLUENT 0 April 25, 2008 01:10
Extracting Ux Uy and Uz from probed U retech OpenFOAM Running, Solving & CFD 1 January 7, 2008 09:31
Extracting data. Sham FLUENT 2 August 16, 2005 10:39
Extracting *.msh Y FLUENT 7 February 25, 2005 03:33


All times are GMT -4. The time now is 07:10.