Repository: PlasmaPy/PlasmaPy
Pull request #193 (2017-12-16 09:47:46)

Plasma blob
Addresses #156 
Here is a prototype PlasmaBlob class implementing one way of handling regime assessment.
This is still a work in progress, but I'd like feedback on whether people think this is a good way of approaching this issue.

pep8speaks: Hello @lemmatum! Thanks for submitting the PR.

 - In the file [`plasmapy/classes/plasma.py`](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py), following are the PEP8 issues :

> [Line 117:23](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L117): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 118:5](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L118): [E301](https://duckduckgo.com/?q=pep8%20E301) expected 1 blank line, found 0
> [Line 120:5](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L120): [E301](https://duckduckgo.com/?q=pep8%20E301) expected 1 blank line, found 0
> [Line 122:5](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L122): [E301](https://duckduckgo.com/?q=pep8%20E301) expected 1 blank line, found 0
> [Line 124:5](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L124): [E301](https://duckduckgo.com/?q=pep8%20E301) expected 1 blank line, found 0
> [Line 126:5](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L126): [E301](https://duckduckgo.com/?q=pep8%20E301) expected 1 blank line, found 0
> [Line 134:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L134): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 159:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L159): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 166:5](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L166): [E301](https://duckduckgo.com/?q=pep8%20E301) expected 1 blank line, found 0
> [Line 179:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L179): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 179:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/classes/plasma.py#L179): [W391](https://duckduckgo.com/?q=pep8%20W391) blank line at end of file

 - In the file [`plasmapy/mathematics/mathematics.py`](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/mathematics/mathematics.py), following are the PEP8 issues :

> [Line 40:80](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/mathematics/mathematics.py#L40): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (82 > 79 characters)
> [Line 119:80](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/mathematics/mathematics.py#L119): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (87 > 79 characters)



 - In the file [`plasmapy/physics/dimensionless.py`](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/dimensionless.py), following are the PEP8 issues :

> [Line 13:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/dimensionless.py#L13): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 22:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/dimensionless.py#L22): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 22:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/dimensionless.py#L22): [W391](https://duckduckgo.com/?q=pep8%20W391) blank line at end of file

 - In the file [`plasmapy/physics/quantum.py`](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/quantum.py), following are the PEP8 issues :

> [Line 294:67](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/quantum.py#L294): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 325:68](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/quantum.py#L325): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 326:67](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/quantum.py#L326): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 408:5](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/quantum.py#L408): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 427:68](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/quantum.py#L427): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace



 - In the file [`plasmapy/physics/transport.py`](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py), following are the PEP8 issues :

> [Line 31:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L31): [E303](https://duckduckgo.com/?q=pep8%20E303) too many blank lines (4)
> [Line 68:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L68): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 171:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L171): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 172:71](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L172): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 233:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L233): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 250:39](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L250): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 253:1](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L253): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 334:71](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L334): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 352:21](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L352): [E127](https://duckduckgo.com/?q=pep8%20E127) continuation line over-indented for visual indent
> [Line 353:21](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L353): [E127](https://duckduckgo.com/?q=pep8%20E127) continuation line over-indented for visual indent
> [Line 688:45](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L688): [E225](https://duckduckgo.com/?q=pep8%20E225) missing whitespace around operator
> [Line 873:67](https://github.com/PlasmaPy/PlasmaPy/blob/241021f7ef1af322e02a3329425c5811c4f32aab/plasmapy/physics/transport.py#L873): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace


lemmatum: yikes! Looks like my transport commits got mixed with plasmaBlob commits... Not sure how that happened!
lemmatum: Anyway, feedback is welcome on the last commit, ignore the other transport related ones for now... I'll eventually fix that quagmire.
StanczakDominik: I could probably git magically fix that for you, especially if you would
accept having them squashed.

lemmatum: I think instead of forking off of master I forked off of the transport branch. Which is why I was able to import coupling parameter for use in plasmaBlob. 

Do you figure once transport is done and merged then plamaBlob can be rebased ? Or is there an easier solution?
StanczakDominik: Assuming changes in plasma blob were relatively independent from the transport ones, I'd do a soft reset, add and commit the transport changes to one branch, check out a new one based on shared parent, commit the other. Easier done than explained likely, i can do it for you if point me at the branch :)
lemmatum: Changes were mostly independent.
I prefer to do it myself so that I know how to do it next time it happens :)
StanczakDominik: Sounds like a decision by sometime both wise and with some spare time :D
lemmatum: I wouldn't say I have spare time per se... But present me can save future me (that rich, lazy, fat cat) some time with this minor investment. 
lemmatum: I am currently tempted to wait until average ionization and transport pull requests are completed and merged and then rebase this pull request on top of those, especially as this does currently depend on transport eqs.
Thoughts?
StanczakDominik: Reasonable. Let's get those done first.
lemmatum: Looks like this one will also be rebased, yes?
StanczakDominik: Not 100% sure, since it's mixed with transport commits... We'll figure something out. Didn't you want to wait for the transport thing first, though?
lemmatum: Fair point, if we rebase on top of transport it should be good.
StanczakDominik: Okay, I've got this fixed. @lemmatum, would you mind me overwriting your branch?
StanczakDominik: Repeat: all rebased, cleaned up and ready to be pushed here, if that's what you'd like :smile: Otherwise we could close this PR and start another one from my cleaned version.
lemmatum: @StanczakDominik apologies for not seeing this earlier! Yes, we can rewrite!
StanczakDominik: Done! This is all I could extract from that.
lemmatum: @StanczakDominik Do you figure we can review/merge this and then add an issue to expand functionality?
StanczakDominik: Sure, but before merging I'd like to make sure that 

1, the doc is up to date
2. that plasma class example we had built correctly

Actually, given the changes, why wouldn't it fail our tests...

unless...

unless we didn't have one?! :laughing: 

I'll get on that ASAP. Still implementing changes in that other PR.
lemmatum: :rofl: Oh yea... testing is important, huh?
lemmatum: I've done a hard reset so I should be able to work on adding tests and stuff on top of your commits.
lemmatum: TODO:
- [ ] add tests for `PlasmaBlob`
- [ ] replace checks for `Z` with functionality from #303 

Patch:
diff --git a/docs/plasma/index.rst b/docs/plasma/index.rst
index f81ec81a..742153a7 100644
--- a/docs/plasma/index.rst
+++ b/docs/plasma/index.rst
@@ -7,11 +7,21 @@ Plasma
 Introduction
 ============
 
-The :class:`Plasma` class is a basic structure to contain physical
-information about a plasma.  To initialize a plasma system, first
-create an instance of the :class:`Plasma` class and then set the
-:attr:`Plasma.density`, :attr:`plasma.momentum`,
-:attr:`plasma.pressure` and the :attr:`plasma.magnetic_field`.
+The :class:`Plasma3D` class is a basic structure to contain spatial
+information about a plasma.  To initialize a Plasma3D system, first
+create an instance of the :class:`Plasma3D` class and then set the
+:attr:`Plasma3D.density`, :attr:`Plasma3D.momentum`,
+:attr:`Plasma3D.pressure` and the :attr:`Plasma3D.magnetic_field`.
+
+This feature is currently under development.
+
+The :class:`PlasmaBlob` class is a basic structure to contain just
+plasma parameter information about a plasma with no associated
+spatial or temporal scales.  To initialize a PlasmaBlob system, call
+it with arguments: electron temperature :attr:`PlasmaBlob.T_e`, 
+and electron density :attr:`PlasmaBlob.n_e`. You may also optionally
+define the ionization, :attr:`PlasmaBlob.Z`, and relevant plasma 
+particle, :attr:`PlasmaBlob.particle`.
 
 This feature is currently under development.
 
diff --git a/plasmapy/__init__.py b/plasmapy/__init__.py
index 818f85b3..e5dbb06b 100644
--- a/plasmapy/__init__.py
+++ b/plasmapy/__init__.py
@@ -45,7 +45,6 @@ def _split_version(version):
     pass
 
 try:
-    from .classes import Plasma
     from . import classes
     from . import constants
     from . import atomic
diff --git a/plasmapy/classes/__init__.py b/plasmapy/classes/__init__.py
index 10c95c93..7b2c2a0e 100644
--- a/plasmapy/classes/__init__.py
+++ b/plasmapy/classes/__init__.py
@@ -1,2 +1,2 @@
-from .plasma import Plasma
+from .plasma import Plasma3D, PlasmaBlob
 from .species import Species
diff --git a/plasmapy/classes/plasma.py b/plasmapy/classes/plasma.py
index f2911479..eaf98472 100644
--- a/plasmapy/classes/plasma.py
+++ b/plasmapy/classes/plasma.py
@@ -5,12 +5,27 @@
 import numpy as np
 import astropy.units as u
 
-mu0 = np.pi * 4.0e-7 * (u.newton / (u.amp**2))
+from plasmapy.constants import (m_p,
+                                m_e,
+                                c,
+                                mu0,
+                                k_B,
+                                e,
+                                eps0,
+                                pi,
+                                )
+from plasmapy.physics.dimensionless import (quantum_theta,
+                                            )
+from plasmapy.physics.transport import (coupling_parameter,
+                                        )
+from plasmapy.atomic import (ion_mass,
+                             integer_charge,
+                             )
 
-
-class Plasma():
+class Plasma3D():
     """
-    Core class for describing and calculating plasma parameters.
+    Core class for describing and calculating plasma parameters with
+    spatial dimensions.
 
     Attributes
     ----------
@@ -89,3 +104,108 @@ def alfven_speed(self):
         B = self.magnetic_field
         rho = self.density
         return np.sqrt(np.sum(B * B, axis=0) / (mu0*rho))
+
+
+class PlasmaBlob():
+    """
+    Class for describing and calculating plasma parameters without
+    spatial/temporal description.
+    """
+    @u.quantity_input(T_e=u.K, n_e=u.m**-3)
+    def __init__(self, T_e, n_e, Z=None, particle='p'):
+        """
+        Initialize plasma paramters.
+        The most basic description is composition (ion), temperature,
+        density, and ionization.
+        """
+        self.T_e = T_e
+        self.n_e = n_e
+        self.particle = particle
+        if Z == None:
+            # extracting charge state from particle
+            self.Z = integer_charge(self.particle)
+        else:
+            self.Z = Z
+        # extract mass from particle
+        self.ionMass = ion_mass(self.particle)
+        
+    def __str__(self):
+        """
+        Fetches regimes for easy printing
+        """
+        return self.regimes()
+    
+    @property
+    def electron_temperature(self):
+        return self.T_e
+    
+    @property
+    def electron_density(self):
+        return self.n_e
+    
+    @property
+    def ionization(self):
+        return self.Z
+    
+    @property
+    def composition(self):
+        return self.particle
+    
+    def regimes(self):
+        """
+        Generate a comprehensive description of the plasma regimes
+        based on plasma properties and consequent plasma parameters.
+        """
+        # getting dimensionless parameters
+        coupling = self.coupling()
+        quantum_theta = self.quantum_theta()
+
+        # determining regimes based off dimensionless parameters
+        # coupling
+        if coupling <= 0.01:
+            # weakly coupled
+            coupling_str = f"Weakly coupled regime: Gamma = {coupling}."
+        elif coupling >= 100:
+            # strongly coupled
+            coupling_str = f"Strongly coupled regime: Gamma = {coupling}."
+        else:
+            # intermediate regime
+            coupling_str = f"Intermediate coupling regime: Gamma = {coupling}."
+        # quantum_theta
+        if quantum_theta <= 0.01:
+            # Fermi energy dominant
+            quantum_theta_str = (f"Fermi quantum energy dominant: Theta = "
+                                 f"{quantum_theta}")
+        elif quantum_theta >= 100:
+            # thermal kinetic energy dominant
+            quantum_theta_str = (f"Thermal kinetic energy dominant: Theta = "
+                                 f"{quantum_theta}")
+        else:
+            # intermediate regime
+            quantum_theta_str = (f"Both Fermi and thermal energy important: "
+                                 f"Theta = {quantum_theta}")
+
+        # summarizing and printing/returning regimes
+        aggregateStrs = [coupling_str,
+                         quantum_theta_str,
+                         ]
+        return aggregateStrs
+
+    def coupling(self):
+        """
+        Ion-ion coupling parameter to determine if quantum/coupling effects
+        are important. This compares Coulomb potential energy to thermal
+        kinetic energy.
+        """
+        return coupling_parameter(self.T_e,
+                                  self.n_e,
+                                  (self.particle, self.particle),
+                                  self.Z)
+
+    def quantum_theta(self):
+        """
+        Quantum theta parameter, which compares Fermi kinetic energy to
+        thermal kinetic energy to check if quantum effects are important.
+        """
+        theta = quantum_theta(self.T_e, self.n_e)
+        return theta
diff --git a/plasmapy/physics/dimensionless.py b/plasmapy/physics/dimensionless.py
index 96ca481a..815a1648 100644
--- a/plasmapy/physics/dimensionless.py
+++ b/plasmapy/physics/dimensionless.py
@@ -1,7 +1,25 @@
-""" 
+"""
 Module of dimensionless plasma parameters.
 
 These are especially important for determining what regime a plasma is
 in. (e.g., turbulent, quantum, collisional, etc.).
 
 """
+
+import numpy as np
+from astropy import units
+
+from plasmapy.constants import (k_B,
+                                )
+from plasmapy.physics.quantum import (Fermi_energy,
+                                      )
+
+def quantum_theta(T, n_e):
+    """
+    Compares Fermi energy to thermal kinetic energy to check if quantum
+    effects are important.
+    """
+    fermi_energy = Fermi_energy(n_e)
+    thermal_energy = k_B * T
+    theta = thermal_energy / fermi_energy
+    return theta


Test patch:
diff --git a/plasmapy/classes/tests/__init__.py b/plasmapy/classes/tests/__init__.py
index 6f4e1b7a..e69de29b 100644
--- a/plasmapy/classes/tests/__init__.py
+++ b/plasmapy/classes/tests/__init__.py
@@ -1,2 +0,0 @@
-from .test_Plasma import test_Plasma_setup, \
-    test_Plasma_derived_vars
diff --git a/plasmapy/classes/tests/test_Plasma.py b/plasmapy/classes/tests/test_Plasma.py
index 5cff30ce..108a337c 100644
--- a/plasmapy/classes/tests/test_Plasma.py
+++ b/plasmapy/classes/tests/test_Plasma.py
@@ -3,23 +3,23 @@
 import astropy.units as u
 
 from plasmapy.classes import plasma
-
+from plasmapy.utils.exceptions import InvalidParticleError
 
 @pytest.mark.parametrize('grid_dimensions, expected_size', [
     ((100, 1, 1), 100),  # Test 1D setup
     ((128, 128, 1), 16384),  # 2D
     ((64, 64, 64), 262144),  # 3D
 ])
-def test_Plasma_setup(grid_dimensions, expected_size):
-    r"""Function to test basic setup of the Plasma object.
+def test_Plasma3D_setup(grid_dimensions, expected_size):
+    r"""Function to test basic setup of the Plasma3D object.
 
-    Tests that a Plasma object initiated with a particular
+    Tests that a Plasma3D object initiated with a particular
     specification behaves in the correct way.
 
     Parameters
     ----------
     grid_dimensions : tuple of ints
-        Grid size of the Plasma object to test. Must be a tuple of
+        Grid size of the Plasma3D object to test. Must be a tuple of
         length 3, indicating length of the grid in x, y, and z
         directions respectively. Directions not needed should have a
         length of 1.
@@ -29,13 +29,13 @@ def test_Plasma_setup(grid_dimensions, expected_size):
 
     Examples
     --------
-    >>> test_Plasma_setup((10, 10, 10), 1000)
-    >>> test_Plasma_setup((100, 10, 1), 1000)
+    >>> test_Plasma3D_setup((10, 10, 10), 1000)
+    >>> test_Plasma3D_setup((100, 10, 1), 1000)
     """
     x, y, z = grid_dimensions
-    test_plasma = plasma.Plasma(domain_x=np.linspace(0, 1, x)*u.m,
-                                domain_y=np.linspace(0, 1, y)*u.m,
-                                domain_z=np.linspace(0, 1, z)*u.m)
+    test_plasma = plasma.Plasma3D(domain_x=np.linspace(0, 1, x)*u.m,
+                                  domain_y=np.linspace(0, 1, y)*u.m,
+                                  domain_z=np.linspace(0, 1, z)*u.m)
 
     # Basic grid setup
     assert test_plasma.x.size == x
@@ -61,16 +61,16 @@ def test_Plasma_setup(grid_dimensions, expected_size):
 
 
 # @pytest.mark.parametrize([()])
-def test_Plasma_derived_vars():
-    r"""Function to test derived variables of the Plasma class.
+def test_Plasma3D_derived_vars():
+    r"""Function to test derived variables of the Plasma3D class.
 
     Tests the shapes, units and values of variables derived from core
     variables.  The core variables are set with arbitrary uniform
     values.
     """
-    test_plasma = plasma.Plasma(domain_x=np.linspace(0, 1, 64)*u.m,
-                                domain_y=np.linspace(0, 1, 64)*u.m,
-                                domain_z=np.linspace(0, 1, 1)*u.m)
+    test_plasma = plasma.Plasma3D(domain_x=np.linspace(0, 1, 64)*u.m,
+                                  domain_y=np.linspace(0, 1, 64)*u.m,
+                                  domain_z=np.linspace(0, 1, 1)*u.m)
 
     # Set an arbitrary uniform values throughout the plasma
     test_plasma.density[...] = 2.0 * u.kg / u.m**3
@@ -95,3 +95,86 @@ def test_Plasma_derived_vars():
     assert test_plasma.alfven_speed.shape == test_plasma.density.shape
     assert test_plasma.alfven_speed.unit.si == u.m / u.s
     assert np.allclose(test_plasma.alfven_speed.value, 10.92548431)
+
+
+class Test_PlasmaBlob():
+    def setup_method(self):
+        """initializing parameters for tests """
+        self.T_e = 5 * 11e3 * u.K
+        self.n_e = 1e23 * u.cm ** -3
+        self.Z = 2.5
+        self.particle = 'p'
+        self.blob = plasma.PlasmaBlob(T_e=self.T_e, 
+                                      n_e=self.n_e,
+                                      Z=self.Z,
+                                      particle=self.particle)
+        self.couplingVal = 10.468374460435724
+        self.thetaVal = 0.6032979246923964
+
+    def test_invalid_particle(self):
+        """
+        Checks if function raises error for invalid particle.
+        """
+        with pytest.raises(InvalidParticleError):
+            plasma.PlasmaBlob(T_e=self.T_e, 
+                              n_e=self.n_e,
+                              Z=self.Z,
+                              particle="cupcakes")
+    
+    def test_electron_temperature(self):
+        """Testing if we get the same electron temperature we put in """
+        testTrue = self.T_e == self.blob.electron_temperature
+        errStr = (f"Input electron temperature {self.T_e} should be equal to "
+                  f"electron temperature of class "
+                  f"{self.blob.electron_temperature}.")
+        assert testTrue, errStr
+        
+    def test_electron_density(self):
+        """Testing if we get the same electron density we put in """
+        testTrue = self.n_e == self.blob.electron_density
+        errStr = (f"Input electron density {self.n_e} should be equal to "
+                  f"electron density of class "
+                  f"{self.blob.electron_density}.")
+        assert testTrue, errStr
+    
+    def test_ionization(self):
+        """Testing if we get the same ionization we put in """
+        testTrue = self.Z == self.blob.ionization
+        errStr = (f"Input ionization {self.Z} should be equal to "
+                  f"ionization of class "
+                  f"{self.blob.ionization}.")
+        assert testTrue, errStr
+    
+    def test_composition(self):
+        """Testing if we get the same composition (particle) we put in """
+        testTrue = self.particle == self.blob.composition
+        errStr = (f"Input particle {self.particle} should be equal to "
+                  f"composition of class "
+                  f"{self.blob.composition}.")
+        assert testTrue, errStr
+
+    def test_coupling(self):
+        """
+        Tests if coupling  method value meets expected value.
+        """
+        methodVal = self.blob.coupling()
+        errStr = (f"Coupling parameter should be {self.couplingVal} "
+                  f"and not {methodVal.si.value}.")
+        testTrue = np.isclose(methodVal.value,
+                              self.couplingVal,
+                              rtol=1e-8,
+                              atol=0.0)
+        assert testTrue, errStr
+    
+    def test_quantum_theta(self):
+        """
+        Tests if degeneracy parameter method value meets expected value.
+        """
+        methodVal = self.blob.quantum_theta()
+        errStr = (f"Degeneracy parameter should be {self.thetaVal} "
+                  f"and not {methodVal.si.value}.")
+        testTrue = np.isclose(methodVal.value,
+                              self.thetaVal,
+                              rtol=1e-8,
+                              atol=0.0)
+        assert testTrue, errStr
\ No newline at end of file
diff --git a/plasmapy/classes/tests/test_Species.py b/plasmapy/classes/tests/test_Species.py
index bfbadcb4..0bdff05b 100644
--- a/plasmapy/classes/tests/test_Species.py
+++ b/plasmapy/classes/tests/test_Species.py
@@ -4,13 +4,13 @@
 from astropy.modeling import models, fitting
 from scipy.optimize import curve_fit
 
-from plasmapy.classes import Plasma, Species
+from plasmapy.classes import Plasma3D, Species
 
 
 @pytest.fixture()
 def uniform_magnetic_field(N=3, max_x=1):
     x = np.linspace(-max_x, max_x, N) * u.m
-    test_plasma = Plasma(x, x, x)
+    test_plasma = Plasma3D(x, x, x)
     magfieldstr = 1 * u.T
     test_plasma.magnetic_field[2] = magfieldstr
     return test_plasma
@@ -200,6 +200,6 @@ def test_particle_exb_nonuniform_drift():
 #     y = np.linspace(0, 1, 20)*u.m
 #     z = np.linspace(0, 1, 30)*u.m
 
-#     plasma = Plasma(x, y, z)
+#     plasma = Plasma3D(x, y, z)
 
 #     Species(plasma, 'e', dt=1e-14*u.s, nt=2).run()