mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: hopper: parameterise blockMeshDict content (#2134)
This commit is contained in:
committed by
Andrew Heather
parent
f482f74277
commit
c64c312bae
@ -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
|
vertices
|
||||||
(
|
(
|
||||||
(0 77.9423 6.2)
|
(0 $htilted $depth)
|
||||||
(135 0 6.2)
|
($minX 0 $depth)
|
||||||
(0 -77.9423 6.2)
|
(0 -$htilted $depth)
|
||||||
(300 -77.9423 6.2)
|
($width -$htilted $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 -$htilted 0)
|
||||||
(300 -77.9423 0)
|
($width -$htilted 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 +57,6 @@ blocks
|
|||||||
|
|
||||||
boundary
|
boundary
|
||||||
(
|
(
|
||||||
|
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
type wall;
|
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
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user