Welcome, Guest
Username: Password: Remember me

TOPIC: oil spill - animate both tracers and drogues

oil spill - animate both tracers and drogues 9 years 8 months ago #16224

  • hshen
  • hshen's Avatar
I am trying to create an animation video recording both the tracer and drogue changes over time. BlueKenue allows making tracer animations, and we have also animated the drogues in ArcGIS.

But is there a single software allowing animating both? Thanks

Hailiang
The administrator has disabled public write access.

oil spill - animate both tracers and drogues 9 years 8 months ago #16228

  • jmhervouet
  • jmhervouet's Avatar
Hello,

It is possible with Tecplot, but it is not a freeware. Our output format for drogues is in fact the Tecplot format, and this software allows to open simultaneously a Telemac file (selafin format) and a particles file. This is described in Telemac-2D documentation.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

oil spill - animate both tracers and drogues 9 years 8 months ago #16244

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Blue Kenue supports a "Parcel Set" file format (extension *.pcl) that we use for our Lagrangian solvers, PSed, POSM, etc.

If you can get the drogues result into a pcl file you can achieve what you want with Blue Kenue.

See page 175 of the Blue Kenue manual for detailed description of the pcl file.

Hope this helps... Martin
The administrator has disabled public write access.

oil spill - animate both tracers and drogues 9 years 8 months ago #16290

  • hshen
  • hshen's Avatar
Thanks Martin. I converted one of my drogue file into pcl file in C#. It works great when i have equal number of parcels for each output time step. But since some of my drogues die along the way, i do not have equal number of drogues for every output time step. Then the problem comes in animation, it seems in the animation toolbar, the buttons work randomly, sometime one will work but sometime the same does not.

Does pcl file require equal number of parcels for each time step? If not, are there any special characters required to be put between records if the parcle # is different among steps? Can you share some insight of this problem?

I attached two files for your reference. thanks

Hailiang
The administrator has disabled public write access.

oil spill - animate both tracers and drogues 9 years 8 months ago #16298

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Hi Hailiang,

The way it stands right now, each record in the pcl file must be the same length. (ie. the same number of parcels)

Martin
The administrator has disabled public write access.

oil spill - animate both tracers and drogues 9 years 8 months ago #16319

  • hshen
  • hshen's Avatar
Thanks Martin, I filled each record to the same length by repeating some drogues info. It works beautifully now.

Hailiang
The administrator has disabled public write access.

oil spill - animate both tracers and drogues 7 years 4 weeks ago #28083

  • jamesmac
  • jamesmac's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Hi,
I am trying to convert drogue output time series from a Telemac3D simulation into pcl binary format for viewing in Blue Kenue.
I have followed the pcl format details in the current Blue Kenue manual as closely as I can. The output pcl is created successfully but Blue Kenue has a problem loading the file :
ERROR:while reading header from file:

One or two samples of a working pcl file would be useful for debugging this, but I can't find any on the net. Could you or Martin make one available?
Thanks
James
The administrator has disabled public write access.

oil spill - animate both tracers and drogues 7 years 3 weeks ago #28084

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
I cannot share the pcl file - it is for a private project.

I have posted the portion of my C# code for writing the headers below for your reference.

Good luck

// write file header. DO NOT MODIFY!!!
WriteAsASCIIString(bw, "#########################################################################\n");
WriteAsASCIIString(bw, ":FileType pcl binary EnSim 1.0\n");
WriteAsASCIIString(bw, string.Format(":WrittenBy {0}\n", "Hailiang Shen"));
WriteAsASCIIString(bw, "#\n");
WriteAsASCIIString(bw, "#
\n");
WriteAsASCIIString(bw, "#\n");

for (int i = 0; i < firstParticle.Mass.Count + 1; i++) // +1 to include the attribute ID
{
WriteAsASCIIString(bw, string.Format(":AttributeName {0} {1}\n", i + 1, COilDrogue.AttributeNames)); // attribute id starts from 1 not 0
}

WriteAsASCIIString(bw, ":EndHeader\n");


private void WriteAsASCIIString(BinaryWriter bw, string s)
{
byte[] byteData = Encoding.ASCII.GetBytes(s);
bw.Write(byteData, 0, byteData.Length);
}
The administrator has disabled public write access.
The following user(s) said Thank You: jamesmac

oil spill - animate both tracers and drogues 7 years 3 weeks ago #28093

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Hi all,

I'm attaching a simple example dataset for the BlueKenue POSM model
as well as the C source code that writes the POSM output parcel file.

Unzip the SimpleTest archive,
Load the SimpleTest.osp file into Blue Kenue,
Use Run->Launch Simulation.

You will now have an example pcl file called SimpleTest.pcl

Hope this helps... Martin
Attachments:
The administrator has disabled public write access.

oil spill - animate both tracers and drogues 7 years 3 weeks ago #28100

  • jamesmac
  • jamesmac's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Hi Martin,
Thank you for supplying the files. I have unzipped them and run the simulation and now have a PCL file that animates in Blue Kenue.
I had already fixed the header problem (the first comment line was missing), but then Blue Kenue reported an error with the data parcels. Your output PCL file should be very helpful with fixing this.
Regards
James
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.