How to do Moving Pressure Gauges ?

Hello!

Suppose I have a case, where I am moving a square through water, like the MovingSquare example. I want to be able to extract the pressure value at one point, a distance s, away from all surfaces, see sketch:

Where the red arrow shows the movement direction and how the measurement points for pressure in grey circles have to follow along with the MovingSquare.

I have been able to extract the moving points using BoundaryVTK's -saveposmotion:<mk>:x:y:z <file>, but I am not sure how to feed this motion into MeasureTool, so that I can extract physical values from these points.

Any examples you can refer me to?

Kind regards

Comments

  • MeasureTool includes an option to read moving points.

    Please check example of SloshingTank in examples/main since there we have tried this.

    Regards

  • I knew I had seen it somewhere before, thanks for showing it to me again! For anyone curious the basic idea is here (copied directly from the xml):

    REM Measures pressure value at point close to the boundary and 1.5h away.
    set dirout2=%dirout%\measuretool
    REM Executes BoundaryVTK4 to create a CSV file with positions where pressure is measured using MeasureTool4.
    %boundaryvtk% -motiondata %diroutdata% -saveposmotion:10:-0.4461:0:0.093 %dirout2%/PosCorrect -saveposmotion:10:-0.45:0:0.093 %dirout2%/PosIncorrect
    if not "%ERRORLEVEL%" == "0" goto fail
    REM Executes MeasureTool4 to create a CSV file with pressure information at point close to the boundary and 1.5h away.
    %measuretool% -dirin %diroutdata% -pointspos %dirout2%/PosCorrect_mk0010.csv   -onlytype:-all,+fluid -vars:-all,+press,+kcorr -kcusedummy:0 -kclimit:0.5 -savevtk %dirout2%/PointsPressure_Correct   -savecsv %dirout2%/_PointsPressure_Correct
    if not "%ERRORLEVEL%" == "0" goto fail
    %measuretool% -dirin %diroutdata% -pointspos %dirout2%/PosIncorrect_mk0010.csv -onlytype:-all,+fluid -vars:-all,+press,+kcorr -kcusedummy:0 -kclimit:0.5 -savevtk %dirout2%/PointsPressure_Incorrect -savecsv %dirout2%/_PointsPressure_Incorrect
    if not "%ERRORLEVEL%" == "0" goto fail
    

    Where first boundary vtk is used to extract the motion of the point and then measuretool uses that data as Alex described to extract values. For anyone curious the reason it says "PosCorrect" and "PosIncorrect" is due to using DBC you need to measure roughly 1.5h away from boundary etc.


    As a follow up question Alex, suppose instead of one point, I have a grid of points: do I need to use %boundaryvtk% for each point or is there a way to specifiy a grid / multiple points to -saveposmotion or one of the other options and then afterwards use this moving grid of points in measure tool? Sorry if the question is a bit basic, I just couldn't figure it out.

    Kind regards

  • Ummm I see your point....

    Let us ask @jmdalonso

  • Awesome, to give some examples where this is relevant imagine modelling a ship and wanting to know pressure values at different normal offsets from the original surface. Also when using mDBC we cannot use the particles inside the geometry anymore, we have to offset it, since measuretool does not do that right now etc.

    Kind regards, looking forwards to the response

Sign In or Register to comment.