Skip to content
Snippets Groups Projects
Commit c64c312b authored by Bas Nieuwboer's avatar Bas Nieuwboer Committed by Andrew Heather
Browse files

TUT: hopper: parameterise blockMeshDict content (#2134)

parent f482f742
Branches
Tags
1 merge request!482BUG: DMD: write snapshot0 at start times
......@@ -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;
......
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment