使用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; }
请老师们给予指点,巨谢!
-
@DY大世界
hi, amigo,
只想和你一起探讨:
你这方法要请教下这的各位老师。。。
只我个人观点,好像你的case里应该没有“surfaces”,只有2 fluids间的 “interface”waves2foam里好像有你需要的
说的不对您原谅
-
@leilei 嗯嗯,好的,谢谢您的回复。这个问题还在努力解决中,我用的是1906版本,里面没有wave2foam工具包,准备把这个问题解决以后再用wave2foam去造波,wave2foam还是很成熟、很方便很、专业的。
-
@DY大世界
hi,读过waves2foam手册,它有wave gauge,probes提取surface
但1906里,两fluids间的interface是个过渡。。。那此时:
1.1906里runtime提取液面的code怎么写
2.在定义液面时,是否人为设个alpha值(不然不是一条线,而是一个”带“)其实您的问题,我也感兴趣,但一直没老师回
还有,您把1906的结果导入paraview,试试用glyph作个U的矢量场。。。应该不行吧?:)
-
在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
中的波高计数据不一样。 -
@yuno 好的,感谢回复指导!
-
可以分享一个OpenFOAM-v1906的虚拟机吗?