|
[Sponsors] |
how to monitor free surface elevation vs time in OF? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 30, 2009, 11:01 |
|
#21 |
Senior Member
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 109
Rep Power: 17 |
Hi, Kumar,
in fact, parasitic current are important in my case. I have found a way to reduce them. As this subject is so different to "contour plottings", I have open a new thread. Please, have a look in http://www.cfd-online.com/Forums/ope...tml#post234662 and give me your opinnion. Best regards Robert |
|
July 6, 2010, 05:01 |
|
#22 |
New Member
yannH
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Hi everyone,
Is there an other way to get surface elevation, I mean without using a personnal script ? My goal is to have the distance between my still water level and the interface when alpha1 is 0.5. thanks Yann |
|
July 6, 2010, 06:09 |
|
#23 |
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17 |
Hello yannH,
It is possible to extract the elevation of the liquid interface without using a personal script in paraview. But you still have to run the sample script, which comes with OpenFoam. You can extract the isosurface as at alpha 0.50 and then write the solution in vtk format. Then open paraview (not paraFoam) and load the .vtk file. The you can can use the slice option to get a section of your surface. Then use the (select points on) option from the edit menu. Then use the (extract selection) filter from the filters menu. Then open another window on the same screen by using split horizontal option, then use spread sheet view. This will give you the coordinates of the interFace based on the points you selected. This is an easy way of extraction of elevation of the interface. hope it helps |
|
July 7, 2010, 11:32 |
|
#24 |
New Member
yannH
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Hi Kumar,
Thanks for replying, I succeed with your explaination (I'm just looking after how to create a plot using the spreadsheet) Do you think it's possible, I mean not too hard, to implement a variable for surface elevation directly in my interDyMFoam code ? because it would be quite simple for postprocess my cases ! regards, Yann |
|
November 11, 2010, 00:50 |
urgent help needed...surface elevetion in wave tank
|
#25 |
New Member
krishna
Join Date: Sep 2010
Posts: 6
Rep Power: 16 |
i am doing a wave tank problem in fluent. i have generated waves..i got wave elevation v/s tank length plot at iso-vof=o.5.. but i have a problem in ploting wave elevation v/s time..please help me.. it is urgent,,,...thank you in advance
|
|
December 1, 2010, 08:52 |
|
#26 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 15 |
Hi all,
I as well used the suggested code from ozgur. But I have a Problem: The genHOF.c doesnt finish the line "scanf("%f",&swl);" (round about line 20). I placed an output in the line afterwards, which was never reached. The file height.dat is build, but empty and times contains all my timesteps. Does anyone has an idea what might be wrong? -> My fault.. I just have to enter it.. maybe sth was wrong in my input before... Thanks in advance! Last edited by lindstroem; December 2, 2010 at 05:36. |
|
December 10, 2010, 05:29 |
|
#27 |
Member
|
Hi Krishna,
I think you can use sampleDict to extract isosurface plane at each time step in post-processing. Or more simple, just load data to paraview and plot the isosurface alpha = 0.5 in time. Regards, Duong |
|
January 1, 2011, 13:03 |
Doubt about the integration method
|
#28 | |
Member
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 15 |
Hi ozgur,
I'm actually not so comfortable with the integration method. We can find it OK in theoretic work, but there are many grids in which the gamma are between 0 and 1. moreover, when there are some special situations such as overturning, then the integration method should be invalid. In fact, if we have enough nPoints in the sampling, I believe, the criteria gamma[n]>0.5, gamma[n+1]<0.5 may be a better choice. Any opinions are welcome. Thank you! Zhen Cheng Quote:
|
||
August 7, 2011, 13:08 |
segmentation fault
|
#29 |
New Member
Eliz Nurieva
Join Date: Jul 2011
Location: Maynooth
Posts: 2
Rep Power: 0 |
Hi everybody,
I also try to plot surface elevation vs time and I copied Ozgur's C code, compiled and execute but it gives segmentation fault for some reason. Do you have any idea why it might happen?? Thanks in advance Regards, Eliz |
|
August 7, 2011, 17:36 |
check the code for openfile name?
|
#30 |
Member
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 15 |
please check the file name that you need to read and also the size of the dimensions in the code ( defaultly 15000, I think , but not sure, this number should be larger than the size of the file that you need to read) cheers!
Zhen |
|
August 8, 2011, 08:29 |
|
#31 |
New Member
Eliz Nurieva
Join Date: Jul 2011
Location: Maynooth
Posts: 2
Rep Power: 0 |
Thanks for your reply Zhen, The dimensions are 1500 and the name of the file looks fine.
I run it by using "gdb" with the help of this link, to see what the error is, http://www.unknownroad.com/rtfm/gdbtut/gdbsegfault.html and it said "Source file name is more recent than executable" . Do you have any idea why it says so??any suggestions??Thanks a lot!! Regards, Eliz |
|
August 8, 2011, 09:03 |
make sure the file is ok
|
#32 | |
Member
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 15 |
Hi,
what format is the data file? try to use vim to open the file and see if the first few lines are data or description words. and make sure that the executive file (e.g> a.out) is in the right folder, :-) Zhen Quote:
|
||
December 21, 2012, 01:52 |
sample with solidBodyMotionFvMesh
|
#33 |
New Member
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 14 |
Hi FOAMers!
I have another question related to this topic. I'm also using the sample-utility to write the values for alpha1 (gamma) along a line into files for each time step. This can be read easily by octave. I figured out that sample takes the data along a line in the fixed coordinate system. In my case (sloshing in a tank) I would like to sample the data along a line in the relative coordinate system of the tank which is moved by solidBodyMotionFvMesh. Does anyone know how to do that? Thanks a lot! Last edited by Jane L; January 8, 2013 at 07:22. |
|
May 1, 2013, 09:18 |
|
#34 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
hello,jane, I have the same problem with you ,I also need to make the plot of the liquid level with time, and I want to make the relative coordiate system moving with the model. Have you solved the problem?
Last edited by luchen2408; May 1, 2013 at 10:15. |
|
May 6, 2013, 02:05 |
|
#35 |
New Member
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 14 |
Hi luchen2408!
I hope my reply still helps a few days later. Go to the folder for the sample utility (OpenFOAM-2.1.1/applications/utilities/postProcessing/sampling/sample), make your own copy of that folder (for example relatveSample) and outcomment following lines in the *.C file: // Handle geometry/topology changes // polyMesh::readUpdateState state = mesh.readUpdate(); // sSets.readUpdate(state); // sSurfs.readUpdate(state); Make all necessary changes in the other files in that folder and compile with wmake. If everything worked fine, you can run your of relatveSample right after the calculation like the normal sample utility. You may have a look in the attached example which I called dynamicSample for some reasons kind regards |
|
May 9, 2013, 10:26 |
|
#36 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
hello,jane, I copy your attached file into my case, I look through the file, but I can't catch them very much. I input " wmake", but failed, I got following result,
Making dependency list for source file dynamicSample.C SOURCE=dynamicSample.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/meshTools/lnInclude -I/opt/openfoam171/src/sampling/lnInclude -I/opt/openfoam171/src/surfMesh/lnInclude -I/opt/openfoam171/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/dynamicSample.o dynamicSample.C: In function ‘int main(int, char**)’: dynamicSample.C:100:5: error: ‘addOption’ is not a member of ‘Foam::argList’ dynamicSample.C:112:26: error: ‘class Foam::argList’ has no member named ‘optionLookupOrDefault’ dynamicSample.C:112:52: error: expected primary-expression before ‘>’ token dynamicSample.C:112:62: warning: left operand of comma operator has no effect [-Wunused-value] dynamicSample.C:119:9: error: ‘MUST_READ_IF_MODIFIED’ is not a member of ‘Foam::IOobject’ dynamicSample.C:128:9: error: ‘MUST_READ_IF_MODIFIED’ is not a member of ‘Foam::IOobject’ make: *** [Make/linux64GccDPOpt/dynamicSample.o] Error 1 luch@ctcnwk843-ubuntu:~/Desktop/test/testheight/00/system/dynamicSample$ can you explain it more about it and how can I get the final result? Thanks very much |
|
May 21, 2013, 10:45 |
|
#37 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
hello ,Dear Jane, I have tried the method you referred, I can wmake and generate a file--dynamicsample, when I run the file, I also got an error as following.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM FATAL IO ERROR: cannot open file file: /home/luch/Desktop/test/testheight/00/system/newdynamicSample/system/controlDict at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 61. FOAM exiting luch@ctcnwk843-ubuntu:~/Desktop/test/testheight/00/system/newdynamicSample$ after I copy the controlDict into the folder and run the file, I also got error: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM FATAL ERROR: No times selected From function dynamicsample in file db/Time/timeSelector.C at line 240. FOAM exiting luch@ctcnwk843-ubuntu:~/Desktop/test/testheight/00/system/newdynamicSample$ can you give me more hint ?how can I make it ? thanks |
|
July 2, 2013, 01:32 |
|
#38 |
New Member
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 14 |
Hi luchen!
Did does the ordinary "sample" utilty which comes with OpenFOAM give results? This was described in the previous posts. Kind regards |
|
July 4, 2013, 09:20 |
|
#39 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
Dear Jane,I have tried "sample" utility, it can give a height with the original coordinate system, however, my simulation object is moving, I have to make a local coordinate system with my object and give the sample with the local coordinate system,but I don't konw how to make it. do you have any suggestion?
|
|
July 11, 2013, 06:41 |
|
#40 | |
New Member
Jane L
Join Date: May 2012
Posts: 23
Rep Power: 14 |
Hi Luchen,
so we're talking about the same problem I faced the same problem as you do and I found that the "sample" utility gives the coordinates in the global inertial coordinate system. Therefore it needs to updade the geometry changes (movement). I disabled this updating progress so in the sample routine the movement of the geometry is not known and it writes the coordinates in the local system. If the original sample works on vour machine you could try the following: Outcomment the lines Quote:
Which version of OF do you use by the way? kind regards |
||
Tags |
interfoam interdymfoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |