使用OpenFoam1906,软件自带的造波工具包造波,如何提取波面曲线(surfaceElevation)
-
我是使用OpenFOAM1906版本,使用自带的造波工具包“tutorials-multiphase-interfoam-laminar-waves”造波,造出来的波如何提取波浪自由面的波高曲线呢?如下图所示:
使用了如下的代码,但不知为啥就不对functions { freeSurface { type surfaces; functionObjectLibs ( "libsampling.so" ); // writeControl timeStep; // writeInterval 10; // outputControl outputTime; // outputInterval 1; writeControl writeTime; surfaceFormat vtk; fields ( alpha.water ); surfaces ( freeSurface { type isoSurfaceCell; isoField alpha.water; isoValue 0.5; interpolate false; regularise false; } ); interpolationScheme cell; }
请老师们给予指点,巨谢!
-
在1912自带的造波算例里的
controlDict
中有如下代码。是用来提取自由液面的。functions { line { type sets; libs (sampling); enabled true; writeControl writeTime; writeInterval 1; interpolationScheme cellPoint; setFormat raw; sets ( line1 { type uniform; axis distance; start ( 1.0 0.02 0.0 ); end ( 1.0 0.02 0.55 ); nPoints 1001; } line2 { type uniform; axis distance; start ( 2.0 0.02 0.0 ); end ( 2.0 0.02 0.55 ); nPoints 1001; } line3 { type uniform; axis distance; start ( 3.0 0.02 0.0 ); end ( 3.0 0.02 0.55 ); nPoints 1001; } line4 { type uniform; axis distance; start ( 5.0 0.02 0.0 ); end ( 5.0 0.02 0.55 ); nPoints 1001; ); fixedLocations false; fields ( U alpha.water ); } }
但是提取出来的值是按照时间步给出
line
上所有点的alpha
值。跟waves2Foam
中的波高计数据不一样。