newcleo-dev-team / lbh15 Goto Github PK
View Code? Open in Web Editor NEWCompilation of thermo-physical properties for lead/bismuth-based liquid metals for fast reactor technology
License: GNU Lesser General Public License v3.0
Compilation of thermo-physical properties for lead/bismuth-based liquid metals for fast reactor technology
License: GNU Lesser General Public License v3.0
Add the oxygen limits correlations related to LBE in the properties sub-package, according to the package structure defined in issue #28.
Add the solubility correlations related to LBE in the properties sub-package, according to the package structure defined in issue #28.
Check that properties_path
variable is not empty when loading properties.
This check is dummy for for liquid metal classes available in the package (Lead
, Bismuth
and LBE
), since they correctly assign the value of the variable.
Anyway, the check must be performed to guarantee the correct execution of user-defined classes extending LiquidMetalInterface
for which the properties_path
variable might be left empty.
Update the API guide structure according to modules defined in issue #28.
repr method looks for attribute of LiquidMetal object that does not exist anymore.
Enable the loading of new thermochemical properties in Lead
, Bismuth
and LBE
classes. Therefore, modify the value of the properties modules attribute of such classes to load properties from new modules (see also issue #29),
Add the diffusivity correlations related to lead in the properties sub-package, according to the package structure defined in issue #28.
Title self explaining. It is a matter of proper functionality assigned to proper class.
Define a "Learn more" section, with "Oxygen control" sub-section, to provide technical insights about the stable oxide formation and control. This section shall summarize and cite (with links) all the properties involved in the calculation.
In addition, define a "Tutorials" section showing an application used to monitor the lead level and the target oxygen control.
Set the correlations to use as default one inside the dictionary attribute _default_corr_to_use
of the liquid metal classes.
Currently, a liquid metal object is instantiated provided a given thermo-dynamic state at input. When the instance is needed at a different thermo-dynamic state, a new instance must be created. This may imply an inefficient use of memory, especially when the same liquid metal object is wanted.
The possibility of instance reset (at different thermo-dynamic state) shall be considered for future code versions.
Please provide the file pyproject.toml to improve package install and distribution.
Define a specific module in properties
sub-package containing iron solubility correlation for liquid bismuth.
Add the diffusivity correlations related to LBE in the properties sub-package, according to the package structure defined in issue #28.
In order to load properties from different modules, as proposed in issue #28, the _properties_module
attribute of LiquidMetalInterface
class (and its derived ones) must become a dictionary (as done for the __custom_properties_path
attribute).
Add the thermochemical correlations related to lead in the properties sub-package, according to the package structure defined in issue #28.
For the sake of clarity, modify the properties
sub-package structure the handle the large amount of new thermochemical properties.
The sub-package shall look like:
properties/
- __init__.py
- bismuth_properties.py
- lbe_properties.py
- lead_properties.py
- bismuth_thermochemicals/
- __init__.py
- diffusivity_in_bismuth.py
- solubility_in_bismuth.py
- bismuth_thermochemical_properties.py
- lbe_thermochemicals/
- __init__.py
- diffusivity_in_lbe.py
- solubility_in_lbe.py
- lbe_thermochemical_properties.py
- lead_thermochemicals/
- __init__.py
- diffusivity_in_lead.py
- solubility_in_lead.py
- lead_thermochemical_properties.py
The main __init__.py
of the package must include all the modules defined in the properties
sub-package properly.
In addition, update the code documentation to properly read the new sub-package docstrings.
Currently static method like cp_min, T_at_cp_min are embedded in LiquidMetal (LM) object classes (Lead, Bismuth, LBE). Due to the dynamic methodology of properties addition in LM objects, this approach shall be avoided.
Example of undesired behaviour:
. user adds its own cp correlation for Lead
. user asks for minimum value of cp ->> lbh15 can provide only minimum of cp for "gurvich1991" and "sobolev2011" correlation
Implementation must be in some sense "static": user asks those information without instantiation of specific property or perhaps he needs them to take decision at instantiation phase of LM.
Example:
. user wants to instantiate Bismuth knowing its cp value ->> in order to select the first or second root of the function he probably needs to know which is the function minimum
In current release, setting correlations to use determines the following undesired behavour:
>>> from lbh15 import Lead
>>> Lead.set_correlation_to_use('cp', 'sobolev2011')
>>> ll = Lead(T=668.15)
>>> ll.cp
146.7859768569852
>>> Lead.set_correlation_to_use('cp', 'gurvich1991')
>>> ll.cp
146.7859768569852
>>> ll2 = Lead(T=668.15)
>>> ll2.cp
146.77472503511203
>>> ll.cp
146.77472503511203
In practice, when a new instance is created, the new corralation impacts also the previously created one, thus changing its cp value. This is because property addition is a class related functionality and it is currently hanlded un new dunder method.
The following points shall be guaranteed:
Replace all the specific test functions with just one that checks the initialization from all the available properties.
This shall be done for all the three liquid metals.
The test shall be dynamic so that when new properties are available they are going to be automatically tested.
Add the solubility correlations related to lead in the properties sub-package, according to the package structure defined in issue #28.
if len(args) == 4
is not enough: the check should be both on the presence of
the 4-th argument and on its value;Sometimes, correlations from the reference handbook miss the name used as acronym or identifier. In such case, the correlation name is lbh15
. Please, check the handbook in case existing names for a correlation were neglected by mistake.
When the user adds his/her own correlation for a given property, this last becomes the default one also in case more correlations were already available. Check the documentation for correct information communicated to the user.
Implement the properties from the chapters 3 and 4 of the reference handbook.
Currently in LiquidMetalInterface
object, when custom property objects are loaded, a check is performed to assure that they are childs of PropertyInterface
class (but not PropertyInterface
itself).
Indeed, the functionality must check that the user provided property is not an abstract class, i.e., that the user has correctly overwritten all the mandatory methods as described in the documentation.
If the check fails for a given property, that one must be skipped to avoid the stop of the program.
Add the oxygen limits correlations related to lead in the properties sub-package, according to the package structure defined in issue #28.
In LMFR hydrostatic pressure of the coolant is not negligible. This has an impact on coolant density which is crucial for criticality
calculations. Therefore, lbh15 shall provide correction on density as function of the pressure.
The handbook provides the correlation to adopt in Eq. 2.78
Define a specific module for messages, errors and warnings I/O:
Add the correlations related to diffusivity in bismuth in the properties sub-package, according to the package structure defined in issue #28.
Update the introduction and examples section of the documentation.
Define a table where all the new properties are listed and updated the examples to show their usage.
The version of lbh15 v1 has recently been released.
We suggest presenting this version of the package to the scientific community at the NURETH-20 conference.
As in the object of the issue. Standard numerical values for the physical constants must be uniquely defined once. The use of scipy.constants provides all physical constants following a QA approach.
Add the thermochemical correlations related to bismuth in the properties sub-package, according to the package structure defined in issue #28.
Move the implementation of the check outside the "private" method of LiquidMetalInterface
, so that derived class can easily override it
It is formally better to implement the information method inside the PropertyInterface
class.
This allows for easier future modification of it.
The LiquidMetalInterface
class just needs to wrap it.
Please add the possibility to generate the documentation by using latexpdf without recurring separately to dvi and pdf document production.
Use the corporate tex class when generating the pdf documentation. Please use the techdoc option to prepare the manual or technical document of lbh15.
Support topics of material science such as corrosion and compatibility with steel and other structural materials (chapters 6-7).
There is no check when loading properties that one was already loaded by a different module. This behaviour shall be fixed to avoid useless looping and fix the output of methods like correlations_available
.
The case in which the property correlation is non-injective and the root to use is not specified is not correctly handled when the property correlation is used for root finding of the temperature.
This does not impact the liquid metal classes available by default in the package but must be done for correct execution of the functionality by user-defined derived classes of LiquidMetalInterface
.
There is a typo in the test, that is the T_at_min tests are defined twice.
Add the thermochemical correlations related to LBE in the properties sub-package, according to the package structure defined in issue #28.
Make sure that any function is implemented allowing element-wise operations, so that correlations can be called on simple scalars and arrays at the same time. The use of np.array is suggested.
OptimizeResult.success
boolean flag;Define the elements' solubility in bismuth as done for the iron (see issue #25)
Static analysis is a method of program debugging that is done examining the code without executing it. The process provides undertanding of the code structure and can help ensure that the code adheres to industry standards.
pylint is the common tool used for static analysis of python programs.
Use the corporate tex class when generating the pdf documentation. Please use the techdoc option to prepare the manual or technical document of lbh15.
The class shall be used if found among available installed latex classes, otherwise the building must switch to default sphinx one
Upgrade lbh15 with elements from chapter 5 of the reference handbook.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.