question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Continuum Geometry class for direct numerical simulations

See original GitHub issue

For carrying out direct numerical simulations, it would be handy if we had a DNS geometry tailored for that purpose. It would simply be a bunch of cubic models (volume, area, etc.).

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jgostickcommented, Jun 8, 2020

I like this idea, a geometry class called Continuum which does all the stuff needed to create a ‘pore-less’ region. This could also be used to do porous continuum using different pore-scale models to get effective diffusivity of the region.

0reactions
ma-sadeghicommented, Jul 15, 2022
import openpnm as op
import openpnm.models as mods
import openpnm.models.geometry as gmods
from openpnm.geometry import GenericGeometry


class Continuum(GenericGeometry):
    r"""
    Continuum subclass of GenericGeometry.

    This subclass is meant to be used for regions that are treated as
    continuum rather than an actual pore network.

    Parameters
    ----------
    network : GenericNetwork
        The network with which this Geometry should be associated
    pores : array_like
        The pores in the domain where this Geometry applies
    throats : array_like
        The throats in the domain where this Geometry applies
    name : str
        The name of the object, which is also used as the label where this
        geometry is defined.

    """

    def __init__(self, **kwargs):
        super().__init__(**kwargs)

        spacing = op.topotools.get_spacing(self.network).mean()

        self.add_model(propname='pore.diameter',
                       model=mods.misc.constant,
                       value=spacing)

        self.add_model(propname='pore.volume',
                       model=mods.geometry.pore_volume.cube,
                       pore_diameter='pore.diameter')

        self.add_model(propname='throat.diameter',
                       model=mods.misc.from_neighbor_pores,
                       prop='pore.diameter', mode='mean')

        self.add_model(propname='throat.length',
                       model=mods.misc.constant,
                       value=1e-50)

        self.add_model(propname='throat.cross_sectional_area',
                       model=mods.geometry.throat_cross_sectional_area.cuboid,
                       throat_diameter='throat.diameter')

        self.add_model(propname='throat.volume',
                       model=mods.geometry.throat_volume.cuboid,
                       throat_diameter='throat.diameter',
                       throat_length='throat.length')

        self.add_model(propname='throat.diffusive_size_factors',
                       model=gmods.diffusive_size_factors.cubes_and_cuboids,
                       pore_diameter="pore.diameter",
                       throat_diameter="throat.diameter")

        self.add_model(propname='throat.hydraulic_size_factors',
                       model=gmods.hydraulic_size_factors.cubes_and_cuboids,
                       pore_diameter="pore.diameter",
                       throat_diameter="throat.diameter")
Read more comments on GitHub >

github_iconTop Results From Across the Web

Continuum approach to the numerical ... - UPCommons
Some new aspects of the continuum strong discontinuity approach (CSDA) to model material failure in geomaterials are addressed. A new global algorithm, ...
Read more >
Continuum approach to the numerical simulation ... - CiteSeerX
SUMMARY. Some new aspects of the continuum strong discontinuity approach (CSDA) to model material failure in geomaterials are addressed.
Read more >
(PDF) Direct numerical simulations of turbulent flow over a ...
The continuum approach is based on the volume-averaged Navier–Stokes (VANS) equations [ S. Whitaker, “The Forchheimer equation: a theoretical ...
Read more >
Phase‐resolving direct numerical simulations of particle ...
The article describes direct numerical simulations using an Euler–Lagrange approach with an immersed-boundary method to resolve the geometry ...
Read more >
Direct numerical simulations of turbulent flow over a permeable wall ...
A direct numerical simulation (DNS) has been performed of turbulent channel flow ... (b) geometry as considered in the DNS in which a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found