diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/blockMeshDict b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/blockMeshDict index ce702251fa1f2f6d23c75d5be1a8142784d26c49..490b077fb1fc0c2eb25140df367c94cb90d2d17e 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/blockMeshDict +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/blockMeshDict @@ -14,26 +14,39 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -scale 0.001; +scale 0.001; + +depth 6.2; // depth in the empty direction +width 300; // width of the wide part of the hopper +gap 30; // width of the gap +totalHeight 500; // height of the hopper including the angled part +bottomAngle 30; // angle of the bottom with respect to the ground + +minX #eval{ 0.5*$width - 0.5*$gap }; +maxX #eval{ 0.5*$width + 0.5*$gap }; + +// height of the angled part based on the bottom angle +htilted #eval{ $minX*tan(degToRad($bottomAngle)) }; +htiltedM #eval{ -$htilted }; vertices ( - (0 77.9423 6.2) - (135 0 6.2) - (0 -77.9423 6.2) - (300 -77.9423 6.2) - (165 0 6.2) - (300 77.9423 6.2) - (300 500 6.2) - (0 500 6.2) - (0 77.9423 0) - (135 0 0) - (0 -77.9423 0) - (300 -77.9423 0) - (165 0 0) - (300 77.9423 0) - (300 500 0) - (0 500 0) + (0 $htilted $depth) + ($minX 0 $depth) + (0 $htiltedM $depth) + ($width $htiltedM $depth) + ($maxX 0 $depth) + ($width $htilted $depth) + ($width $totalHeight $depth) + (0 $totalHeight $depth) + (0 $htilted 0) + ($minX 0 0) + (0 $htiltedM 0) + ($width $htiltedM 0) + ($maxX 0 0) + ($width $htilted 0) + ($width $totalHeight 0) + (0 $totalHeight 0) ); blocks @@ -45,7 +58,6 @@ blocks boundary ( - walls { type wall; diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/system/blockMeshDict b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/system/blockMeshDict index d6f8dfaef178c376c48926fc2a90fd444797c100..bcc0e83ff9227118c30df2fb0844ef0f319ddda1 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/system/blockMeshDict +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/system/blockMeshDict @@ -14,22 +14,34 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -scale 0.001; +scale 0.001; + +depth 6.2; // depth in the empty direction +width 300; // width of the wide part of the hopper +gap 30; // width of the gap +totalHeight 500; // height of the hopper including the angled part +bottomAngle 30; // angle of the bottom with respect to the ground + +minX #eval{ 0.5*$width - 0.5*$gap }; +maxX #eval{ 0.5*$width + 0.5*$gap }; + +// height of the angled part based on the bottom angle +htilted #eval{ $minX*tan(degToRad($bottomAngle)) }; vertices ( - (0 77.9423 6.2) - (135 0 6.2) - (165 0 6.2) - (300 77.9423 6.2) - (300 500 6.2) - (0 500 6.2) - (0 77.9423 0) - (135 0 0) - (165 0 0) - (300 77.9423 0) - (300 500 0) - (0 500 0) + (0 $htilted $depth) + ($minX 0 $depth) + ($maxX 0 $depth) + ($width $htilted $depth) + ($width $totalHeight $depth) + (0 $totalHeight $depth) + (0 $htilted 0) + ($minX 0 0) + ($maxX 0 0) + ($width $htilted 0) + ($width $totalHeight 0) + (0 $totalHeight 0) ); blocks