三维不对称溃坝数值

发表时间:2019-03-16 17:18

三维不对称溃坝数值模拟

1.案例介绍

本计算实例采用Massflow软件模拟一个三维溃坝的问题。计算模型及尺寸见下图1和2。底面地形高度设为0;x方向长度为1.5m, x坐标小于0.3m流体高度为0.6m,其它地方流体高度为0;基底模型采用曼宁模型,相应曼宁系数设为0.02。土压力系数设为常数1。

2.操作步骤

第一步新建一个文件夹,命名为case2,将程序执行文件Massflow.exe和dll_custom文件夹拷贝到该文件夹目录下。
第二步:进行计算前的一些设置准备。包括基本参数设置、模型导入以及分析步设置等。针对计算案例的初始流体高度和边界条件,用户可在dll_custom文件夹下自行修改相应的代码,通过Microsoft Visual Studio(VS)编译的动态链接库dll_custom.dll文件拷到当前工作文件夹目录下。通过用户自定义构建模型需要在create_surface_custom.f90进行的设置如下:
do i=1-mbc,nx+mbc
do j=1-mbc,ny+mbc
   if ( x(i,j) <= 0.3 ) then
       q(1,i,j)=0.6
       else
       q(1,i,j)=h_dry
    endif
  enddo
enddo
如果通过命令创建模型,则可在命令流文件中直接输入相关命令,忽略此步骤。通过用户自定义构建边界条件需要在create_bound_custom.f90进行的设置如下:
bound_type1(1-mbc,:) = 1
bound_type3(nx+mbc,:) =2
bound_type2(1:33,1-mbc) = 1
bound_type2(34:nx,1-mbc) = 2
bound_type4(1:33,ny+mbc) = 1
bound_type4(34:nx,ny+mbc) = 2
bound_type1(31,1-mbc:70)=1
bound_type1(31,81:ny+mbc)=1
bound_type1(33,1-mbc:71)=1
bound_type1(33,80:ny+mbc)=1
bound_type3(30,1-mbc:71) =1
bound_type3(30,80:ny+mbc) =1
bound_type3(32,1-mbc:70) =1
bound_type3(32,81:ny+mbc) =1
bound_type2(30:33,71) = 1
bound_type2(31:32,81) = 1
bound_type4(31:32,70) = 1
bound_type4(30:33,80) = 1
该案例地形高程信息均采用默认,即z=0。其他模型参数直接在命令流文件input.txt中输入。
第三步:所有参数设置完成后,双击执行文件Massflow.exe运行。

3.本计算实例的命令流文件—input.txt

命令流1: 通过dll_custom.dll 设置地形和流体高度
*type,1
*nregions,1
*q1_flag,all,1
*grav_inertia,0
*erosion,0
*density,0
*ndim,2
*mbc,0
*remesh,0
*parallel,0
*create,grid,input,all,150,150,0,0,0.01,0.01
*create,topo,custom,all
*create,h,custom,all
*create,bound,custom,1
*material,1,density,1000
*material,1,friction,2,0.02
*material_assign,1,0,1
*time,1,15,0.01,0.25
*output,1,tecplot,1,all,1,0.5
命令流2: 通过命令设置地形和流体高度
*type,1
*nregions,1
*q1_flag,all,1
*grav_inertia,0
*erosion,0
*density,0
*ndim,2
*mbc,0
*remesh,0
*parallel,0
*create,grid,input,all,150,150,0,0,0.01,0.01
*k,1,0,0,0.6
*k,2,0.3,0,0.6
*k,3,0.3,1.5,0.6
*k,4,0,1.5,0.6
*rect,1,1,2,3,4,1,surface
*create,topo,custom,all
*create,surface,gui,1
*create,bound,custom,all
*material,1,density,1000
*material,1,friction,2,0.02
*material_assign,1,0,1
*time,1,15,0.01,0.25
*output,1,tecplot,1,all,1,0.5


分享到:
QQ交流群
微信公众号