Major Release: v3.0.0 #2592
ma-sadeghi
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Please see this blogpost for a high-level highlight of the changes.
🎆 Major Changes
geometryandphysicsmodulesGeometryandPhysicsobjectstopotoolsto a newvisualizationmodulematerialsandmetricsmodules in favor of creating detailed examples🚀 New features
solversmodule containing classes that define a generic api for using arbitrary numerical solversintegratorsmodule containing classes that define the api for transient solversscipy.integrate.ivp_solvefunction for transient problemsDemonetwork generator which includes geometry models already assigned and ready for instant usetopotools.find_interface_throatsto find throats between two sets of poresSteadyStateSolutionclass for storing the results of steady state algorithmsTransientSolutionclass for storing results of transient algorithms at each time step, including ability to interpolate between timesparamsattribute to all objects for storing scalar values and constantspn['param.foo']which looks up values frompn.params['foo']in a way that works seamlessly with existing pore-scale modelsxas a property toTransportclasses for easy access to the solved quantitygenerate_voxel_imagetovisualizationmodulemodels.networkplot_network_jupyterfunction to visualization module which creates an interactive visualization using Plotlycontribfolder/module for putting experimental and beta features, and well as contributions before they are adopted into the main code baseTransientMultiPhysicsclass to thecontribfolderplot_networkfunction based on vispy tocontribfoldersettingsattribute on objects to work more like python'sdataclasseswith settings as attributes, while also enforcing their type🍰 Enhancements
ScipyCGto the solvers module (usesscipy.sparse.linalg.cg)intersecting_cones/pyramidssize factor models, as well as hybridcones_and_cylinderswhich adopt intersecting cones/pyramids as neededcallmethod toModelWrapperso they can run themselves directly with zero effort by useropenpnm.models.collectionscontaining dict files of preset models for all sub-classes to simplify instantiationworkspace.settings_validate_data_healthto account for throats without an assigned conductance modelgetitemon dictionaries to return a numeric value if used as a key, so pn[1.0] returns 1.0. This allows passing in scalar values to pore-scale models with no need to assign that scalar to all locations firstasmaskargument to neighbor lookup functionsReactiveTransportReactiveTransportto facilitate iterative solvesget_conduit_datamethod to Base class🔧 Maintenance
AlgorithmPhaseobjects for cleaner tracebacks when autointerpolation is enablestopotoolsmodule into library of functions requiring no openpnm specific classesnumpyunbufferedoperations in surface area modelsopenpnm.models.misc/phase/physicsmodules to keep namespace cleanrelaxation_sourcefrom ReactiveTransportSettings as we no longer apply relaxation to source term__all__functionality throughout code to control imports of functionsTransportto put boundary condition functions in a mixinregenerate_modelsto work when models lackregen_modeargumentcache_b, changedcache_Atocachesince b is very smallfreeze_modelsoption fromModelsMixinutils.miscTransportand subclassed algorithms' run methodscipy's convergence checkerset_labelBravaisandCubicDualBaseclass into several mixins for more control of inheritance #maintGeometryandPhysicsobjects, in favor ofNetworkandPhasehandling all related data and models directlymodels.topologytomodels.networkMixedInvasionPercolation(Coop)andOrdinaryPercolationalgorithms until they can be better supportedtargetkeyword withnetworkorphasethroughout all pore-scale models, except ones that are truly generalobj.settings['sources']toobj[pore.sources']to be consistent with how boundary conditions are tracked (i.e.alg['pore.bc.rate'])modeargument when adding boundary conditionsProjectclass to a minimal pseudo-list, with no extraneous methods inherited from list cluttering the namespaceBase2objects no longer accepts settingsiterative_props, removedset_variable_propsModelsMixinfromAlgorithmsince algorithms don't typically need modelsDrainageclass in algorithms with more limited scope to replaceOrdinaryPercolationandPorosimetrynlin_max_iterfromReactiveTransportSettingsin favor ofnewton_maxiterMultiphasetocontribfolder to indicate it is experimentalrunmethod now returns one or more Solution objects inside dictionary named according to the quantity they containnetworka mandatory argument onphaseandalgorithmobjectstomaskandtoindicestoto_maskandto_indicessince the underscore is the common convention in other packages likepandasget_domain_areaandget_domain_lengthfrom attributes on transport algorithms totopotools, for more general usephasea mandatory argument in algorithms instead of allowing it to be set in settings after the factTransportsince these can be computed by users themselvesSolutionobject for returning data from algorithmsSolverclass to handle matrix math which is passed as an argument to run methodsStickAndBallgeometry class (useSpheresAndCylindersinstead)classic_ordinary_diffusionandclassic_hagen_poiseuilleconductance modelssympysource models and made generic one much easier to usenum_pointsargument fromDelaunay/Voronoiclasses in favorpoints=intspacingandshapeattribute fromCubicand moved totopotoolsas functionssetupmethod from algorithms in favor of adding to settings attribute directlymodels.geometry.pore_area/throat_areain favour ofpore/throat_cross_sectional_area🐛 Bugfixes
regenerate_modelson a mixture now first regenerates each componentduplicate_throatscolor_byargument inplot_coordinates/connectionsto accept partial list of values if pores/throats specifiedReactiveTransport's run method to accept instantiated solver, not the class itselflensandpendular_ringmodelsTransportto properly check for connected network including connections with boundary conditions📗 Documentation
substituionthroughout the package to make docstrings more consistentThis discussion was created from the release v3.0.0.
Beta Was this translation helpful? Give feedback.
All reactions