Previous topic

Geometry

Next topic

Meshes

This Page

Geometry

class pybamm.Geometry(*geometries, custom_geometry={})[source]

A geometry class to store the details features of the cell geometry.

Geometry extends the class dictionary and uses the key words: “negative electrode”, “positive electrode”, etc to indicate the subdomain. Within each subdomain, there are “primary”, “secondary” or “tabs” dimensions. “primary” dimensions correspond to dimensions on which spatial operators will be applied (e.g. the gradient and divergence). In contrast, spatial operators do not act along “secondary” dimensions. This allows for multiple independent particles to be included into a model.

The values assigned to each domain are dictionaries containing the spatial variables in that domain, along with expression trees giving their min and maximum extents. For example, the following dictionary structure would represent a Geometry with a single domain “negative electrode”, defined using the variable x_n which has a range from 0 to the pre-defined parameter l_n.

{
    "negative electrode": {
        "primary": {x_n: {"min": pybamm.Scalar(0), "max": l_n}}
    }
}

A user can create a new Geometry by combining one or more of the pre-defined geometries defined with the names given below.

  • “1D macro”: macroscopic 1D cell geometry (i.e. electrodes)
  • “3D macro”: macroscopic 3D cell geometry
  • “1+1D macro”: 1D macroscopic cell geometry with a 1D current collector
  • “1+2D macro”: 1D macroscopic cell geometry with a 2D current collector
  • “1D micro”: 1D microscopic cell geometry (i.e. particles)
  • “1+1D micro”: This is the geometry used in the standard DFN or P2D model
  • “(1+0)+1D micro”: 0D macroscopic cell geometry with 1D current collector,
    along with the microscopic 1D particle geometry.
  • “(2+0)+1D micro”: 0D macroscopic cell geometry with 1D current collector,
    along with the microscopic 1D particle geometry.
  • “(1+1)+1D micro”: 1D macroscopic cell geometry, with 1D current collector model,
    along with the microscopic 1D particle geometry.
  • “(2+1)+1D micro”: 1D macroscopic cell geometry, with 2D current collector model,
    along with the microscopic 1D particle geometry.
  • “2D current collector”: macroscopic 2D current collector geometry

Extends: dict

Parameters:
  • geometries (one or more strings or Geometry objects. A string will be assumed to be) – one of the predefined Geometries given above
  • custom_geometry (dict containing any extra user defined geometry) –
add_domain(name, geometry)[source]

Add a new domain to the geometry

Parameters:
  • name (string giving the name of the domain) –
  • geometry (dict of variables in the domain, along with the minimum and maximum) – extents (e.g. {“primary”: {x_n: {“min”: pybamm.Scalar(0), “max”: l_n}}}
class pybamm.Geometry1DMacro(custom_geometry={})[source]

A geometry class to store the details features of the macroscopic 1D cell geometry.

Extends: Geometry

Parameters:custom_geometry (dict containing any extra user defined geometry) –
class pybamm.Geometry3DMacro(custom_geometry={})[source]

A geometry class to store the details features of the macroscopic 3D cell geometry.

Extends: Geometry1DMacro

Parameters:custom_geometry (dict containing any extra user defined geometry) –
class pybamm.Geometry1DMicro(custom_geometry={})[source]

A geometry class to store the details features of the microscopic 1D particle geometry.

Extends: Geometry

Parameters:custom_geometry (dict containing any extra user defined geometry) –
class pybamm.Geometry1p1DMicro(custom_geometry={})[source]

A geometry class to store the details features of the 1+1D cell geometry. This is the geometry used in the standard DFN or P2D model.

Extends: Geometry

Parameters:custom_geometry (dict containing any extra user defined geometry) –
class pybamm.Geometryxp1DMacro(cc_dimension=1, custom_geometry={})[source]

A geometry class to store the details features of x+1D macroscopic cell geometry, where x is the dimension of the current collector model.

Extends: Geometry1DMacro

Parameters:
  • cc_dimension (int, optional) – the dimension of the current collector model
  • custom_geometry (dict, optional) – dictionary containing any extra user defined geometry
class pybamm.Geometryxp0p1DMicro(cc_dimension=1, custom_geometry={})[source]

A geometry class to store the details features of x+0D macroscopic cell geometry, where x is the dimension of the current collector model, along with the microscopic 1D particle geometry.

Extends: Geometry1DMicro

Parameters:
  • cc_dimension (int, optional) – the dimension of the current collector model
  • custom_geometry (dict, optional) – dictionary containing any extra user defined geometry
class pybamm.Geometryxp1p1DMicro(cc_dimension=1, custom_geometry={})[source]

A geometry class to store the details features of x+1D macroscopic cell geometry, where x is the dimension of the current collector model, along with the microscopic 1D particle geometry.

Extends: Geometry1DMicro

Parameters:
  • cc_dimension (int, optional) – the dimension of the current collector model
  • custom_geometry (dict, optional) – dictionary containing any extra user defined geometry
class pybamm.Geometry2DCurrentCollector(custom_geometry={})[source]

A geometry class to store the details features of the macroscopic 2D current collector geometry.

Extends: Geometry

Parameters:custom_geometry (dict containing any extra user defined geometry) –