Skip to content

Commit

Permalink
[156_refactor_advanced_usage], issue - #156, Inserted example for def…
Browse files Browse the repository at this point in the history
…ault correlation choice when adding new correlation
  • Loading branch information
lelaus committed Mar 24, 2024
1 parent c133269 commit 341a185
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/source/readme_full.rst
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,22 @@ now 2: :code:`sobolev2008a` and :code:`custom2022`. If the density correlation
is not specified for a new object instantiation, the last one in the list will
be selected by default:

>>> liquid_lead = Lead(T=1000)
>>> liquid_lead.rho_info()
rho:
Value: 10200.00 [kg/m^3]
Validity range: [700.00, 1900.00] K
Correlation name: 'custom2022'
Long name: custom density
Units: [kg/m^3]
Description:
Liquid Lead custom density

Once introduced the new correlation :code:`custom2022` for the density
:code:`rho`, the user can choose which one to use by means of the method
:meth:`.Lead.set_correlation_to_use`, according to the following
example:

>>> # Use default one
>>> Lead.set_correlation_to_use('rho', 'sobolev2008a')
>>> # Get an instance of Lead object at T=1000 K
Expand Down

0 comments on commit 341a185

Please sign in to comment.