|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Join Date: Oct 2011
Posts: 32
Rep Power: 13 ![]() |
This CCL calculates wave height in Post and outputs it to a .csv excel file.
It places the data in a row, how can I change the code so that the data appears in a column? LIBRARY: CEL: EXPRESSIONS: WaveHeight=lengthInt(Water.Volume Fraction)@Line 1 END END END # Header ! open(OFH,">H3T6.1DATA10.csv"); ! print OFH "Time s,"; ! print OFH "Wave Height @ 150m, "; #================================================= ================== ! $numStart = 5; ! $numEnd = 20; ! for (my $i=$numStart; $i<=$numEnd; $i=$i+5) { > load timestep = $i > load ! $jjpt1 = getExprVal('WaveHeight'); # Print the lines ! print OFH "$jjpt1, "; # repeat around loop ! } !close(OFH); # ================================================== ================= # end |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Oct 2011
Posts: 32
Rep Power: 13 ![]() |
Is this possible?
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,480
Rep Power: 140 ![]() ![]() ![]() ![]() |
How about load the file in Excel, Copy/Paste special/Transpose and save it again? If you need to script it then a simple perl/python/batch/anything script can do it.
Also try the "\n" string to signify new line in the perl script. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
The FOAM Documentation Project - SHUT-DOWN | holger_marschall | OpenFOAM | 242 | March 7, 2013 12:30 |
How to make code run in parallel? | cwang5 | OpenFOAM Programming & Development | 1 | May 30, 2011 04:47 |
Open Source Vs Commercial Software | MechE | OpenFOAM | 28 | May 16, 2011 11:02 |
Small 3-D code | Zdravko Stojanovic | Main CFD Forum | 2 | July 19, 2010 10:11 |
Adding Custom Tab in FLUENT using Scheme Code | dhimans | Fluent UDF and Scheme Programming | 0 | September 14, 2009 15:10 |