Skip to content
Snippets Groups Projects
Commit 346890c5 authored by Bas Nieuwboer's avatar Bas Nieuwboer Committed by Kutalmış Berçin
Browse files

TUT: hopper: parameterise blockMeshDict content (#2134)

parent b81f1771
No related branches found
No related tags found
No related merge requests found
...@@ -14,26 +14,39 @@ FoamFile ...@@ -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 vertices
( (
(0 77.9423 6.2) (0 $htilted $depth)
(135 0 6.2) ($minX 0 $depth)
(0 -77.9423 6.2) (0 $htiltedM $depth)
(300 -77.9423 6.2) ($width $htiltedM $depth)
(165 0 6.2) ($maxX 0 $depth)
(300 77.9423 6.2) ($width $htilted $depth)
(300 500 6.2) ($width $totalHeight $depth)
(0 500 6.2) (0 $totalHeight $depth)
(0 77.9423 0) (0 $htilted 0)
(135 0 0) ($minX 0 0)
(0 -77.9423 0) (0 $htiltedM 0)
  • Maintainer

    With v2106 can write without the intermediate calculation:

        (0       $htilted    $depth)
        ($minX   0           $depth)
        (0      -$htilted    $depth)
  • will update - thanks Mark

  • Please register or sign in to reply
(300 -77.9423 0) ($width $htiltedM 0)
(165 0 0) ($maxX 0 0)
(300 77.9423 0) ($width $htilted 0)
(300 500 0) ($width $totalHeight 0)
(0 500 0) (0 $totalHeight 0)
); );
blocks blocks
...@@ -45,7 +58,6 @@ blocks ...@@ -45,7 +58,6 @@ blocks
boundary boundary
( (
walls walls
{ {
type wall; type wall;
......
...@@ -14,22 +14,34 @@ FoamFile ...@@ -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 vertices
( (
(0 77.9423 6.2) (0 $htilted $depth)
(135 0 6.2) ($minX 0 $depth)
(165 0 6.2) ($maxX 0 $depth)
(300 77.9423 6.2) ($width $htilted $depth)
(300 500 6.2) ($width $totalHeight $depth)
(0 500 6.2) (0 $totalHeight $depth)
(0 77.9423 0) (0 $htilted 0)
(135 0 0) ($minX 0 0)
(165 0 0) ($maxX 0 0)
(300 77.9423 0) ($width $htilted 0)
(300 500 0) ($width $totalHeight 0)
(0 500 0) (0 $totalHeight 0)
); );
blocks blocks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment