|
[Sponsors] |
function to record water level of the whole domain |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 20, 2016, 20:17 |
function to record water level of the whole domain
|
#1 |
Member
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11 |
Hi there.
I did some multiphase problem with OpenFOAM and I used probe sampling to extract alpha.water at certain location to find out the water level changes over the simulation time. Meanwhile, I am wondering if there is any function available in OpenFOAM to extract the whole domain's water level at any specific time step, for example at t =10s. I went through the user manual without much luck, anyone has any suggestion? Cheers Zhifang |
|
September 21, 2016, 05:28 |
|
#2 |
Senior Member
|
Hi,
I think generating an isosurface of alpha=0.5 might work for you. You can than make a vtk surface that you could plot in paraview. I guess the following would work for version 3.0, maybe also 4.0, but syntax may have changed. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ surfaces { type surfaces; functionObjectLibs ("libsampling.so"); outputControl outputTime; surfaceFormat vtk; fields (p U k epsilon); interpolationScheme cellPoint; surfaces ( isoAlpha { type isoSurface; isoField alpha.water; isoValue 0.5; interpolate true; } ); } // ************************************************************************* // Code:
grep -r isoSurface $FOAM_TUTORIALS Tom |
|
September 22, 2016, 00:04 |
|
#3 | |
Member
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11 |
Quote:
Thanks for your reply, but I dont quite get what you meaning but using a isosurface of alpha.water=0.5. From my point of view, water surface level is obtained by summing up all the product of alpha.water value and the relevant cells size, the usual VOF way. Hence, the results be bias, if i just put a single threshold for it, as the water level change will no be well presented. Dont you mind explaining this a bit further. Thanks in advance. |
||
September 22, 2016, 04:29 |
|
#4 |
Senior Member
|
I think that if your cell sizes are small enough there would not be much difference in between both methods. I guess your method would be more accurate, but it would require some coding. Maybe you can compare my method with your probing to see if there is a big difference. I am not sure how your method should be implemented, so I can not help you with that.
Regards, Tom |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 14:06 |
LTSInterFoam ship flow: Water level rise at start of domain | JanZ | OpenFOAM Running, Solving & CFD | 0 | January 21, 2014 05:22 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 07:27 |
uptodate water distribution network | fredius,magige,tanzanian,(e.a) | Main CFD Forum | 0 | January 27, 2002 08:10 |