CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

how to monitor free surface elevation vs time in OF?

Register Blogs Community New Posts Updated Threads Search

Like Tree15Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2013, 09:51
Default
  #41
Member
 
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 14
luchen2408 is on a distinguished road
hi, Jane,
I have tried your method and I wmake, I got a file sample file, then I run the sample file. I can get the set and surface file. I found that the Z coordinate is negative in some time file. That means it is not based on the local coordinate system, it is also based on the globle coordinate system. I don't konw why.
BTW, I use OpenFOAM 1.7.1. what about you? is that because the different version?
luchen2408 is offline   Reply With Quote

Old   July 11, 2013, 10:04
Smile
  #42
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 12
pici is on a distinguished road
Hi Jane,
I'm new of OpenFOAM, but your suggestion was really useful to address my problem.
Do you have some suggestion about to find the VOF level of a single point? or to trace in time the distance from a given point relative to the free surface?
Thank you in advance
Piero
pici is offline   Reply With Quote

Old   July 11, 2013, 13:30
Thumbs up
  #43
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 12
pici is on a distinguished road
Quote:
Originally Posted by luchen2408 View Post
hi, Jane,
I have tried your method and I wmake, I got a file sample file, then I run the sample file. I can get the set and surface file. I found that the Z coordinate is negative in some time file. That means it is not based on the local coordinate system, it is also based on the globle coordinate system. I don't konw why.
BTW, I use OpenFOAM 1.7.1. what about you? is that because the different version?
Hi Luchen,
I'm the last come, but perhaps I can participate to your discussion, because my problem is sloshing of a ship vessel and I too need to evaluate the free surface level in some position of my vessel (along a measuring laser ray bar).
I just did modifications suggested by Jane and I have my own sample running.
It works well, and I made the same modifications to probeLocations (it is located in same directory of sample).
I can state that both modified applications work very well, in Local Coordinates System.
I' m using rel. 2.1, so your trouble can be real.
Attached I send my modifications to probeLocations
Quote:
runTime.setTime(timeDirs[timeI], timeI);
Info<< "Time = " << runTime.timeName() << endl;

// Handle geometry/topology changes
// polyMesh::readUpdateState state = mesh.readUpdate();

// if
// (
// state == polyMesh::POINTS_MOVED
// || state == polyMesh::TOPO_CHANGE
// )
As you can see, changes are perfectly equivalent to Jane's changes.
Result of the probeLocations is a single file (ready for LibreOfficeCalc) that list, at time base, the VOF scalar (alpha1 in rel. 2.1.0) for each point indicated in probeDict file.
I hope to be useful.
A lot of thanks to Jane and to you, because I'm saving a lot of time and I'm learning a lot of OF features.
Bye
Piero
luchen2408 and dupeng like this.
pici is offline   Reply With Quote

Old   July 12, 2013, 02:19
Default
  #44
Member
 
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 14
luchen2408 is on a distinguished road
hello, Pici,I am also working on the sloshing vessel, I want to plot the max liquid level with time,not some position, because the vessel is moving with 6 DOF motion. The max liquid level will change to different location.I hope my local coordinate system can be transform and rotate with my model, then I can get the max liquide level.
luchen2408 is offline   Reply With Quote

Old   July 12, 2013, 02:36
Default
  #45
New Member
 
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 13
Jane L is on a distinguished road
hi luchen and wellcome to the discussion Piero!

@luchen: are the results the same as you get without the modification? Are there more parts of the code that have to do with the moving of the geometry?
I'm using OF2.1.1, so there might be the reason as this also fits to Piero's post. Is there a chance to uptade to 2.x?

@pici: Finding the location of the free surface elevation was also my objective. I wrote a script for octave (uses matlab syntax) to get a plot of the elevation for a certain location over time. I can send you that file but since I have one more week off, you would have to wait a bit

kind regards
Jane L is offline   Reply With Quote

Old   July 12, 2013, 03:25
Default
  #46
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 12
pici is on a distinguished road
hi Jane, hi Luchen
I'm sure that Jane's method insure that data are extracted in Local Coord.Sys.
I tested it using an example made by a big cube (4meters x side, centered in 0,0,0) that oscillates about 10deg around an axis parallel to x passing through the lower base.
Using original sample with a line coincident with one of four box's vertical edge, I found that, except for time 0, in all time step the line is outside the box (receiving a lot of warning), while using my_sample with same line I have all results (coherent with Paraview plots). Same for my_probeLocation.
Advantage of probeLocation is that all results are in a single table.
@luchen: I think you should find a way to install rel. 2.1.0 (at least). My problem is the same as your, but I must calculate three rotations (pitch, roll, yawn) separately, because of my customer need.
@Jane: many thanks for your help: I will wait for your file.

Have a good day
Piero
pici is offline   Reply With Quote

Old   July 12, 2013, 03:44
Default
  #47
Member
 
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 14
luchen2408 is on a distinguished road
hi,Jane and Pici,
Thanks for your advance, I will update OpenFOAM to 2.1.1 and try once more. I will give the result later.
luchen2408 is offline   Reply With Quote

Old   July 17, 2013, 04:08
Default
  #48
Member
 
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 14
luchen2408 is on a distinguished road
hi,Jane and Pici,
I have tried the openFOAM 1.7.1 and OpenFOAM 2.1.1, there is some different code name and I tested the simulation. Unfortunately,I found the result is the same.I extract the result from the generated surface file. There isn't any difference between 1.7.1 and 2.1.1 version.
luchen2408 is offline   Reply With Quote

Old   July 18, 2013, 08:52
Red face
  #49
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 12
pici is on a distinguished road
Quote:
Originally Posted by luchen2408 View Post
hi,Jane and Pici,
I have tried the openFOAM 1.7.1 and OpenFOAM 2.1.1, there is some different code name and I tested the simulation. Unfortunately,I found the result is the same.I extract the result from the generated surface file. There isn't any difference between 1.7.1 and 2.1.1 version.
Hi Jane and Luchen,
I suspect some stupid mistake: e.g., first time I tried to produce my_sample, I forgot to comment ALL instruction referencing change of geometry. No compiling error, but wrong results!
So I'm sending to you my (working) source code for my_sample and my_probeLocation (their name are still like the original, but dirs have the new name and compiled utils have the new name too).
I can state that they are working well and I'm using both for my job.
Good luck
Piero
Attached Files
File Type: c sample.C (5.0 KB, 71 views)
File Type: c probeLocations.C (2.3 KB, 64 views)
dupeng likes this.
pici is offline   Reply With Quote

Old   July 18, 2013, 10:16
Default
  #50
Member
 
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 14
luchen2408 is on a distinguished road
hi,Jane and Pici,
Thanks for your comment and patience, I found that I made a mistake. I generated different sample file, but I took the same command 'sample'. Actually, I have to take the command './sample' after I took the new sample file. I just made a test and I got the different result. Thank you very much. It stopped me for a long time.
luchen2408 is offline   Reply With Quote

Old   July 18, 2013, 14:48
Default
  #51
New Member
 
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 13
Jane L is on a distinguished road
I'm glad to hear that it's now finally solved! May be this is helps other readers: Does it also work for OF1.7?

Kind regards Jane
Jane L is offline   Reply With Quote

Old   July 22, 2013, 03:58
Default
  #52
New Member
 
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 13
Jane L is on a distinguished road
hi,

here is the script I use to handle the data. It's written for Octave which uses Matlab syntax but is available under GNU license. Check: http://www.gnu.org/software/octave/

As you will see the script simply looks for the first phase-change, hence breaking waves will not be noticed.

Good luck!
Attached Files
File Type: gz gauge.m.tar.gz (699 Bytes, 52 views)
pici likes this.
Jane L is offline   Reply With Quote

Old   July 23, 2013, 08:00
Default
  #53
Member
 
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 14
luchen2408 is on a distinguished road
yes,It also work for O.F.1.7.1
luchen2408 is offline   Reply With Quote

Old   July 28, 2013, 05:35
Default
  #54
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 12
pici is on a distinguished road
Hi Jane,
thank you for your script. I will test it immediately.
At the end, I decided to use my_probeLocation , because measuring levels are made using two small (but long) tubes inside the tank, so a couple of vertical lines (in Tank Coord Sys) are enough to analyze small free surface level; the advantage is that I don't have a set of files (one per each time step) but only a single file (like a spreadsheet) where the first column is the time and all data are ordered using my points ordered coordinates, while the disadvantage is that I have to interpolate the right Z-level using octave or Scilab.
Again thank you for your absolutely fantastic help.
Ciao
Piero

p.s. do you have any experience in integrating solvers? e.g., now I should solve the same sloshing problem, but with Three or Four different fluids together, so I need to integrate interDymFoam with multiphaseInterFoam . . . .
pici is offline   Reply With Quote

Old   October 29, 2013, 10:39
Default
  #55
New Member
 
Join Date: Oct 2013
Posts: 12
Rep Power: 12
Nig̣ is on a distinguished road
Hi ,Jane L and pici,

I'm trying to follow your procedure for modify the probeLocation.C and the sample.C files; but if I go in the directory where these file are stored I cannot save the modification (lines commented ) , I've also tryed to cancel and copy the same directory but when I compile the new C file it give me an error.

Can you give me a more detailed explanation to how set properly the new C files ??
Nig̣ is offline   Reply With Quote

Old   October 31, 2013, 09:33
Default
  #56
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 12
pici is on a distinguished road
Hi Nig̣,
it seems to be a permission's problem.
Because I don't know with which operating system are you working,in Linux term speaking, you have to be sure to be 'superuser' to clone the original probe_Location directory into a new dir, edit files and compile it.
But, perhaps, I can go wrong . . .
Let me know more details and how you job proceeds
bye
Piero
pici is offline   Reply With Quote

Old   September 14, 2015, 08:11
Default how to plot wave surface elevation,pressure,velocity and force
  #57
New Member
 
nirbhay tiwary
Join Date: Aug 2015
Posts: 24
Rep Power: 10
nctiwary is on a distinguished road
hello guys
how to plot wave surface elevation,pressure,velocity and force w.r.t distance and time in IHFOAM..pls provide me the easiest way to do so
nctiwary is offline   Reply With Quote

Reply

Tags
interfoam interdymfoam


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Chart of Surface Elevation MAB CFX 10 February 27, 2016 18:45
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
urgent request-Free surface height plot with time KK FLUENT 6 January 7, 2008 12:50
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32


All times are GMT -4. The time now is 01:30.