-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #578 from PMEAL/fix_issue_566
Fix issue #566
- Loading branch information
Showing
6 changed files
with
102 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,33 @@ | ||
import OpenPNM | ||
import pytest | ||
import scipy as sp | ||
|
||
|
||
class DiffusiveConductanceTest: | ||
def setup_class(self): | ||
self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5], spacing=1.0) | ||
self.geo = OpenPNM.Geometry.GenericGeometry(network=self.net, | ||
pores=self.net.Ps, | ||
throats=self.net.Ts) | ||
self.geo['pore.diameter'] = 1.0 | ||
self.geo['pore.area'] = 1.0 | ||
self.geo['throat.diameter'] = 1.0 | ||
self.geo['throat.length'] = 1e-9 | ||
self.geo['throat.area'] = 1 | ||
self.air = OpenPNM.Phases.Air(network=self.net) | ||
self.phys = OpenPNM.Physics.GenericPhysics(network=self.net, | ||
phase=self.air, | ||
geometry=self.geo) | ||
|
||
def test_bulk_diffusion(self): | ||
pass | ||
mod = OpenPNM.Physics.models.diffusive_conductance.bulk_diffusion | ||
self.phys.models.add(propname='throat.conductance1', | ||
model=mod) | ||
assert sp.allclose(a=self.phys['throat.conductance1'][0], | ||
b=0.00084552) | ||
|
||
self.phys.models.add(propname='throat.conductance2', | ||
model=mod, | ||
calc_pore_len=True) | ||
assert sp.allclose(a=self.phys['throat.conductance2'][0], | ||
b=0.00084552) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import OpenPNM | ||
import pytest | ||
import scipy as sp | ||
|
||
|
||
class HydraulicConductanceTest: | ||
def setup_class(self): | ||
self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5], spacing=1.0) | ||
self.geo = OpenPNM.Geometry.GenericGeometry(network=self.net, | ||
pores=self.net.Ps, | ||
throats=self.net.Ts) | ||
self.geo['pore.diameter'] = 1.0 | ||
self.geo['throat.diameter'] = 1.0 | ||
self.geo['throat.length'] = 1.0e-9 | ||
self.air = OpenPNM.Phases.Air(network=self.net) | ||
self.phys = OpenPNM.Physics.GenericPhysics(network=self.net, | ||
phase=self.air, | ||
geometry=self.geo) | ||
|
||
def test_hagen_poiseuille(self): | ||
mod = OpenPNM.Physics.models.hydraulic_conductance.hagen_poiseuille | ||
self.phys.models.add(propname='throat.conductance1', | ||
model=mod) | ||
assert sp.allclose(a=self.phys['throat.conductance1'][0], | ||
b=1330.68207684) | ||
|
||
self.phys.models.add(propname='throat.conductance2', | ||
model=mod, | ||
calc_pore_len=True) | ||
assert sp.allclose(a=self.phys['throat.conductance2'][0], | ||
b=1330.68207684) |