Loading docs/source_docs/eb/EBWalls.rst +59 −76 Original line number Diff line number Diff line Loading @@ -11,61 +11,11 @@ Constructing Embedded Boundaries in MFIX-Exa ============================================ MFIX-Exa uses AMReX's constructive solid geometry framework defined in the namespace :cpp:`amrex::EB2`. See the `AMReX EB documentation`_ for more details. These are defined in ``src/eb/mfix_eb.cpp``. The function :cpp:`mfix::make_eb_geometry` (also defined in ``src/eb/mfix_eb.cpp``) selects one of the following geometries depending on the value of the :cpp:`mfix.geometry` setting in the ``inputs`` file. MFIX-Exa allows 3 approaches to specify embedded boundaries (EBs). +------------------------------+----------------------+-------------------------+ | Description | ``mfix.geometry`` | Implementation Satus | +==============================+======================+=========================+ | Planar walls from mfix.dat | Don't specify | Fully implemented | | (on by default) | | | +------------------------------+----------------------+-------------------------+ | Box (up to six walls) | ``box`` | Fully implemented | +------------------------------+----------------------+-------------------------+ | Cylinder | ``cylinder`` | Fully implemented | +------------------------------+----------------------+-------------------------+ | Hopper | ``hopper`` | Fully implemented | +------------------------------+----------------------+-------------------------+ | Cyclone | ``cyclone`` | Fully implemented | +------------------------------+----------------------+-------------------------+ | General | ``general`` | Partially implemented | | | cf. note 1 below | | +------------------------------+----------------------+-------------------------+ | Hourglass | ``hourglass`` | Deprecated | | | cf. note 1 | cf. note 2 below | +------------------------------+----------------------+-------------------------+ | CLR (chemical looping | ``clr`` | Deprecated | | reactor) | cf. note 1 | cf. note 2 | +------------------------------+----------------------+-------------------------+ | CLR Riser | ``clr_riser`` | Deprecated | | | cf. note 1 | cf. note 2 | +------------------------------+----------------------+-------------------------+ 1. Older (legacy) alternative settings are: +-----------------------------+-------------------------------+ | Value of ``mfix.geometry`` | Alternative | +=============================+===============================+ | ``general`` | ``mfix.use_poly2 = true`` | | | or ``mfix.use_walls = true`` | +-----------------------------+-------------------------------+ | ``hourglass`` | ``mfix.hourglass = true`` | +-----------------------------+-------------------------------+ | ``clr`` | ``mfix.clr = true`` | +-----------------------------+-------------------------------+ | ``clr_riser`` | ``mfix.clr_riser = true`` | +-----------------------------+-------------------------------+ 2. These geometries are not ported from AMReX's old :cpp:`EB` system to the new :cpp:`EB2`. Also note that planar boundary conditions can be specified in the ``mfix.dat`` file. Even if the user does not specify an ``mfix.geometry`` in the ``inputs``, any no-slip or free-slip boundary conditions are expressed as EB walls. 1. Using native AMReX cpp functions. 2. Using CSG file format. 3. Using planar walls. There are also two parameters (specified in the ``inputs`` file) that influence the level-set creation: Loading @@ -84,37 +34,69 @@ the level-set creation: | | refinement of the level-set | +-------------------------------+------------------------------------------------+ EB Specification ----------------- How MFIX-Exa Constructs the EB Geometry --------------------------------------- Native AMReX functions *********************** Once a geometry is selected by :cpp:`mfix::make_eb_geometry`, the procedure is the same for (almost) all geometries. Also see the `AMReX geometry documentation`_ for information on how to construct new geometries: MFIX-Exa uses AMReX's constructive solid geometry framework defined in the namespace :cpp:`amrex::EB2`. See the `AMReX EB documentation`_ for more details. These are defined in ``src/eb/mfix_eb.cpp``. The function :cpp:`mfix::make_eb_geometry` (also defined in ``src/eb/mfix_eb.cpp``) selects one of the following geometries depending on the value of the :cpp:`mfix.geometry` setting in the ``inputs`` file. 1. Construct an implicit function representing the geometry (using the language of constructive solid geometry). For example +------------------------------+----------------------+ | Description | ``mfix.geometry`` | +==============================+======================+ | Box (up to six walls) | ``box`` | +------------------------------+----------------------+ | Cylinder | ``cylinder`` | +------------------------------+----------------------+ | Hopper | ``hopper`` | +------------------------------+----------------------+ | General | ``generic`` | | | cf. note 1 below | +------------------------------+----------------------+ 1. ``Generic`` geometry specification requires user implemenation inside ``src/eb.mfix_eb_generic.cpp``. Also see the `AMReX geometry documentation`_ for information on how to construct new geometries using the method of constructive solid geometry. CSG File Format *************** Alternatively, the constructive solid geometry can be created using OpenSCAD's CSG file format by installing the ``csg-eb`` library. To use this option, MFIX-Exa must be built with the flag ``MFIX_CSG=TRUE`` and the option ``mfix.geometry_filename`` must be set in the ``inputs``. See the `CSG-EB repository`_ for more details about this format. Planar Walls ************ Planar boundary conditions can be specified in the ``inputs`` file. Even if the user does not specify an ``mfix.geometry`` or ``mfix.geometry_filename`` in the ``inputs``, any no-slip or free-slip boundary conditions are expressed as EB walls. .. highlight:: c++ :: How MFIX-Exa Constructs the EB Geometry --------------------------------------- EB2::CylinderIF my_cyl(radius, height, direction, center, inside); auto gshop_cyl = EB2::makeShop(my_cyl); Once a geometry is specified in the ``inputs`` file, the procedure is the same for all geometries. 2. (Optional) Construct the implicit function representing the EB seen by the particles. This might deviate from the "standard" EB depending on the specific application. In all standard cases used by mfix, this step is omitted. 1. Construct an implicit function representing the geometry. 3. Call :cpp:`mfix::build_eb_levels(gshop)` this function builds the EB levels and fills the implicit function :cpp:`MultiFab` (the later being used to construct the level-set function). Note that this also makes the particle EB levels point to the fluid eb levels. 2. Call :cpp:`mfix::build_eb_levels(gshop)` this function builds the EB levels. Note that this also makes the particle EB levels point to the fluid eb levels. 4. (Optional, do this if you did 2.) Call :cpp:`mfix::build_particle_eb_levels(gshop_part)` **last**. This will update the particle EB levels. 3. Call ``mfix.fill_eb_levelsets``. This function fills the level-set ``MultiFab``. MFIX-Exa's EB Data Structures Loading Loading @@ -306,3 +288,4 @@ There are two special cases involving level-sets: .. _AMReX EB documentation: https://amrex-codes.github.io/amrex/docs_html/EB_Chapter.html .. _AMReX Level-Set documentation: https://amrex-codes.github.io/amrex/docs_html/EB.html#level-sets .. _AMReX geometry documentation: https://amrex-codes.github.io/amrex/docs_html/EB.html#initializing-the-geometric-database .. _CSG-EB repository: https://mfix.netl.doe.gov/gitlab/exa/csg-eb Loading
docs/source_docs/eb/EBWalls.rst +59 −76 Original line number Diff line number Diff line Loading @@ -11,61 +11,11 @@ Constructing Embedded Boundaries in MFIX-Exa ============================================ MFIX-Exa uses AMReX's constructive solid geometry framework defined in the namespace :cpp:`amrex::EB2`. See the `AMReX EB documentation`_ for more details. These are defined in ``src/eb/mfix_eb.cpp``. The function :cpp:`mfix::make_eb_geometry` (also defined in ``src/eb/mfix_eb.cpp``) selects one of the following geometries depending on the value of the :cpp:`mfix.geometry` setting in the ``inputs`` file. MFIX-Exa allows 3 approaches to specify embedded boundaries (EBs). +------------------------------+----------------------+-------------------------+ | Description | ``mfix.geometry`` | Implementation Satus | +==============================+======================+=========================+ | Planar walls from mfix.dat | Don't specify | Fully implemented | | (on by default) | | | +------------------------------+----------------------+-------------------------+ | Box (up to six walls) | ``box`` | Fully implemented | +------------------------------+----------------------+-------------------------+ | Cylinder | ``cylinder`` | Fully implemented | +------------------------------+----------------------+-------------------------+ | Hopper | ``hopper`` | Fully implemented | +------------------------------+----------------------+-------------------------+ | Cyclone | ``cyclone`` | Fully implemented | +------------------------------+----------------------+-------------------------+ | General | ``general`` | Partially implemented | | | cf. note 1 below | | +------------------------------+----------------------+-------------------------+ | Hourglass | ``hourglass`` | Deprecated | | | cf. note 1 | cf. note 2 below | +------------------------------+----------------------+-------------------------+ | CLR (chemical looping | ``clr`` | Deprecated | | reactor) | cf. note 1 | cf. note 2 | +------------------------------+----------------------+-------------------------+ | CLR Riser | ``clr_riser`` | Deprecated | | | cf. note 1 | cf. note 2 | +------------------------------+----------------------+-------------------------+ 1. Older (legacy) alternative settings are: +-----------------------------+-------------------------------+ | Value of ``mfix.geometry`` | Alternative | +=============================+===============================+ | ``general`` | ``mfix.use_poly2 = true`` | | | or ``mfix.use_walls = true`` | +-----------------------------+-------------------------------+ | ``hourglass`` | ``mfix.hourglass = true`` | +-----------------------------+-------------------------------+ | ``clr`` | ``mfix.clr = true`` | +-----------------------------+-------------------------------+ | ``clr_riser`` | ``mfix.clr_riser = true`` | +-----------------------------+-------------------------------+ 2. These geometries are not ported from AMReX's old :cpp:`EB` system to the new :cpp:`EB2`. Also note that planar boundary conditions can be specified in the ``mfix.dat`` file. Even if the user does not specify an ``mfix.geometry`` in the ``inputs``, any no-slip or free-slip boundary conditions are expressed as EB walls. 1. Using native AMReX cpp functions. 2. Using CSG file format. 3. Using planar walls. There are also two parameters (specified in the ``inputs`` file) that influence the level-set creation: Loading @@ -84,37 +34,69 @@ the level-set creation: | | refinement of the level-set | +-------------------------------+------------------------------------------------+ EB Specification ----------------- How MFIX-Exa Constructs the EB Geometry --------------------------------------- Native AMReX functions *********************** Once a geometry is selected by :cpp:`mfix::make_eb_geometry`, the procedure is the same for (almost) all geometries. Also see the `AMReX geometry documentation`_ for information on how to construct new geometries: MFIX-Exa uses AMReX's constructive solid geometry framework defined in the namespace :cpp:`amrex::EB2`. See the `AMReX EB documentation`_ for more details. These are defined in ``src/eb/mfix_eb.cpp``. The function :cpp:`mfix::make_eb_geometry` (also defined in ``src/eb/mfix_eb.cpp``) selects one of the following geometries depending on the value of the :cpp:`mfix.geometry` setting in the ``inputs`` file. 1. Construct an implicit function representing the geometry (using the language of constructive solid geometry). For example +------------------------------+----------------------+ | Description | ``mfix.geometry`` | +==============================+======================+ | Box (up to six walls) | ``box`` | +------------------------------+----------------------+ | Cylinder | ``cylinder`` | +------------------------------+----------------------+ | Hopper | ``hopper`` | +------------------------------+----------------------+ | General | ``generic`` | | | cf. note 1 below | +------------------------------+----------------------+ 1. ``Generic`` geometry specification requires user implemenation inside ``src/eb.mfix_eb_generic.cpp``. Also see the `AMReX geometry documentation`_ for information on how to construct new geometries using the method of constructive solid geometry. CSG File Format *************** Alternatively, the constructive solid geometry can be created using OpenSCAD's CSG file format by installing the ``csg-eb`` library. To use this option, MFIX-Exa must be built with the flag ``MFIX_CSG=TRUE`` and the option ``mfix.geometry_filename`` must be set in the ``inputs``. See the `CSG-EB repository`_ for more details about this format. Planar Walls ************ Planar boundary conditions can be specified in the ``inputs`` file. Even if the user does not specify an ``mfix.geometry`` or ``mfix.geometry_filename`` in the ``inputs``, any no-slip or free-slip boundary conditions are expressed as EB walls. .. highlight:: c++ :: How MFIX-Exa Constructs the EB Geometry --------------------------------------- EB2::CylinderIF my_cyl(radius, height, direction, center, inside); auto gshop_cyl = EB2::makeShop(my_cyl); Once a geometry is specified in the ``inputs`` file, the procedure is the same for all geometries. 2. (Optional) Construct the implicit function representing the EB seen by the particles. This might deviate from the "standard" EB depending on the specific application. In all standard cases used by mfix, this step is omitted. 1. Construct an implicit function representing the geometry. 3. Call :cpp:`mfix::build_eb_levels(gshop)` this function builds the EB levels and fills the implicit function :cpp:`MultiFab` (the later being used to construct the level-set function). Note that this also makes the particle EB levels point to the fluid eb levels. 2. Call :cpp:`mfix::build_eb_levels(gshop)` this function builds the EB levels. Note that this also makes the particle EB levels point to the fluid eb levels. 4. (Optional, do this if you did 2.) Call :cpp:`mfix::build_particle_eb_levels(gshop_part)` **last**. This will update the particle EB levels. 3. Call ``mfix.fill_eb_levelsets``. This function fills the level-set ``MultiFab``. MFIX-Exa's EB Data Structures Loading Loading @@ -306,3 +288,4 @@ There are two special cases involving level-sets: .. _AMReX EB documentation: https://amrex-codes.github.io/amrex/docs_html/EB_Chapter.html .. _AMReX Level-Set documentation: https://amrex-codes.github.io/amrex/docs_html/EB.html#level-sets .. _AMReX geometry documentation: https://amrex-codes.github.io/amrex/docs_html/EB.html#initializing-the-geometric-database .. _CSG-EB repository: https://mfix.netl.doe.gov/gitlab/exa/csg-eb