diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/blockMeshDict b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/blockMeshDict index d4807868420edbe2d753d30a9b86a7be75b9f7ee..e375b78ef3abd77a71b7c91d428ddf494a1c5919 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/blockMeshDict +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/blockMeshDict @@ -14,26 +14,38 @@ 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) - (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 -$htilted $depth) + ($width -$htilted $depth) + ($maxX 0 $depth) + ($width $htilted $depth) + ($width $totalHeight $depth) + (0 $totalHeight $depth) + (0 $htilted 0) + ($minX 0 0) + (0 -$htilted 0) + ($width -$htilted 0) + ($maxX 0 0) + ($width $htilted 0) + ($width $totalHeight 0) + (0 $totalHeight 0) ); blocks @@ -45,7 +57,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 bd70069f9123a49578150a88f200a1076a2d1c02..4e1ee000d95e4b57f31568a5da09ff37f5cd347f 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