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

CCL Timestep Lists

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 29, 2011, 06:41
Default CCL Timestep Lists
  #1
Member
 
Max
Join Date: Apr 2011
Posts: 46
Rep Power: 5
max3.2 is on a distinguished road
Hi,

I've got finished transient Analysis with several timesteps, and i need to run a CCL for every step to extract specified data. Here is a snippet of the problem

Code:
! $ts =350,627,903,1180,1456,1732,2009,2285,2661,2836,3111,3386,3662,3938,4213;

! for($index=1; $cnt<=(15); $cnt++){
> load timestep=$ts[$index]

##Working CCL for one timestep with using the timestep number one time for naming a file like

! open(OFH,">HoeheMassFlowAves $ts[$index].dat");
}
Now im getting an error at the closing bracket position of the 1st for-loop. Im not that good at CCL, nor i can find any libraries, so there are maybe some syntax-erros while using the list. Can someone help? doing this manually would take a lot of time, since playing the CCL for one step is about 15minutes and the list above isnt complete

Regards
Max
max3.2 is offline   Reply With Quote

Old   June 29, 2011, 07:32
Default
  #2
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 472
Rep Power: 10
Lance is on a distinguished road
I think you need a ! before the last }, like:
Code:
!}
and not
Code:
 }
Lance is offline   Reply With Quote

Old   June 29, 2011, 08:47
Default
  #3
Member
 
Max
Join Date: Apr 2011
Posts: 46
Rep Power: 5
max3.2 is on a distinguished road
Hi Lance,

thanks, would have searched ages for this.

Now, there isn't any error. Session gets loaded, but then nothing happens. Is there a mistake in calling the timesteps from the list? I havent found any examples for lists so i just did it like its used in other languages...
max3.2 is offline   Reply With Quote

Old   June 29, 2011, 09:01
Default
  #4
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 472
Rep Power: 10
Lance is on a distinguished road
Quote:
Originally Posted by max3.2 View Post
Now, there isn't any error. Session gets loaded, but then nothing happens. Is there a mistake in calling the timesteps from the list?
I think your for loop definition is wrong, you mix $index with $cnt. Try:

Code:
! for($index=1; $index<=(15); $index++){
Also, indices in arrays are zero-based. Example:
@array=(2,4,8,10);
$var = $array[0]; # gives $var == 2
($var1,$var2) = $array[2,3]; # gives $var1 == 8, $var2 == 10
Lance is offline   Reply With Quote

Old   June 29, 2011, 10:13
Default
  #5
Member
 
Max
Join Date: Apr 2011
Posts: 46
Rep Power: 5
max3.2 is on a distinguished road
Yeah...sorry for this stupidity, heat around here seems to get in my head
Its working now, thanks for the great help
max3.2 is offline   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
Restart 2-way FSI with different timestep? Lance CFX 11 April 17, 2013 00:37
How to interrupt unsteady calculation and carry on without timestep increase? aleisia FLUENT 1 March 19, 2011 00:02
Timestep study ijk CFX 6 April 9, 2010 07:38
interTrackFoam timestep virginie_e OpenFOAM Running, Solving & CFD 4 April 6, 2009 05:02
Use of Timestep in obtaining solution. hagupta CFX 7 February 28, 2006 13:14


All times are GMT -4. The time now is 00:46.