Repository: PMEAL/OpenPNM

Issue:
Remove lines that store peclet numbers
https://github.com/PMEAL/OpenPNM/blob/c01c5d3433c411bc69968feb7847cd2e3ba2eaa3/openpnm/models/physics/ad_dif_mig_conductance.py#L175

https://github.com/PMEAL/OpenPNM/blob/c01c5d3433c411bc69968feb7847cd2e3ba2eaa3/openpnm/models/physics/ad_dif_conductance.py#L97

These lines of code can be removed. No need to export peclet numbers. Also, was creating an issue when you had more than one physics object adding ad_dif_conductance since peclet numbers were getting overwritten.

Discussion:

Patch:
diff --git a/openpnm/models/physics/ad_dif_conductance.py b/openpnm/models/physics/ad_dif_conductance.py
index 315ecde99..7dbe99fd3 100644
--- a/openpnm/models/physics/ad_dif_conductance.py
+++ b/openpnm/models/physics/ad_dif_conductance.py
@@ -94,10 +94,6 @@ def ad_dif(target,
     Peij[(Peij < 1e-10) & (Peij >= 0)] = 1e-10
     Peij[(Peij > -1e-10) & (Peij <= 0)] = -1e-10
 
-    # Export Peclet values (half only since Peij = -Peji)
-    phase['throat.peclet.ad'] = _np.nan
-    phase['throat.peclet.ad'][throats] = _np.absolute(Peij[0:len(Lt)])
-
     # Correct the flow rate
     Qij = Peij * gd
 
diff --git a/openpnm/models/physics/ad_dif_mig_conductance.py b/openpnm/models/physics/ad_dif_mig_conductance.py
index 84fcb8361..5dee133c0 100644
--- a/openpnm/models/physics/ad_dif_mig_conductance.py
+++ b/openpnm/models/physics/ad_dif_mig_conductance.py
@@ -172,11 +172,6 @@ def ad_dif_mig(
     Peij_mig[(Peij_mig < 1e-10) & (Peij_mig >= 0)] = 1e-10
     Peij_mig[(Peij_mig > -1e-10) & (Peij_mig <= 0)] = -1e-10
 
-    # Export Peclet values (half only since Peij_adv_mig = -Peji_adv_mig)
-    phase["throat.peclet." + "ad_mig." + ion] = _np.absolute(Peij_adv_mig[0 : len(Lt)])
-    phase["throat.peclet." + "ad." + ion] = _np.absolute(Peij_adv[0 : len(Lt)])
-    phase["throat.peclet." + "mig." + ion] = _np.absolute(Peij_mig[0 : len(Lt)])
-
     # Corrected advection-migration
     adv_mig = Peij_adv_mig * gd
 


Test patch:
diff --git a/tests/unit/core/ModelsTest.py b/tests/unit/core/ModelsTest.py
index 12ec1e6ae..47a75ae3b 100755
--- a/tests/unit/core/ModelsTest.py
+++ b/tests/unit/core/ModelsTest.py
@@ -2,7 +2,6 @@ import openpnm as op
 import numpy as np
 import openpnm.models as mods
 import pytest
-from testfixtures import LogCapture
 
 
 class ModelsTest:
@@ -152,13 +151,13 @@ class ModelsTest:
         loglevel = ws.settings["loglevel"]
         ws.settings["loglevel"] = 50
         assert len(phys) == 2
-        assert len(phase) == 14
+        assert len(phase) == 13
         phys.regenerate_models(propnames=None, deep=False)
         assert len(phys) == 14
         # Note that 2 new models were added to the phase during interpolation
         assert len(phase) < len_phase
         phase.clear(mode='model_data')
-        assert len(phase) == 14
+        assert len(phase) == 13
         phys.regenerate_models(propnames=None, deep=True)
         assert len(phase) < len_phase
         ws.settings["loglevel"] = loglevel