From 904f60dd8646ad6d3dccd5e1c7e43cd026079603 Mon Sep 17 00:00:00 2001 From: fedebenelli Date: Tue, 16 Apr 2024 13:05:56 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20ipqa-res?= =?UTF-8?q?earch/forsus@c079243380acaf5118f738dab0f6af40031babae=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 +- interface/abs_from_json.html | 4 +- interface/substance.html | 127 ++++++++------- lists/absint.html | 2 +- lists/files.html | 92 +++++------ lists/modules.html | 4 +- lists/procedures.html | 100 ++++++------ lists/types.html | 2 +- module/forsus.html | 10 +- module/forsus_constants.html | 4 +- module/forsus_properties.html | 6 +- module/forsus_properties_base.html | 4 +- .../forsus_properties_critical_constants.html | 6 +- module/forsus_properties_groups.html | 4 +- module/forsus_properties_scalar.html | 6 +- module/forsus_substance.html | 8 +- proc/from_json.html | 4 +- proc/from_json~2.html | 139 +++++++++++++++- proc/init_json.html | 131 ++++++++------- proc/open_json.html | 64 ++++---- proc/scalar_from_json.html | 40 ++--- search.html | 2 +- sourcefile/base.f90.html | 22 +-- sourcefile/constants.f90.html | 28 ++-- sourcefile/critical_constants.f90.html | 22 +-- sourcefile/forsus.f90.html | 38 ++--- sourcefile/group.f90.html | 22 +-- sourcefile/properties.f90.html | 22 +-- sourcefile/scalar_property.f90.html | 22 +-- sourcefile/substance.f90.html | 151 ++++++++++-------- src/{forsus.f90 => forsus.F90} | 2 +- src/substance.f90 | 29 +++- tipuesearch/tipuesearch_content.js | 2 +- type/criticalconstants.html | 2 +- type/groups.html | 2 +- type/property.html | 6 +- type/scalarproperty.html | 2 +- type/substance.html | 15 +- 38 files changed, 688 insertions(+), 462 deletions(-) rename src/{forsus.f90 => forsus.F90} (73%) diff --git a/index.html b/index.html index 492ea80..915d808 100644 --- a/index.html +++ b/index.html @@ -138,7 +138,7 @@

jscilipoti

Source Files

- +
    @@ -195,7 +195,7 @@

    Derived Types

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


diff --git a/interface/abs_from_json.html b/interface/abs_from_json.html index a5887fc..1b9485d 100644 --- a/interface/abs_from_json.html +++ b/interface/abs_from_json.html @@ -77,7 +77,7 @@

abs_from_json
  • 9 statements + title=" 7.8% of total for procedures.">9 statements
  • @@ -246,7 +246,7 @@

    Description

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


    diff --git a/interface/substance.html b/interface/substance.html index 1c128fd..db9d2c7 100644 --- a/interface/substance.html +++ b/interface/substance.html @@ -77,7 +77,7 @@

    Substance
  • 3 statements + title="

    2.6% of total for procedures.

    Including implementation: 35 statements, 30.4% of total for procedures.">3 statements
  • @@ -160,11 +160,11 @@

    Calls

    - - + + interface~~substance~~CallsGraph - + interface~substance @@ -186,99 +186,118 @@

    Calls

    - + -proc~scalar_from_json - - -ScalarProperty%scalar_from_json +proc~from_json~2 + + +CriticalConstants%from_json - + -proc~init_json->proc~scalar_from_json - - +proc~init_json->proc~from_json~2 + + - + +proc~scalar_from_json + + +ScalarProperty%scalar_from_json + + + + + +proc~from_json~2->proc~scalar_from_json + + + + + get - -get + +get - + proc~scalar_from_json->get - - + + - + initialize - -initialize + +initialize - + proc~scalar_from_json->initialize - - + + - + load_file - -load_file + +load_file - + proc~scalar_from_json->load_file - - + + - + proc~open_json - - -open_json + + +open_json - + proc~scalar_from_json->proc~open_json - - + + - + proc~open_json->initialize - - + + - + proc~open_json->load_file - - + + - + failed - -failed + +failed - + proc~open_json->failed - - + + -
    +

    diff --git a/lists/absint.html b/lists/absint.html index 797a2de..6bef8b2 100644 --- a/lists/absint.html +++ b/lists/absint.html @@ -95,7 +95,7 @@

    Abstract Interfaces

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


    diff --git a/lists/files.html b/lists/files.html index f93041d..86cf1f7 100644 --- a/lists/files.html +++ b/lists/files.html @@ -84,7 +84,7 @@

    Source Files

    - forsus.f90 + forsus.F90 @@ -111,16 +111,16 @@

    Source Files

    --> + viewBox="0.00 0.00 641.00 107.11" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> file~~graph~~FileGraph - + sourcefile~base.f90 - -base.f90 + +base.f90 @@ -128,75 +128,75 @@

    Source Files

    sourcefile~group.f90 - -group.f90 + +group.f90 sourcefile~base.f90->sourcefile~group.f90 - - + + sourcefile~scalar_property.f90 - -scalar_property.f90 + +scalar_property.f90 sourcefile~base.f90->sourcefile~scalar_property.f90 - - + + sourcefile~constants.f90 - -constants.f90 + +constants.f90 sourcefile~constants.f90->sourcefile~base.f90 - - + + sourcefile~forsus.f90 - - -forsus.f90 + + +forsus.F90 sourcefile~constants.f90->sourcefile~forsus.f90 - - - + + + sourcefile~constants.f90->sourcefile~scalar_property.f90 - - + + sourcefile~critical_constants.f90 - -critical_constants.f90 + +critical_constants.f90 @@ -204,61 +204,61 @@

    Source Files

    sourcefile~properties.f90 - -properties.f90 + +properties.f90 sourcefile~critical_constants.f90->sourcefile~properties.f90 - - + + sourcefile~group.f90->sourcefile~properties.f90 - - + + sourcefile~properties.f90->sourcefile~forsus.f90 - - + + sourcefile~substance.f90 - -substance.f90 + +substance.f90 sourcefile~properties.f90->sourcefile~substance.f90 - - + + sourcefile~scalar_property.f90->sourcefile~critical_constants.f90 - - + + sourcefile~scalar_property.f90->sourcefile~properties.f90 - - + + sourcefile~substance.f90->sourcefile~forsus.f90 - - + +
    @@ -329,7 +329,7 @@

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


    diff --git a/lists/modules.html b/lists/modules.html index 476ce82..bea7071 100644 --- a/lists/modules.html +++ b/lists/modules.html @@ -73,7 +73,7 @@

    Modules

    forsus - forsus.f90 + forsus.F90

    ForSus: Fortran substance properties.

    @@ -438,7 +438,7 @@

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


    diff --git a/lists/procedures.html b/lists/procedures.html index 91a6464..4fb2c3f 100644 --- a/lists/procedures.html +++ b/lists/procedures.html @@ -115,17 +115,17 @@

    Procedures

    - + call~~graph~~CallGraph - + interface~substance - -Substance + +Substance @@ -133,23 +133,23 @@

    Procedures

    proc~init_json - -init_json + +init_json interface~substance->proc~init_json - - + + proc~from_json - -Groups%from_json + +Groups%from_json @@ -157,35 +157,35 @@

    Procedures

    proc~open_json - -open_json + +open_json proc~from_json->proc~open_json - - + + get - -get + +get proc~from_json->get - - + + proc~from_json~2 - -CriticalConstants%from_json + +CriticalConstants%from_json @@ -193,82 +193,82 @@

    Procedures

    proc~scalar_from_json - -ScalarProperty%scalar_from_json + +ScalarProperty%scalar_from_json proc~from_json~2->proc~scalar_from_json - - + + - + -proc~init_json->proc~scalar_from_json - - +proc~init_json->proc~from_json~2 + + failed - -failed + +failed proc~open_json->failed - - + + initialize - -initialize + +initialize proc~open_json->initialize - - + + load_file - -load_file + +load_file proc~open_json->load_file - - + + proc~scalar_from_json->proc~open_json - - + + proc~scalar_from_json->get - - + + proc~scalar_from_json->initialize - - + + proc~scalar_from_json->load_file - - + +
    @@ -366,7 +366,7 @@

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


    diff --git a/lists/types.html b/lists/types.html index 85ccffd..336978b 100644 --- a/lists/types.html +++ b/lists/types.html @@ -269,7 +269,7 @@

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


    diff --git a/module/forsus.html b/module/forsus.html index 65e4e22..f09ab26 100644 --- a/module/forsus.html +++ b/module/forsus.html @@ -77,19 +77,19 @@

    forsus
  • 6 statements + title=" 3.0% of total for modules and submodules.">6 statements
  • - Source File + Source File
  • @@ -443,7 +443,7 @@

    Variables

    :: version = - "0.1.1" + VERSION @@ -480,7 +480,7 @@

    Variables

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


    diff --git a/module/forsus_constants.html b/module/forsus_constants.html index 087c596..157592a 100644 --- a/module/forsus_constants.html +++ b/module/forsus_constants.html @@ -77,7 +77,7 @@

    forsus_constants
  • 7 statements + title=" 3.5% of total for modules and submodules.">7 statements
  • @@ -579,7 +579,7 @@

    Variables

    Documentation generated by FORD - on 2024-04-03 17:11

    + on 2024-04-16 13:05


    diff --git a/module/forsus_properties.html b/module/forsus_properties.html index 0d5c22b..e298019 100644 --- a/module/forsus_properties.html +++ b/module/forsus_properties.html @@ -77,7 +77,7 @@

    forsus_properties
  • 5 statements + title=" 2.5% of total for modules and submodules.">5 statements
  • @@ -143,9 +143,9 @@

    Uses

    • @@ -527,7 +527,7 @@

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/module/forsus_properties_base.html b/module/forsus_properties_base.html index 8ff9da5..06a6a8c 100644 --- a/module/forsus_properties_base.html +++ b/module/forsus_properties_base.html @@ -77,7 +77,7 @@

      forsus_properties_base
    • 41 statements + title="20.6% of total for modules and submodules.">41 statements
    • @@ -658,7 +658,7 @@

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/module/forsus_properties_critical_constants.html b/module/forsus_properties_critical_constants.html index 6ab8041..f58adcf 100644 --- a/module/forsus_properties_critical_constants.html +++ b/module/forsus_properties_critical_constants.html @@ -77,7 +77,7 @@

      forsus_properties_critical_constants
    • 22 statements + title="11.1% of total for modules and submodules.">22 statements
    • @@ -663,7 +663,7 @@

      Arguments

      - + character(len=*), intent(in), @@ -706,7 +706,7 @@

      Arguments

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/module/forsus_properties_groups.html b/module/forsus_properties_groups.html index 7b090b6..7bd12c9 100644 --- a/module/forsus_properties_groups.html +++ b/module/forsus_properties_groups.html @@ -77,7 +77,7 @@

      forsus_properties_groups
    • 37 statements + title="18.6% of total for modules and submodules.">37 statements
    • @@ -660,7 +660,7 @@

      Arguments

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/module/forsus_properties_scalar.html b/module/forsus_properties_scalar.html index 4ad5cf8..53c68fa 100644 --- a/module/forsus_properties_scalar.html +++ b/module/forsus_properties_scalar.html @@ -77,7 +77,7 @@

      forsus_properties_scalar
    • 34 statements + title="17.1% of total for modules and submodules.">34 statements
    • @@ -164,8 +164,8 @@

      Uses

      • @@ -712,7 +712,7 @@

        Arguments

        Documentation generated by FORD - on 2024-04-03 17:11

        + on 2024-04-16 13:05


        diff --git a/module/forsus_substance.html b/module/forsus_substance.html index 119e104..94d44bf 100644 --- a/module/forsus_substance.html +++ b/module/forsus_substance.html @@ -77,7 +77,7 @@

        forsus_substance
      • 39 statements + title="23.6% of total for modules and submodules.">47 statements
      • @@ -572,7 +572,7 @@

        Arguments

        - + character(len=*), intent(in), @@ -795,7 +795,7 @@

        Arguments

        - + character(len=*), intent(in), @@ -859,7 +859,7 @@

        Documentation generated by FORD - on 2024-04-03 17:11

        + on 2024-04-16 13:05


        diff --git a/proc/from_json.html b/proc/from_json.html index 12a238d..3917f54 100644 --- a/proc/from_json.html +++ b/proc/from_json.html @@ -77,7 +77,7 @@

        from_json
      • 27 statements + title="23.5% of total for procedures.">27 statements
      • @@ -703,7 +703,7 @@

        Variables

        Documentation generated by FORD - on 2024-04-03 17:11

        + on 2024-04-16 13:05


        diff --git a/proc/from_json~2.html b/proc/from_json~2.html index 1a1e5fc..026be2f 100644 --- a/proc/from_json~2.html +++ b/proc/from_json~2.html @@ -77,7 +77,7 @@

        from_json
      • 9 statements + title=" 7.8% of total for procedures.">9 statements
      • @@ -188,7 +188,7 @@

        Arguments

        - + character(len=*), intent(in), @@ -387,6 +387,139 @@ +

        Solid arrows point from a procedure to one which it calls. Dashed +arrows point from an interface to procedures which implement that interface. +This could include the module procedures in a generic interface or the +implementation in a submodule of an interface in a parent module. +

        + + + + + + +
        +
        +

        Called by

        +
        +
        +
        + + + + + +proc~~from_json~2~~CalledByGraph + + + +proc~from_json~2 + +CriticalConstants%from_json + + + +proc~init_json + + +init_json + + + + + +proc~init_json->proc~from_json~2 + + + + + +interface~substance + + +Substance + + + + + +interface~substance->proc~init_json + + + + + +
        + Help +
        +
        diff --git a/proc/open_json.html b/proc/open_json.html index ca84fb6..8682ac8 100644 --- a/proc/open_json.html +++ b/proc/open_json.html @@ -77,7 +77,7 @@

        open_json
      • 22 statements + title="19.1% of total for procedures.">22 statements
      • @@ -144,9 +144,9 @@

        Uses

      • +

        diff --git a/proc/scalar_from_json.html b/proc/scalar_from_json.html index 7001243..70709d3 100644 --- a/proc/scalar_from_json.html +++ b/proc/scalar_from_json.html @@ -77,7 +77,7 @@

        scalar_from_json
      • 22 statements + title="19.1% of total for procedures.">22 statements
      • @@ -538,46 +538,46 @@

        Called by

        - - + + proc~~scalar_from_json~~CalledByGraph - + proc~scalar_from_json - -ScalarProperty%scalar_from_json + +ScalarProperty%scalar_from_json proc~from_json~2 - -CriticalConstants%from_json + +CriticalConstants%from_json proc~from_json~2->proc~scalar_from_json - - + + proc~init_json - -init_json + +init_json - + -proc~init_json->proc~scalar_from_json - - +proc~init_json->proc~from_json~2 + + @@ -591,8 +591,8 @@

        Called by

        interface~substance->proc~init_json - - + + @@ -740,7 +740,7 @@

        Variables

        Documentation generated by FORD - on 2024-04-03 17:11

        + on 2024-04-16 13:05


        diff --git a/search.html b/search.html index 2607f9c..29f514d 100644 --- a/search.html +++ b/search.html @@ -101,7 +101,7 @@

        Search Results

        Documentation generated by FORD - on 2024-04-03 17:11

        + on 2024-04-16 13:05


        diff --git a/sourcefile/base.f90.html b/sourcefile/base.f90.html index e5dbc4b..69e6146 100644 --- a/sourcefile/base.f90.html +++ b/sourcefile/base.f90.html @@ -77,7 +77,7 @@

        base.f90
      • 41 statements + title="20.6% of total for source files.">41 statements
      • @@ -249,11 +249,11 @@

        Files dependent on this one

        - + sourcefile~~base.f90~~AfferentGraph - + sourcefile~base.f90 @@ -336,16 +336,16 @@

        Files dependent on this one

        sourcefile~forsus.f90 - - -forsus.f90 + + +forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 - + @@ -360,8 +360,8 @@

        Files dependent on this one

        sourcefile~forsus.f90->sourcefile~substance.f90 - - + + @@ -508,7 +508,7 @@

        Source Code

        Documentation generated by FORD - on 2024-04-03 17:11

        + on 2024-04-16 13:05


        diff --git a/sourcefile/constants.f90.html b/sourcefile/constants.f90.html index 5ccd312..82b0297 100644 --- a/sourcefile/constants.f90.html +++ b/sourcefile/constants.f90.html @@ -77,7 +77,7 @@

        constants.f90
      • 7 statements + title=" 3.5% of total for source files.">7 statements
      • @@ -163,10 +163,10 @@

        Files dependent on this one

        --> - + viewBox="0.00 0.00 641.00 93.09" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + sourcefile~~constants.f90~~AfferentGraph - + sourcefile~constants.f90 @@ -191,16 +191,16 @@

        Files dependent on this one

        sourcefile~forsus.f90 - - -forsus.f90 + + +forsus.F90 sourcefile~forsus.f90->sourcefile~constants.f90 - + @@ -214,9 +214,9 @@

        Files dependent on this one

        sourcefile~forsus.f90->sourcefile~properties.f90 - - - + + + @@ -230,8 +230,8 @@

        Files dependent on this one

        sourcefile~forsus.f90->sourcefile~substance.f90 - - + + @@ -400,7 +400,7 @@

        Source Code

        Documentation generated by FORD - on 2024-04-03 17:11

        + on 2024-04-16 13:05


        diff --git a/sourcefile/critical_constants.f90.html b/sourcefile/critical_constants.f90.html index 52b48b8..c71baa4 100644 --- a/sourcefile/critical_constants.f90.html +++ b/sourcefile/critical_constants.f90.html @@ -77,7 +77,7 @@

        critical_constants.f90
      • 22 statements + title="11.1% of total for source files.">22 statements
      • @@ -285,11 +285,11 @@

        Files dependent on this one

        - + sourcefile~~critical_constants.f90~~AfferentGraph - + sourcefile~critical_constants.f90 @@ -314,16 +314,16 @@

        Files dependent on this one

        sourcefile~forsus.f90 - - -forsus.f90 + + +forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 - + @@ -338,8 +338,8 @@

        Files dependent on this one

        sourcefile~forsus.f90->sourcefile~substance.f90 - - + + @@ -448,7 +448,7 @@

        Source Code

        Documentation generated by FORD - on 2024-04-03 17:11

        + on 2024-04-16 13:05


        diff --git a/sourcefile/forsus.f90.html b/sourcefile/forsus.f90.html index 4d33800..c96a31d 100644 --- a/sourcefile/forsus.f90.html +++ b/sourcefile/forsus.f90.html @@ -10,7 +10,7 @@ - forsus.f90 – forsus + forsus.F90 – forsus @@ -65,7 +65,7 @@
        -

        forsus.f90 +

        forsus.F90 Source File

        @@ -77,19 +77,19 @@

        forsus.f90
      • 6 statements + title=" 3.0% of total for source files.">6 statements
      • - Source File + Source File
      @@ -140,7 +140,7 @@

      Modules

      Source Code

      @@ -163,15 +163,15 @@

      This file depends on

      --> - + viewBox="0.00 0.00 641.00 78.62" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + sourcefile~~forsus.f90~~EfferentGraph - + sourcefile~forsus.f90 - -forsus.f90 + +forsus.F90 @@ -185,7 +185,7 @@

      This file depends on

      sourcefile~forsus.f90->sourcefile~constants.f90 - + @@ -199,9 +199,9 @@

      This file depends on

      sourcefile~forsus.f90->sourcefile~properties.f90 - - - + + + @@ -215,8 +215,8 @@

      This file depends on

      sourcefile~forsus.f90->sourcefile~substance.f90 - - + + @@ -373,7 +373,7 @@

      Source Code

      use forsus_properties use forsus_substance - character(len=*), parameter :: version = "0.1.1" + character(len=*), parameter :: version = VERSION end module @@ -396,7 +396,7 @@

      Source Code

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/sourcefile/group.f90.html b/sourcefile/group.f90.html index f1782f9..69912cf 100644 --- a/sourcefile/group.f90.html +++ b/sourcefile/group.f90.html @@ -77,7 +77,7 @@

      group.f90
    • 37 statements + title="18.6% of total for source files.">37 statements
    • @@ -264,11 +264,11 @@

      Files dependent on this one

      - + sourcefile~~group.f90~~AfferentGraph - + sourcefile~group.f90 @@ -293,16 +293,16 @@

      Files dependent on this one

      sourcefile~forsus.f90 - - -forsus.f90 + + +forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 - + @@ -317,8 +317,8 @@

      Files dependent on this one

      sourcefile~forsus.f90->sourcefile~substance.f90 - - + + @@ -447,7 +447,7 @@

      Source Code

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/sourcefile/properties.f90.html b/sourcefile/properties.f90.html index 6723807..51e8a2f 100644 --- a/sourcefile/properties.f90.html +++ b/sourcefile/properties.f90.html @@ -77,7 +77,7 @@

      properties.f90
    • 5 statements + title=" 2.5% of total for source files.">5 statements
    • @@ -328,11 +328,11 @@

      Files dependent on this one

      - + sourcefile~~properties.f90~~AfferentGraph - + sourcefile~properties.f90 @@ -342,16 +342,16 @@

      Files dependent on this one

      sourcefile~forsus.f90 - - -forsus.f90 + + +forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 - + @@ -366,8 +366,8 @@

      Files dependent on this one

      sourcefile~forsus.f90->sourcefile~substance.f90 - - + + @@ -455,7 +455,7 @@

      Source Code

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/sourcefile/scalar_property.f90.html b/sourcefile/scalar_property.f90.html index 6a784b0..09c25b7 100644 --- a/sourcefile/scalar_property.f90.html +++ b/sourcefile/scalar_property.f90.html @@ -77,7 +77,7 @@

      scalar_property.f90
    • 34 statements + title="17.1% of total for source files.">34 statements
    • @@ -270,11 +270,11 @@

      Files dependent on this one

      - + sourcefile~~scalar_property.f90~~AfferentGraph - + sourcefile~scalar_property.f90 @@ -320,16 +320,16 @@

      Files dependent on this one

      sourcefile~forsus.f90 - - -forsus.f90 + + +forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 - + @@ -344,8 +344,8 @@

      Files dependent on this one

      sourcefile~forsus.f90->sourcefile~substance.f90 - - + + @@ -476,7 +476,7 @@

      Source Code

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/sourcefile/substance.f90.html b/sourcefile/substance.f90.html index 99cfa2f..694f4c5 100644 --- a/sourcefile/substance.f90.html +++ b/sourcefile/substance.f90.html @@ -77,7 +77,7 @@

      substance.f90
    • 39 statements + title="23.6% of total for source files.">47 statements
    • @@ -347,11 +347,11 @@

      Files dependent on this one

      - + sourcefile~~substance.f90~~AfferentGraph - + sourcefile~substance.f90 @@ -361,17 +361,17 @@

      Files dependent on this one

      sourcefile~forsus.f90 - - -forsus.f90 + + +forsus.F90 sourcefile~forsus.f90->sourcefile~substance.f90 - - + + @@ -470,7 +470,7 @@

      Source Code

      !! sus = Substance("1-butanol", path="the/json/is/here/") !! ``` !! - !! ### Extracting limited information + !! ### Extracting only specific information !! !! ```fortran !! use forsus, only: Substance @@ -485,61 +485,80 @@

      Source Code

      !! only_these(3) = "mathiascopeman" !! sus = Substance("1-butanol", only=only_these) !! ``` - character(len=:), allocatable :: name - !! Substance name - type(CriticalConstants) :: critical - !! Critical constants - type(ScalarProperty) :: parachor - !! Parachor - type(ScalarProperty) :: mathiascopeman(3) - !! Mathias Copeman \(\alpha\) function parameters - type(Groups) :: unifac_vle - !! UNIFAC-VLE model groups - end type - - ! Setting this interface allows to use `init_json` as the object init - interface Substance - module procedure :: init_json - end interface - -contains - - type(Substance) function init_json(name, path, only) - !! Initialize a Substance object from a json file, provided it's name. - !! It is also optional to use a custom path for the component. - character(len=*), intent(in) :: name - !! Component's name - character(len=*), optional, intent(in) :: path - !! Optional database path - character(len=*), optional, intent(in) :: only(:) - !! Only extract this parameters, the options are: - !! - !! - "critical": Tc, Pc and Acentric Factor - - character(len=:), allocatable :: file - integer :: i - - init_json%name = trim(name) - file = init_json%name // ".json" - - if (.not. present(only)) then - call init_json%parachor%from_json("Parachor", file, path) - call init_json%mathiascopeman(1)%from_json("MatthiasCopemanC1", file, path) - call init_json%mathiascopeman(2)%from_json("MatthiasCopemanC2", file, path) - call init_json%mathiascopeman(3)%from_json("MatthiasCopemanC3", file, path) - call init_json%unifac_vle%from_json("UnifacVLE", file, path) - call init_json%critical%from_json(file, path) - else - do i=1,size(only) - select case(only(i)) - case("critical") - call init_json%critical%from_json(init_json%name//".json", path) - end select - end do - end if - - end function -end module + !! + !! The available parameters to single extraction are: + !! + !! - "critical": Tc, Pc and Acentric Factor + !! - "unifac_vle": UNIFAC-VLE (Original UNIFAC) parameters + !! - "parachor": Parachor + !! - "mathiascopeman": Mathias Copeman \(\alpha\) function + !! parameters + character(len=:), allocatable :: name + !! Substance name + type(CriticalConstants) :: critical + !! Critical constants + type(ScalarProperty) :: parachor + !! Parachor + type(ScalarProperty) :: mathiascopeman(3) + !! Mathias Copeman \(\alpha\) function parameters + type(Groups) :: unifac_vle + !! UNIFAC-VLE model groups + end type + + ! Setting this interface allows to use `init_json` as the object init + interface Substance + module procedure :: init_json + end interface + +contains + + type(Substance) function init_json(name, path, only) + !! Initialize a Substance object from a json file, provided it's name. + !! It is also optional to use a custom path for the component. + character(len=*), intent(in) :: name + !! Component's name + character(len=*), optional, intent(in) :: path + !! Optional database path + character(len=*), optional, intent(in) :: only(:) + !! Only extract this parameters, the options are: + !! + !! - "critical": Tc, Pc and Acentric Factor + !! - "unifac_vle": UNIFAC-VLE (Original UNIFAC) parameters + !! - "parachor": Parachor + !! - "mathiascopeman": Mathias Copeman \(\alpha\) function + !! parameters + + character(len=:), allocatable :: file + integer :: i + + init_json%name = trim(name) + file = init_json%name // ".json" + + if (.not. present(only)) then + call init_json%critical%from_json(file, path) + call init_json%unifac_vle%from_json("UnifacVLE", file, path) + call init_json%parachor%from_json("Parachor", file, path) + call init_json%mathiascopeman(1)%from_json("MatthiasCopemanC1", file, path) + call init_json%mathiascopeman(2)%from_json("MatthiasCopemanC2", file, path) + call init_json%mathiascopeman(3)%from_json("MatthiasCopemanC3", file, path) + else + do i=1,size(only) + select case(trim(only(i))) + case("critical") + call init_json%critical%from_json(init_json%name//".json", path) + case("unifac_vle") + call init_json%unifac_vle%from_json("UnifacVLE", file, path) + case("mathiascopeman") + call init_json%mathiascopeman(1)%from_json("MatthiasCopemanC1", file, path) + call init_json%mathiascopeman(2)%from_json("MatthiasCopemanC2", file, path) + call init_json%mathiascopeman(3)%from_json("MatthiasCopemanC3", file, path) + case("parachor") + call init_json%parachor%from_json("Parachor", file, path) + end select + end do + end if + end function +end module @@ -561,7 +580,7 @@

      Source Code

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/src/forsus.f90 b/src/forsus.F90 similarity index 73% rename from src/forsus.f90 rename to src/forsus.F90 index 57f0417..3c14210 100644 --- a/src/forsus.f90 +++ b/src/forsus.F90 @@ -4,5 +4,5 @@ module forsus use forsus_properties use forsus_substance - character(len=*), parameter :: version = "0.1.1" + character(len=*), parameter :: version = VERSION end module \ No newline at end of file diff --git a/src/substance.f90 b/src/substance.f90 index 6816d2f..2f8f24f 100644 --- a/src/substance.f90 +++ b/src/substance.f90 @@ -42,7 +42,7 @@ module forsus_substance !! sus = Substance("1-butanol", path="the/json/is/here/") !! ``` !! - !! ### Extracting limited information + !! ### Extracting only specific information !! !! ```fortran !! use forsus, only: Substance @@ -57,6 +57,14 @@ module forsus_substance !! only_these(3) = "mathiascopeman" !! sus = Substance("1-butanol", only=only_these) !! ``` + !! + !! The available parameters to single extraction are: + !! + !! - "critical": Tc, Pc and Acentric Factor + !! - "unifac_vle": UNIFAC-VLE (Original UNIFAC) parameters + !! - "parachor": Parachor + !! - "mathiascopeman": Mathias Copeman \(\alpha\) function + !! parameters character(len=:), allocatable :: name !! Substance name type(CriticalConstants) :: critical @@ -87,6 +95,10 @@ type(Substance) function init_json(name, path, only) !! Only extract this parameters, the options are: !! !! - "critical": Tc, Pc and Acentric Factor + !! - "unifac_vle": UNIFAC-VLE (Original UNIFAC) parameters + !! - "parachor": Parachor + !! - "mathiascopeman": Mathias Copeman \(\alpha\) function + !! parameters character(len=:), allocatable :: file integer :: i @@ -95,20 +107,27 @@ type(Substance) function init_json(name, path, only) file = init_json%name // ".json" if (.not. present(only)) then + call init_json%critical%from_json(file, path) + call init_json%unifac_vle%from_json("UnifacVLE", file, path) call init_json%parachor%from_json("Parachor", file, path) call init_json%mathiascopeman(1)%from_json("MatthiasCopemanC1", file, path) call init_json%mathiascopeman(2)%from_json("MatthiasCopemanC2", file, path) call init_json%mathiascopeman(3)%from_json("MatthiasCopemanC3", file, path) - call init_json%unifac_vle%from_json("UnifacVLE", file, path) - call init_json%critical%from_json(file, path) else do i=1,size(only) - select case(only(i)) + select case(trim(only(i))) case("critical") call init_json%critical%from_json(init_json%name//".json", path) + case("unifac_vle") + call init_json%unifac_vle%from_json("UnifacVLE", file, path) + case("mathiascopeman") + call init_json%mathiascopeman(1)%from_json("MatthiasCopemanC1", file, path) + call init_json%mathiascopeman(2)%from_json("MatthiasCopemanC2", file, path) + call init_json%mathiascopeman(3)%from_json("MatthiasCopemanC3", file, path) + case("parachor") + call init_json%parachor%from_json("Parachor", file, path) end select end do end if - end function end module diff --git a/tipuesearch/tipuesearch_content.js b/tipuesearch/tipuesearch_content.js index 8bd84d4..0b3e085 100644 --- a/tipuesearch/tipuesearch_content.js +++ b/tipuesearch/tipuesearch_content.js @@ -1 +1 @@ -var tipuesearch = {"pages":[{"title":" forsus ","text":"forsus forsus The basics forsus Pure chemical compounds database and general API. forsus provides a simple API to read json files containing pure component\ninformation and later on use it inside other projects. The basics Using forsus in your Fortran project is relatively simple: All the readable parameters are kept on a Substance object, from which\nthey can be later on extracted. It keeps a global variable forsus_dir with should be the path of your database\nfile directory. data/json is the directory that the library uses by\ndefault. program main use forsus type ( Substance ) :: s ! This will use the default path s = Substance ( \"1-butanol\" ) ! This will use the defined path forsus_dir = \"my/json/files\" s = Substance ( \"1-butanol\" ) ! It is also possible to use a custom path sus = Substance ( \"1-butanol\" , path = \"the/json/is/here\" ) ! Show the critical temperature print * , sus % critical % critical_temperature % value end program Developer Info jscilipoti PhD in Chemical Engineering","tags":"home","loc":"index.html"},{"title":"ScalarProperty – forsus ","text":"type, public, extends( Property ) :: ScalarProperty Scalar property. A property with a single scalar value, like a critical constant. Inherits type~~scalarproperty~~InheritsGraph type~scalarproperty ScalarProperty type~property Property type~scalarproperty->type~property Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Inherited by type~~scalarproperty~~InheritedByGraph type~scalarproperty ScalarProperty type~criticalconstants CriticalConstants type~criticalconstants->type~scalarproperty critical_pressure, critical_temperature, critical_volume, acentric_factor type~substance Substance type~substance->type~scalarproperty parachor, mathiascopeman type~substance->type~criticalconstants critical Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units real(kind=pr), public :: value Property value Type-Bound Procedures procedure, public :: from_json => scalar_from_json public impure elemental subroutine scalar_from_json (self, name, json_str, path) Setup a scalar property from a provided json key and json file path. Arguments Type Intent Optional Attributes Name class( ScalarProperty ), intent(inout) :: self character(len=*), intent(in) :: name Property name. Should be the key in the json file. character(len=*), intent(in) :: json_str json file relative path to executable. character(len=*), intent(in), optional :: path json file relative path to executable.","tags":"","loc":"type/scalarproperty.html"},{"title":"Groups – forsus ","text":"type, public, extends( Property ) :: Groups Groups for a group-contribution based method. Inherits type~~groups~~InheritsGraph type~groups Groups type~property Property type~groups->type~property Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Inherited by type~~groups~~InheritedByGraph type~groups Groups type~substance Substance type~substance->type~groups unifac_vle Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial integer, public, allocatable :: counts (:) integer, public, allocatable :: ids (:) character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units Type-Bound Procedures procedure, public :: from_json public impure elemental subroutine from_json (self, name, json_str, path) From a json file and a model name set the present groups. Arguments Type Intent Optional Attributes Name class( Groups ), intent(inout) :: self Groups character(len=*), intent(in) :: name Model name character(len=*), intent(in) :: json_str json file character(len=*), intent(in), optional :: path Path to file","tags":"","loc":"type/groups.html"},{"title":"Property – forsus ","text":"type, public, abstract :: Property Property base type Define the basics that a property can have. Inherited by type~~property~~InheritedByGraph type~property Property type~groups Groups type~groups->type~property type~scalarproperty ScalarProperty type~scalarproperty->type~property type~criticalconstants CriticalConstants type~criticalconstants->type~scalarproperty critical_pressure, critical_temperature, critical_volume, acentric_factor type~substance Substance type~substance->type~groups unifac_vle type~substance->type~scalarproperty parachor, mathiascopeman type~substance->type~criticalconstants critical Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units Type-Bound Procedures procedure( abs_from_json ), public, deferred :: from_json impure elemental subroutine abs_from_json(self, name, json_str, path) Prototype How a Property reader routine is espected to work. A Property should be setted up by providing it’s name and a json file relative (or absolute) path. The Property instance\nname should be setted up inside the subroutine and later on\nthe Property value(s) should be read from the json file. Inside the subroutine the default forsus_dir path should be used\nbut it should also be possible to use an optional custom path. An example implementation can be seen at [scalar_from_json(subroutine)] Arguments Type Intent Optional Attributes Name class( Property ), intent(inout) :: self Property character(len=*), intent(in) :: name Property’s name ( json key) character(len=*), intent(in) :: json_str json file path character(len=*), intent(in), optional :: path Optional database path","tags":"","loc":"type/property.html"},{"title":"CriticalConstants – forsus ","text":"type, public :: CriticalConstants Critical constants Inherits type~~criticalconstants~~InheritsGraph type~criticalconstants CriticalConstants type~scalarproperty ScalarProperty type~criticalconstants->type~scalarproperty critical_pressure, critical_temperature, critical_volume, acentric_factor type~property Property type~scalarproperty->type~property Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Inherited by type~~criticalconstants~~InheritedByGraph type~criticalconstants CriticalConstants type~substance Substance type~substance->type~criticalconstants critical Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial type( ScalarProperty ), public :: acentric_factor Acentric Factor [adim] type( ScalarProperty ), public :: critical_pressure Critical Pressure [Pa] type( ScalarProperty ), public :: critical_temperature Critical Temperature [K] type( ScalarProperty ), public :: critical_volume Critical Volume [m3/kmol == L/mol] Type-Bound Procedures procedure, public :: from_json public impure elemental subroutine from_json (self, json_str, path) Read all the critical properties from a json file. Arguments Type Intent Optional Attributes Name class( CriticalConstants ), intent(inout) :: self character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path","tags":"","loc":"type/criticalconstants.html"},{"title":"Substance – forsus ","text":"type, public :: Substance Substance object. A Substance object holds all the defined properties available in the\npackage. It can be initialized either by hand or from a json file.\nTo initialize from a json file the user must provide a database\npath by setting up the variable forsus_dir . Then defining a \nSubstance by it’s name (which should be the same as the filename)\nwill find all the properties and set them up properly. When using a custom datafile it is very possible that the information\nin it is limited in comparison of what the original API provides.\nIn this case you it is possible to extract only the desired parameters\nwith the only argument. Strings for using only are: “critical”: Critical constants , , Examples Default behaviour use forsus , only : Substance , forsus_dir type ( Substance ) :: sus ! Set the path of the json files forsus_dir = \"some/directory/path\" ! Define your substance sus = Substance ( \"1-butanol\" ) Using a custom path for a single substance use forsus , only : Substance sus = Substance ( \"1-butanol\" , path = \"the/json/is/here/\" ) Extracting limited information use forsus , only : Substance character ( len = 50 ) :: only_these ( 3 ) ! Only extract the critical constants sus = Substance ( \"1-butanol\" , only = [ \"critical\" ]) ! Extracting a list of properties only_these ( 1 ) = \"critical\" only_these ( 2 ) = \"unifac\" only_these ( 3 ) = \"mathiascopeman\" sus = Substance ( \"1-butanol\" , only = only_these ) Inherits type~~substance~~InheritsGraph type~substance Substance type~criticalconstants CriticalConstants type~substance->type~criticalconstants critical type~groups Groups type~substance->type~groups unifac_vle type~scalarproperty ScalarProperty type~substance->type~scalarproperty parachor, mathiascopeman type~criticalconstants->type~scalarproperty critical_pressure, critical_temperature, critical_volume, acentric_factor type~property Property type~groups->type~property type~scalarproperty->type~property Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial type( CriticalConstants ), public :: critical Critical constants type( ScalarProperty ), public :: mathiascopeman (3) Mathias Copeman function parameters character(len=:), public, allocatable :: name Substance name type( ScalarProperty ), public :: parachor Parachor type( Groups ), public :: unifac_vle UNIFAC-VLE model groups Constructor public interface Substance public function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: Read more… Return Value type( Substance )","tags":"","loc":"type/substance.html"},{"title":"abs_from_json – forsus","text":"interface public impure elemental subroutine abs_from_json(self, name, json_str, path) Arguments Type Intent Optional Attributes Name class( Property ), intent(inout) :: self Property character(len=*), intent(in) :: name Property’s name ( json key) character(len=*), intent(in) :: json_str json file path character(len=*), intent(in), optional :: path Optional database path Description How a Property reader routine is espected to work. A Property should be setted up by providing it’s name and a json file relative (or absolute) path. The Property instance\nname should be setted up inside the subroutine and later on\nthe Property value(s) should be read from the json file. Inside the subroutine the default forsus_dir path should be used\nbut it should also be possible to use an optional custom path. An example implementation can be seen at [scalar_from_json(subroutine)]","tags":"","loc":"interface/abs_from_json.html"},{"title":"scalar_from_json – forsus","text":"public impure elemental subroutine scalar_from_json(self, name, json_str, path) Uses iso_fortran_env proc~~scalar_from_json~~UsesGraph proc~scalar_from_json ScalarProperty%scalar_from_json iso_fortran_env iso_fortran_env proc~scalar_from_json->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Setup a scalar property from a provided json key and json file path. Type Bound ScalarProperty Arguments Type Intent Optional Attributes Name class( ScalarProperty ), intent(inout) :: self character(len=*), intent(in) :: name Property name. Should be the key in the json file. character(len=*), intent(in) :: json_str json file relative path to executable. character(len=*), intent(in), optional :: path json file relative path to executable. Calls proc~~scalar_from_json~~CallsGraph proc~scalar_from_json ScalarProperty%scalar_from_json get get proc~scalar_from_json->get initialize initialize proc~scalar_from_json->initialize load_file load_file proc~scalar_from_json->load_file proc~open_json open_json proc~scalar_from_json->proc~open_json proc~open_json->initialize proc~open_json->load_file failed failed proc~open_json->failed Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Called by proc~~scalar_from_json~~CalledByGraph proc~scalar_from_json ScalarProperty%scalar_from_json proc~from_json~2 CriticalConstants%from_json proc~from_json~2->proc~scalar_from_json proc~init_json init_json proc~init_json->proc~scalar_from_json interface~substance Substance interface~substance->proc~init_json Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Variables Type Visibility Attributes Name Initial type(json_file), public :: json","tags":"","loc":"proc/scalar_from_json.html"},{"title":"from_json – forsus","text":"public impure elemental subroutine from_json(self, name, json_str, path) Uses json_module proc~~from_json~~UsesGraph proc~from_json Groups%from_json json_module json_module proc~from_json->json_module Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. From a json file and a model name set the present groups. Type Bound Groups Arguments Type Intent Optional Attributes Name class( Groups ), intent(inout) :: self Groups character(len=*), intent(in) :: name Model name character(len=*), intent(in) :: json_str json file character(len=*), intent(in), optional :: path Path to file Calls proc~~from_json~~CallsGraph proc~from_json Groups%from_json get get proc~from_json->get proc~open_json open_json proc~from_json->proc~open_json failed failed proc~open_json->failed initialize initialize proc~open_json->initialize load_file load_file proc~open_json->load_file Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Variables Type Visibility Attributes Name Initial character(len=:), public, allocatable :: base integer, public :: count logical, public :: found integer, public :: i integer, public :: id character(len=50), public :: idx type(json_file), public :: json character(len=:), public, allocatable :: str","tags":"","loc":"proc/from_json.html"},{"title":"open_json – forsus","text":"public function open_json(json_str, path) result(json) Uses forsus_constants iso_fortran_env json_module proc~~open_json~~UsesGraph proc~open_json open_json iso_fortran_env iso_fortran_env proc~open_json->iso_fortran_env json_module json_module proc~open_json->json_module module~forsus_constants forsus_constants proc~open_json->module~forsus_constants module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path Return Value type(json_file) Calls proc~~open_json~~CallsGraph proc~open_json open_json failed failed proc~open_json->failed initialize initialize proc~open_json->initialize load_file load_file proc~open_json->load_file Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Called by proc~~open_json~~CalledByGraph proc~open_json open_json proc~from_json Groups%from_json proc~from_json->proc~open_json proc~scalar_from_json ScalarProperty%scalar_from_json proc~scalar_from_json->proc~open_json proc~from_json~2 CriticalConstants%from_json proc~from_json~2->proc~scalar_from_json proc~init_json init_json proc~init_json->proc~scalar_from_json interface~substance Substance interface~substance->proc~init_json Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module.","tags":"","loc":"proc/open_json.html"},{"title":"from_json – forsus","text":"public impure elemental subroutine from_json(self, json_str, path) Read all the critical properties from a json file. Type Bound CriticalConstants Arguments Type Intent Optional Attributes Name class( CriticalConstants ), intent(inout) :: self character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path Calls proc~~from_json~2~~CallsGraph proc~from_json~2 CriticalConstants%from_json proc~scalar_from_json ScalarProperty%scalar_from_json proc~from_json~2->proc~scalar_from_json get get proc~scalar_from_json->get initialize initialize proc~scalar_from_json->initialize load_file load_file proc~scalar_from_json->load_file proc~open_json open_json proc~scalar_from_json->proc~open_json proc~open_json->initialize proc~open_json->load_file failed failed proc~open_json->failed Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module.","tags":"","loc":"proc/from_json~2.html"},{"title":"init_json – forsus","text":"public function init_json(name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: “critical”: Tc, Pc and Acentric Factor Return Value type( Substance ) Calls proc~~init_json~~CallsGraph proc~init_json init_json proc~scalar_from_json ScalarProperty%scalar_from_json proc~init_json->proc~scalar_from_json get get proc~scalar_from_json->get initialize initialize proc~scalar_from_json->initialize load_file load_file proc~scalar_from_json->load_file proc~open_json open_json proc~scalar_from_json->proc~open_json proc~open_json->initialize proc~open_json->load_file failed failed proc~open_json->failed Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Called by proc~~init_json~~CalledByGraph proc~init_json init_json interface~substance Substance interface~substance->proc~init_json Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Variables Type Visibility Attributes Name Initial character(len=:), public, allocatable :: file integer, public :: i","tags":"","loc":"proc/init_json.html"},{"title":"Substance – forsus","text":"public interface Substance Calls interface~~substance~~CallsGraph interface~substance Substance proc~init_json init_json interface~substance->proc~init_json proc~scalar_from_json ScalarProperty%scalar_from_json proc~init_json->proc~scalar_from_json get get proc~scalar_from_json->get initialize initialize proc~scalar_from_json->initialize load_file load_file proc~scalar_from_json->load_file proc~open_json open_json proc~scalar_from_json->proc~open_json proc~open_json->initialize proc~open_json->load_file failed failed proc~open_json->failed Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Module Procedures public function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: Read more… Return Value type( Substance )","tags":"","loc":"interface/substance.html"},{"title":"forsus_properties_scalar – forsus","text":"Uses forsus_constants json_module forsus_properties_base module~~forsus_properties_scalar~~UsesGraph module~forsus_properties_scalar forsus_properties_scalar json_module json_module module~forsus_properties_scalar->json_module module~forsus_constants forsus_constants module~forsus_properties_scalar->module~forsus_constants module~forsus_properties_base forsus_properties_base module~forsus_properties_scalar->module~forsus_properties_base iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_properties_scalar~~UsedByGraph module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties forsus_properties module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Derived Types type, public, extends( Property ) :: ScalarProperty Scalar property. Read more… Components Type Visibility Attributes Name Initial character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units real(kind=pr), public :: value Property value Type-Bound Procedures procedure, public :: from_json => scalar_from_json Subroutines public impure elemental subroutine scalar_from_json (self, name, json_str, path) Setup a scalar property from a provided json key and json file path. Arguments Type Intent Optional Attributes Name class( ScalarProperty ), intent(inout) :: self character(len=*), intent(in) :: name Property name. Should be the key in the json file. character(len=*), intent(in) :: json_str json file relative path to executable. character(len=*), intent(in), optional :: path json file relative path to executable.","tags":"","loc":"module/forsus_properties_scalar.html"},{"title":"forsus_properties_groups – forsus","text":"Uses forsus_properties_base module~~forsus_properties_groups~~UsesGraph module~forsus_properties_groups forsus_properties_groups module~forsus_properties_base forsus_properties_base module~forsus_properties_groups->module~forsus_properties_base Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_properties_groups~~UsedByGraph module~forsus_properties_groups forsus_properties_groups module~forsus_properties forsus_properties module~forsus_properties->module~forsus_properties_groups module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Derived Types type, public, extends( Property ) :: Groups Groups for a group-contribution based method. Components Type Visibility Attributes Name Initial integer, public, allocatable :: counts (:) integer, public, allocatable :: ids (:) character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units Type-Bound Procedures procedure, public :: from_json Subroutines public impure elemental subroutine from_json (self, name, json_str, path) From a json file and a model name set the present groups. Arguments Type Intent Optional Attributes Name class( Groups ), intent(inout) :: self Groups character(len=*), intent(in) :: name Model name character(len=*), intent(in) :: json_str json file character(len=*), intent(in), optional :: path Path to file","tags":"","loc":"module/forsus_properties_groups.html"},{"title":"forsus_constants – forsus","text":"Package’s constants. Uses iso_fortran_env module~~forsus_constants~~UsesGraph module~forsus_constants forsus_constants iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_constants~~UsedByGraph module~forsus_constants forsus_constants module~forsus forsus module~forsus->module~forsus_constants module~forsus_properties forsus_properties module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties_scalar->module~forsus_constants proc~open_json open_json proc~open_json->module~forsus_constants module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Variables Type Visibility Attributes Name Initial character(len=*), public, parameter :: forsus_default_dir = \"data/json\" Default database directory. Right now only works for development\nmode character(len=:), public, allocatable :: forsus_dir Custom database directory integer, public, parameter :: pr = real64 Real precision (double)","tags":"","loc":"module/forsus_constants.html"},{"title":"forsus_properties_base – forsus","text":"Basic definition of a Property Used by module~~forsus_properties_base~~UsedByGraph module~forsus_properties_base forsus_properties_base module~forsus_properties_groups forsus_properties_groups module~forsus_properties_groups->module~forsus_properties_base module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties_scalar->module~forsus_properties_base module~forsus_properties forsus_properties module~forsus_properties->module~forsus_properties_groups module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Abstract Interfaces abstract interface public impure elemental subroutine abs_from_json(self, name, json_str, path) How a Property reader routine is espected to work. A Property should be setted up by providing it’s name and a json file relative (or absolute) path. The Property instance\nname should be setted up inside the subroutine and later on\nthe Property value(s) should be read from the json file. Inside the subroutine the default forsus_dir path should be used\nbut it should also be possible to use an optional custom path. An example implementation can be seen at [scalar_from_json(subroutine)] Arguments Type Intent Optional Attributes Name class( Property ), intent(inout) :: self Property character(len=*), intent(in) :: name Property’s name ( json key) character(len=*), intent(in) :: json_str json file path character(len=*), intent(in), optional :: path Optional database path Derived Types type, public, abstract :: Property Property base type Read more… Components Type Visibility Attributes Name Initial character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units Type-Bound Procedures procedure( abs_from_json ), public, deferred :: from_json Functions public function open_json (json_str, path) result(json) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path Return Value type(json_file)","tags":"","loc":"module/forsus_properties_base.html"},{"title":"forsus_properties_critical_constants – forsus","text":"Uses forsus_properties_scalar module~~forsus_properties_critical_constants~~UsesGraph module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties_critical_constants->module~forsus_properties_scalar json_module json_module module~forsus_properties_scalar->json_module module~forsus_constants forsus_constants module~forsus_properties_scalar->module~forsus_constants module~forsus_properties_base forsus_properties_base module~forsus_properties_scalar->module~forsus_properties_base iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_properties_critical_constants~~UsedByGraph module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties forsus_properties module~forsus_properties->module~forsus_properties_critical_constants module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Derived Types type, public :: CriticalConstants Critical constants Components Type Visibility Attributes Name Initial type( ScalarProperty ), public :: acentric_factor Acentric Factor [adim] type( ScalarProperty ), public :: critical_pressure Critical Pressure [Pa] type( ScalarProperty ), public :: critical_temperature Critical Temperature [K] type( ScalarProperty ), public :: critical_volume Critical Volume [m3/kmol == L/mol] Type-Bound Procedures procedure, public :: from_json Subroutines public impure elemental subroutine from_json (self, json_str, path) Read all the critical properties from a json file. Arguments Type Intent Optional Attributes Name class( CriticalConstants ), intent(inout) :: self character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path","tags":"","loc":"module/forsus_properties_critical_constants.html"},{"title":"forsus – forsus","text":"ForSus: Fortran substance properties. Uses forsus_properties forsus_constants forsus_substance module~~forsus~~UsesGraph module~forsus forsus module~forsus_constants forsus_constants module~forsus->module~forsus_constants module~forsus_properties forsus_properties module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_groups forsus_properties_groups module~forsus_properties->module~forsus_properties_groups module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties->module~forsus_properties_scalar module~forsus_substance->module~forsus_properties module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus_properties_base forsus_properties_base module~forsus_properties_groups->module~forsus_properties_base module~forsus_properties_scalar->module~forsus_constants json_module json_module module~forsus_properties_scalar->json_module module~forsus_properties_scalar->module~forsus_properties_base Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Variables Type Visibility Attributes Name Initial character(len=*), public, parameter :: version = \"0.1.1\"","tags":"","loc":"module/forsus.html"},{"title":"forsus_substance – forsus","text":"Uses forsus_properties module~~forsus_substance~~UsesGraph module~forsus_substance forsus_substance module~forsus_properties forsus_properties module~forsus_substance->module~forsus_properties module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_groups forsus_properties_groups module~forsus_properties->module~forsus_properties_groups module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus_properties_base forsus_properties_base module~forsus_properties_groups->module~forsus_properties_base json_module json_module module~forsus_properties_scalar->json_module module~forsus_constants forsus_constants module~forsus_properties_scalar->module~forsus_constants module~forsus_properties_scalar->module~forsus_properties_base iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_substance~~UsedByGraph module~forsus_substance forsus_substance module~forsus forsus module~forsus->module~forsus_substance Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Interfaces public interface Substance public function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: Read more… Return Value type( Substance ) Derived Types type, public :: Substance Substance object. Read more… Components Type Visibility Attributes Name Initial type( CriticalConstants ), public :: critical Critical constants type( ScalarProperty ), public :: mathiascopeman (3) Mathias Copeman function parameters character(len=:), public, allocatable :: name Substance name type( ScalarProperty ), public :: parachor Parachor type( Groups ), public :: unifac_vle UNIFAC-VLE model groups Constructor public\n\n \n function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Functions public function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: Read more… Return Value type( Substance )","tags":"","loc":"module/forsus_substance.html"},{"title":"forsus_properties – forsus","text":"Possible properties defined in the package. Uses forsus_properties_scalar forsus_properties_critical_constants forsus_properties_groups module~~forsus_properties~~UsesGraph module~forsus_properties forsus_properties module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_groups forsus_properties_groups module~forsus_properties->module~forsus_properties_groups module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus_properties_base forsus_properties_base module~forsus_properties_groups->module~forsus_properties_base json_module json_module module~forsus_properties_scalar->json_module module~forsus_constants forsus_constants module~forsus_properties_scalar->module~forsus_constants module~forsus_properties_scalar->module~forsus_properties_base iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_properties~~UsedByGraph module~forsus_properties forsus_properties module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses.","tags":"","loc":"module/forsus_properties.html"},{"title":"scalar_property.f90 – forsus","text":"This file depends on sourcefile~~scalar_property.f90~~EfferentGraph sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~scalar_property.f90~~AfferentGraph sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90 properties.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~forsus.f90 forsus.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties_scalar use forsus_constants , only : pr , forsus_default_dir , forsus_dir use forsus_properties_base , only : Property , open_json use json_module , only : json_file implicit none type , extends ( Property ) :: ScalarProperty !! Scalar property. !! !! A property with a single scalar value, like a critical constant. real ( pr ) :: value !! Property value contains procedure :: from_json => scalar_from_json end type ScalarProperty contains impure elemental subroutine scalar_from_json ( self , name , json_str , path ) !! Setup a scalar property from a provided json key and json file path. use iso_fortran_env , only : error_unit class ( ScalarProperty ), intent ( in out ) :: self character ( len =* ), intent ( in ) :: name !! Property name. Should be the key in the `json` file. character ( len =* ), intent ( in ) :: json_str !! `json` file relative path to executable. character ( len =* ), optional , intent ( in ) :: path !! `json` file relative path to executable. type ( json_file ) :: json self % name = name json = open_json ( json_str , path ) call json % initialize () if ( present ( path )) then call json % load_file ( path // \"/\" // json_str ) else if ( allocated ( forsus_dir )) then call json % load_file ( forsus_dir // \"/\" // json_str ) else call json % load_file ( forsus_default_dir // \"/\" // json_str ) end if end if call json % get ( self % name // \".value(1)\" , self % value ) call json % get ( self % name // \".units\" , self % units ) end subroutine scalar_from_json end module forsus_properties_scalar","tags":"","loc":"sourcefile/scalar_property.f90.html"},{"title":"group.f90 – forsus","text":"This file depends on sourcefile~~group.f90~~EfferentGraph sourcefile~group.f90 group.f90 sourcefile~base.f90 base.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~group.f90~~AfferentGraph sourcefile~group.f90 group.f90 sourcefile~properties.f90 properties.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~forsus.f90 forsus.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties_groups use forsus_properties_base , only : Property , open_json type , extends ( Property ) :: Groups !! Groups for a group-contribution based method. integer , allocatable :: ids (:) integer , allocatable :: counts (:) contains procedure :: from_json end type Groups contains impure elemental subroutine from_json ( self , name , json_str , path ) !! From a json file and a model name set the present groups. use json_module , only : json_array , json_file class ( Groups ), intent ( in out ) :: self !! Groups character ( len =* ), intent ( in ) :: name !! Model name character ( len =* ), intent ( in ) :: json_str !! `json` file character ( len =* ), optional , intent ( in ) :: path !! Path to file type ( json_file ) :: json integer :: i , id , count logical :: found character ( len = :), allocatable :: base , str character ( len = 50 ) :: idx ! Initialize empty arrays allocate ( self % ids ( 0 )) allocate ( self % counts ( 0 )) json = open_json ( json_str , path ) base = name // \".group(\" i = 1 do write ( idx , * ) i str = base // trim ( adjustl ( idx )) // \")\" call json % get ( str // \".id\" , id , found = found ) call json % get ( str // \".value\" , count , found = found ) if (. not . found ) exit self % ids = [ self % ids , id ] self % counts = [ self % counts , count ] i = i + 1 end do end subroutine from_json end module forsus_properties_groups","tags":"","loc":"sourcefile/group.f90.html"},{"title":"constants.f90 – forsus","text":"Files dependent on this one sourcefile~~constants.f90~~AfferentGraph sourcefile~constants.f90 constants.f90 sourcefile~base.f90 base.f90 sourcefile~base.f90->sourcefile~constants.f90 sourcefile~forsus.f90 forsus.f90 sourcefile~forsus.f90->sourcefile~constants.f90 sourcefile~properties.f90 properties.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~group.f90 group.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_constants !! Package's constants. use iso_fortran_env , only : real64 implicit none integer , parameter :: pr = real64 !! Real precision (double) character ( len = :), allocatable :: forsus_dir !! Custom database directory character ( len =* ), parameter :: forsus_default_dir = \"data/json\" !! Default database directory. Right now only works for development !! mode end module","tags":"","loc":"sourcefile/constants.f90.html"},{"title":"base.f90 – forsus","text":"This file depends on sourcefile~~base.f90~~EfferentGraph sourcefile~base.f90 base.f90 sourcefile~constants.f90 constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~base.f90~~AfferentGraph sourcefile~base.f90 base.f90 sourcefile~group.f90 group.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90 properties.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~forsus.f90 forsus.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties_base !! Basic definition of a Property implicit none type , abstract :: Property !! Property base type !! !! Define the basics that a property can have. character ( len = :), allocatable :: name !! Property's name character ( len = :), allocatable :: units !! Units contains procedure ( abs_from_json ), deferred :: from_json end type Property abstract interface impure elemental subroutine abs_from_json ( self , name , json_str , path ) !! How a Property reader routine is espected to work. !! !! A Property should be setted up by providing it's name and a !! `json` file relative (or absolute) path. The Property instance !! name should be setted up inside the subroutine and later on !! the Property value(s) should be read from the `json` file. !! !! Inside the subroutine the default `forsus_dir` path should be used !! but it should also be possible to use an optional custom path. !! !! An example implementation can be seen at [scalar_from_json(subroutine)] import Property class ( Property ), intent ( in out ) :: self !! Property character ( len =* ), intent ( in ) :: name !! Property's name (`json` key) character ( len =* ), intent ( in ) :: json_str !! `json` file path character ( len =* ), optional , intent ( in ) :: path !! Optional database path end subroutine abs_from_json end interface contains function open_json ( json_str , path ) result ( json ) use iso_fortran_env , only : error_unit use json_module , only : json_file use forsus_constants , only : forsus_default_dir , forsus_dir type ( json_file ) :: json character ( len =* ), intent ( in ) :: json_str character ( len =* ), optional , intent ( in ) :: path call json % initialize () if ( present ( path )) then call json % load_file ( path // \"/\" // json_str ) else if ( allocated ( forsus_dir )) then call json % load_file ( forsus_dir // \"/\" // json_str ) else call json % load_file ( forsus_default_dir // \"/\" // json_str ) end if end if if ( json % failed ()) then write ( error_unit , * ) \"ERROR: Invalid .json file: \" , json_str error stop 1 end if end function open_json end module forsus_properties_base","tags":"","loc":"sourcefile/base.f90.html"},{"title":"critical_constants.f90 – forsus","text":"This file depends on sourcefile~~critical_constants.f90~~EfferentGraph sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~critical_constants.f90~~AfferentGraph sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~properties.f90 properties.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~forsus.f90 forsus.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties_critical_constants use forsus_properties_scalar , only : ScalarProperty implicit none type :: CriticalConstants !! Critical constants type ( ScalarProperty ) :: critical_pressure !! Critical Pressure [Pa] type ( ScalarProperty ) :: critical_temperature !! Critical Temperature [K] type ( ScalarProperty ) :: critical_volume !! Critical Volume [m3/kmol == L/mol] type ( ScalarProperty ) :: acentric_factor !! Acentric Factor [adim] contains procedure :: from_json end type contains impure elemental subroutine from_json ( self , json_str , path ) !! Read all the critical properties from a `json` file. class ( CriticalConstants ), intent ( in out ) :: self character ( len =* ), intent ( in ) :: json_str character ( len =* ), optional , intent ( in ) :: path call self % critical_pressure % from_json ( \"CriticalPressure\" , json_str , path ) call self % critical_temperature % from_json ( \"CriticalTemperature\" , json_str , path ) call self % critical_volume % from_json ( \"CriticalVolume\" , json_str , path ) call self % acentric_factor % from_json ( \"AcentricityFactor\" , json_str , path ) end subroutine end module","tags":"","loc":"sourcefile/critical_constants.f90.html"},{"title":"forsus.f90 – forsus","text":"This file depends on sourcefile~~forsus.f90~~EfferentGraph sourcefile~forsus.f90 forsus.f90 sourcefile~constants.f90 constants.f90 sourcefile~forsus.f90->sourcefile~constants.f90 sourcefile~properties.f90 properties.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~group.f90 group.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~substance.f90->sourcefile~properties.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus !! ForSus: Fortran substance properties. use forsus_constants use forsus_properties use forsus_substance character ( len =* ), parameter :: version = \"0.1.1\" end module","tags":"","loc":"sourcefile/forsus.f90.html"},{"title":"substance.f90 – forsus","text":"This file depends on sourcefile~~substance.f90~~EfferentGraph sourcefile~substance.f90 substance.f90 sourcefile~properties.f90 properties.f90 sourcefile~substance.f90->sourcefile~properties.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~group.f90 group.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~substance.f90~~AfferentGraph sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90 forsus.f90 sourcefile~forsus.f90->sourcefile~substance.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_substance use forsus_properties , only : ScalarProperty , CriticalConstants , Groups implicit none type :: Substance !! Substance object. !! !! A Substance object holds all the defined properties available in the !! package. It can be initialized either by hand or from a json file. !! To initialize from a `json` file the user must provide a database !! path by setting up the variable `forsus_dir`. Then defining a !! Substance by it's name (which should be the same as the filename) !! will find all the properties and set them up properly. !! !! When using a custom datafile it is very possible that the information !! in it is limited in comparison of what the original API provides. !! In this case you it is possible to extract only the desired parameters !! with the `only` argument. !! !! Strings for using `only` are: !! !! - \"critical\": Critical constants P_c, T_c, \\omega !! !! ## Examples !! !! ### Default behaviour !! ```fortran !! use forsus, only: Substance, forsus_dir !! type(Substance) :: sus !! !! ! Set the path of the json files !! forsus_dir = \"some/directory/path\" !! !! ! Define your substance !! sus = Substance(\"1-butanol\") !! ``` !! !! ### Using a custom path for a single substance !! !! ```fortran !! use forsus, only: Substance !! sus = Substance(\"1-butanol\", path=\"the/json/is/here/\") !! ``` !! !! ### Extracting limited information !! !! ```fortran !! use forsus, only: Substance !! character(len=50) :: only_these(3) !! !! ! Only extract the critical constants !! sus = Substance(\"1-butanol\", only=[\"critical\"]) !! !! ! Extracting a list of properties !! only_these(1) = \"critical\" !! only_these(2) = \"unifac\" !! only_these(3) = \"mathiascopeman\" !! sus = Substance(\"1-butanol\", only=only_these) !! ``` character ( len = :), allocatable :: name !! Substance name type ( CriticalConstants ) :: critical !! Critical constants type ( ScalarProperty ) :: parachor !! Parachor type ( ScalarProperty ) :: mathiascopeman ( 3 ) !! Mathias Copeman \\alpha function parameters type ( Groups ) :: unifac_vle !! UNIFAC-VLE model groups end type ! Setting this interface allows to use `init_json` as the object init interface Substance module procedure :: init_json end interface contains type ( Substance ) function init_json ( name , path , only ) !! Initialize a Substance object from a json file, provided it's name. !! It is also optional to use a custom path for the component. character ( len =* ), intent ( in ) :: name !! Component's name character ( len =* ), optional , intent ( in ) :: path !! Optional database path character ( len =* ), optional , intent ( in ) :: only (:) !! Only extract this parameters, the options are: !! !! - \"critical\": Tc, Pc and Acentric Factor character ( len = :), allocatable :: file integer :: i init_json % name = trim ( name ) file = init_json % name // \".json\" if (. not . present ( only )) then call init_json % parachor % from_json ( \"Parachor\" , file , path ) call init_json % mathiascopeman ( 1 )% from_json ( \"MatthiasCopemanC1\" , file , path ) call init_json % mathiascopeman ( 2 )% from_json ( \"MatthiasCopemanC2\" , file , path ) call init_json % mathiascopeman ( 3 )% from_json ( \"MatthiasCopemanC3\" , file , path ) call init_json % unifac_vle % from_json ( \"UnifacVLE\" , file , path ) call init_json % critical % from_json ( file , path ) else do i = 1 , size ( only ) select case ( only ( i )) case ( \"critical\" ) call init_json % critical % from_json ( init_json % name // \".json\" , path ) end select end do end if end function end module","tags":"","loc":"sourcefile/substance.f90.html"},{"title":"properties.f90 – forsus","text":"This file depends on sourcefile~~properties.f90~~EfferentGraph sourcefile~properties.f90 properties.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~group.f90 group.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~properties.f90~~AfferentGraph sourcefile~properties.f90 properties.f90 sourcefile~forsus.f90 forsus.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties !! Possible properties defined in the package. use forsus_properties_scalar , only : ScalarProperty use forsus_properties_critical_constants , only : CriticalConstants use forsus_properties_groups , only : Groups end module","tags":"","loc":"sourcefile/properties.f90.html"}]} \ No newline at end of file +var tipuesearch = {"pages":[{"title":" forsus ","text":"forsus forsus The basics forsus Pure chemical compounds database and general API. forsus provides a simple API to read json files containing pure component\ninformation and later on use it inside other projects. The basics Using forsus in your Fortran project is relatively simple: All the readable parameters are kept on a Substance object, from which\nthey can be later on extracted. It keeps a global variable forsus_dir with should be the path of your database\nfile directory. data/json is the directory that the library uses by\ndefault. program main use forsus type ( Substance ) :: s ! This will use the default path s = Substance ( \"1-butanol\" ) ! This will use the defined path forsus_dir = \"my/json/files\" s = Substance ( \"1-butanol\" ) ! It is also possible to use a custom path sus = Substance ( \"1-butanol\" , path = \"the/json/is/here\" ) ! Show the critical temperature print * , sus % critical % critical_temperature % value end program Developer Info jscilipoti PhD in Chemical Engineering","tags":"home","loc":"index.html"},{"title":"ScalarProperty – forsus ","text":"type, public, extends( Property ) :: ScalarProperty Scalar property. A property with a single scalar value, like a critical constant. Inherits type~~scalarproperty~~InheritsGraph type~scalarproperty ScalarProperty type~property Property type~scalarproperty->type~property Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Inherited by type~~scalarproperty~~InheritedByGraph type~scalarproperty ScalarProperty type~criticalconstants CriticalConstants type~criticalconstants->type~scalarproperty critical_pressure, critical_temperature, critical_volume, acentric_factor type~substance Substance type~substance->type~scalarproperty parachor, mathiascopeman type~substance->type~criticalconstants critical Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units real(kind=pr), public :: value Property value Type-Bound Procedures procedure, public :: from_json => scalar_from_json public impure elemental subroutine scalar_from_json (self, name, json_str, path) Setup a scalar property from a provided json key and json file path. Arguments Type Intent Optional Attributes Name class( ScalarProperty ), intent(inout) :: self character(len=*), intent(in) :: name Property name. Should be the key in the json file. character(len=*), intent(in) :: json_str json file relative path to executable. character(len=*), intent(in), optional :: path json file relative path to executable.","tags":"","loc":"type/scalarproperty.html"},{"title":"Groups – forsus ","text":"type, public, extends( Property ) :: Groups Groups for a group-contribution based method. Inherits type~~groups~~InheritsGraph type~groups Groups type~property Property type~groups->type~property Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Inherited by type~~groups~~InheritedByGraph type~groups Groups type~substance Substance type~substance->type~groups unifac_vle Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial integer, public, allocatable :: counts (:) integer, public, allocatable :: ids (:) character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units Type-Bound Procedures procedure, public :: from_json public impure elemental subroutine from_json (self, name, json_str, path) From a json file and a model name set the present groups. Arguments Type Intent Optional Attributes Name class( Groups ), intent(inout) :: self Groups character(len=*), intent(in) :: name Model name character(len=*), intent(in) :: json_str json file character(len=*), intent(in), optional :: path Path to file","tags":"","loc":"type/groups.html"},{"title":"Property – forsus ","text":"type, public, abstract :: Property Property base type Define the basics that a property can have. Inherited by type~~property~~InheritedByGraph type~property Property type~groups Groups type~groups->type~property type~scalarproperty ScalarProperty type~scalarproperty->type~property type~criticalconstants CriticalConstants type~criticalconstants->type~scalarproperty critical_pressure, critical_temperature, critical_volume, acentric_factor type~substance Substance type~substance->type~groups unifac_vle type~substance->type~scalarproperty parachor, mathiascopeman type~substance->type~criticalconstants critical Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units Type-Bound Procedures procedure( abs_from_json ), public, deferred :: from_json impure elemental subroutine abs_from_json(self, name, json_str, path) Prototype How a Property reader routine is espected to work. A Property should be setted up by providing it’s name and a json file relative (or absolute) path. The Property instance\nname should be setted up inside the subroutine and later on\nthe Property value(s) should be read from the json file. Inside the subroutine the default forsus_dir path should be used\nbut it should also be possible to use an optional custom path. An example implementation can be seen at [scalar_from_json(subroutine)] Arguments Type Intent Optional Attributes Name class( Property ), intent(inout) :: self Property character(len=*), intent(in) :: name Property’s name ( json key) character(len=*), intent(in) :: json_str json file path character(len=*), intent(in), optional :: path Optional database path","tags":"","loc":"type/property.html"},{"title":"Substance – forsus ","text":"type, public :: Substance Substance object. A Substance object holds all the defined properties available in the\npackage. It can be initialized either by hand or from a json file.\nTo initialize from a json file the user must provide a database\npath by setting up the variable forsus_dir . Then defining a \nSubstance by it’s name (which should be the same as the filename)\nwill find all the properties and set them up properly. When using a custom datafile it is very possible that the information\nin it is limited in comparison of what the original API provides.\nIn this case you it is possible to extract only the desired parameters\nwith the only argument. Strings for using only are: “critical”: Critical constants , , Examples Default behaviour use forsus , only : Substance , forsus_dir type ( Substance ) :: sus ! Set the path of the json files forsus_dir = \"some/directory/path\" ! Define your substance sus = Substance ( \"1-butanol\" ) Using a custom path for a single substance use forsus , only : Substance sus = Substance ( \"1-butanol\" , path = \"the/json/is/here/\" ) Extracting only specific information use forsus , only : Substance character ( len = 50 ) :: only_these ( 3 ) ! Only extract the critical constants sus = Substance ( \"1-butanol\" , only = [ \"critical\" ]) ! Extracting a list of properties only_these ( 1 ) = \"critical\" only_these ( 2 ) = \"unifac\" only_these ( 3 ) = \"mathiascopeman\" sus = Substance ( \"1-butanol\" , only = only_these ) The available parameters to single extraction are: “critical”: Tc, Pc and Acentric Factor “unifac_vle”: UNIFAC-VLE (Original UNIFAC) parameters “parachor”: Parachor “mathiascopeman”: Mathias Copeman function\n parameters Inherits type~~substance~~InheritsGraph type~substance Substance type~criticalconstants CriticalConstants type~substance->type~criticalconstants critical type~groups Groups type~substance->type~groups unifac_vle type~scalarproperty ScalarProperty type~substance->type~scalarproperty parachor, mathiascopeman type~criticalconstants->type~scalarproperty critical_pressure, critical_temperature, critical_volume, acentric_factor type~property Property type~groups->type~property type~scalarproperty->type~property Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial type( CriticalConstants ), public :: critical Critical constants type( ScalarProperty ), public :: mathiascopeman (3) Mathias Copeman function parameters character(len=:), public, allocatable :: name Substance name type( ScalarProperty ), public :: parachor Parachor type( Groups ), public :: unifac_vle UNIFAC-VLE model groups Constructor public interface Substance public function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: Read more… Return Value type( Substance )","tags":"","loc":"type/substance.html"},{"title":"CriticalConstants – forsus ","text":"type, public :: CriticalConstants Critical constants Inherits type~~criticalconstants~~InheritsGraph type~criticalconstants CriticalConstants type~scalarproperty ScalarProperty type~criticalconstants->type~scalarproperty critical_pressure, critical_temperature, critical_volume, acentric_factor type~property Property type~scalarproperty->type~property Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Inherited by type~~criticalconstants~~InheritedByGraph type~criticalconstants CriticalConstants type~substance Substance type~substance->type~criticalconstants critical Help Graph Key Nodes of different colours represent the following: Graph Key Type Type This Page's Entity This Page's Entity Solid arrows point from a derived type to the parent type which it\nextends. Dashed arrows point from a derived type to the other\ntypes it contains as a components, with a label listing the name(s) of\nsaid component(s). Components Type Visibility Attributes Name Initial type( ScalarProperty ), public :: acentric_factor Acentric Factor [adim] type( ScalarProperty ), public :: critical_pressure Critical Pressure [Pa] type( ScalarProperty ), public :: critical_temperature Critical Temperature [K] type( ScalarProperty ), public :: critical_volume Critical Volume [m3/kmol == L/mol] Type-Bound Procedures procedure, public :: from_json public impure elemental subroutine from_json (self, json_str, path) Read all the critical properties from a json file. Arguments Type Intent Optional Attributes Name class( CriticalConstants ), intent(inout) :: self character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path","tags":"","loc":"type/criticalconstants.html"},{"title":"abs_from_json – forsus","text":"interface public impure elemental subroutine abs_from_json(self, name, json_str, path) Arguments Type Intent Optional Attributes Name class( Property ), intent(inout) :: self Property character(len=*), intent(in) :: name Property’s name ( json key) character(len=*), intent(in) :: json_str json file path character(len=*), intent(in), optional :: path Optional database path Description How a Property reader routine is espected to work. A Property should be setted up by providing it’s name and a json file relative (or absolute) path. The Property instance\nname should be setted up inside the subroutine and later on\nthe Property value(s) should be read from the json file. Inside the subroutine the default forsus_dir path should be used\nbut it should also be possible to use an optional custom path. An example implementation can be seen at [scalar_from_json(subroutine)]","tags":"","loc":"interface/abs_from_json.html"},{"title":"scalar_from_json – forsus","text":"public impure elemental subroutine scalar_from_json(self, name, json_str, path) Uses iso_fortran_env proc~~scalar_from_json~~UsesGraph proc~scalar_from_json ScalarProperty%scalar_from_json iso_fortran_env iso_fortran_env proc~scalar_from_json->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Setup a scalar property from a provided json key and json file path. Type Bound ScalarProperty Arguments Type Intent Optional Attributes Name class( ScalarProperty ), intent(inout) :: self character(len=*), intent(in) :: name Property name. Should be the key in the json file. character(len=*), intent(in) :: json_str json file relative path to executable. character(len=*), intent(in), optional :: path json file relative path to executable. Calls proc~~scalar_from_json~~CallsGraph proc~scalar_from_json ScalarProperty%scalar_from_json get get proc~scalar_from_json->get initialize initialize proc~scalar_from_json->initialize load_file load_file proc~scalar_from_json->load_file proc~open_json open_json proc~scalar_from_json->proc~open_json proc~open_json->initialize proc~open_json->load_file failed failed proc~open_json->failed Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Called by proc~~scalar_from_json~~CalledByGraph proc~scalar_from_json ScalarProperty%scalar_from_json proc~from_json~2 CriticalConstants%from_json proc~from_json~2->proc~scalar_from_json proc~init_json init_json proc~init_json->proc~from_json~2 interface~substance Substance interface~substance->proc~init_json Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Variables Type Visibility Attributes Name Initial type(json_file), public :: json","tags":"","loc":"proc/scalar_from_json.html"},{"title":"from_json – forsus","text":"public impure elemental subroutine from_json(self, name, json_str, path) Uses json_module proc~~from_json~~UsesGraph proc~from_json Groups%from_json json_module json_module proc~from_json->json_module Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. From a json file and a model name set the present groups. Type Bound Groups Arguments Type Intent Optional Attributes Name class( Groups ), intent(inout) :: self Groups character(len=*), intent(in) :: name Model name character(len=*), intent(in) :: json_str json file character(len=*), intent(in), optional :: path Path to file Calls proc~~from_json~~CallsGraph proc~from_json Groups%from_json get get proc~from_json->get proc~open_json open_json proc~from_json->proc~open_json failed failed proc~open_json->failed initialize initialize proc~open_json->initialize load_file load_file proc~open_json->load_file Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Variables Type Visibility Attributes Name Initial character(len=:), public, allocatable :: base integer, public :: count logical, public :: found integer, public :: i integer, public :: id character(len=50), public :: idx type(json_file), public :: json character(len=:), public, allocatable :: str","tags":"","loc":"proc/from_json.html"},{"title":"open_json – forsus","text":"public function open_json(json_str, path) result(json) Uses json_module forsus_constants iso_fortran_env proc~~open_json~~UsesGraph proc~open_json open_json iso_fortran_env iso_fortran_env proc~open_json->iso_fortran_env json_module json_module proc~open_json->json_module module~forsus_constants forsus_constants proc~open_json->module~forsus_constants module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path Return Value type(json_file) Calls proc~~open_json~~CallsGraph proc~open_json open_json failed failed proc~open_json->failed initialize initialize proc~open_json->initialize load_file load_file proc~open_json->load_file Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Called by proc~~open_json~~CalledByGraph proc~open_json open_json proc~from_json Groups%from_json proc~from_json->proc~open_json proc~scalar_from_json ScalarProperty%scalar_from_json proc~scalar_from_json->proc~open_json proc~from_json~2 CriticalConstants%from_json proc~from_json~2->proc~scalar_from_json proc~init_json init_json proc~init_json->proc~from_json~2 interface~substance Substance interface~substance->proc~init_json Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module.","tags":"","loc":"proc/open_json.html"},{"title":"init_json – forsus","text":"public function init_json(name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: “critical”: Tc, Pc and Acentric Factor “unifac_vle”: UNIFAC-VLE (Original UNIFAC) parameters “parachor”: Parachor “mathiascopeman”: Mathias Copeman function\n parameters Return Value type( Substance ) Calls proc~~init_json~~CallsGraph proc~init_json init_json proc~from_json~2 CriticalConstants%from_json proc~init_json->proc~from_json~2 proc~scalar_from_json ScalarProperty%scalar_from_json proc~from_json~2->proc~scalar_from_json get get proc~scalar_from_json->get initialize initialize proc~scalar_from_json->initialize load_file load_file proc~scalar_from_json->load_file proc~open_json open_json proc~scalar_from_json->proc~open_json proc~open_json->initialize proc~open_json->load_file failed failed proc~open_json->failed Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Called by proc~~init_json~~CalledByGraph proc~init_json init_json interface~substance Substance interface~substance->proc~init_json Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Variables Type Visibility Attributes Name Initial character(len=:), public, allocatable :: file integer, public :: i","tags":"","loc":"proc/init_json.html"},{"title":"Substance – forsus","text":"public interface Substance Calls interface~~substance~~CallsGraph interface~substance Substance proc~init_json init_json interface~substance->proc~init_json proc~from_json~2 CriticalConstants%from_json proc~init_json->proc~from_json~2 proc~scalar_from_json ScalarProperty%scalar_from_json proc~from_json~2->proc~scalar_from_json get get proc~scalar_from_json->get initialize initialize proc~scalar_from_json->initialize load_file load_file proc~scalar_from_json->load_file proc~open_json open_json proc~scalar_from_json->proc~open_json proc~open_json->initialize proc~open_json->load_file failed failed proc~open_json->failed Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Module Procedures public function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: Read more… Return Value type( Substance )","tags":"","loc":"interface/substance.html"},{"title":"from_json – forsus","text":"public impure elemental subroutine from_json(self, json_str, path) Read all the critical properties from a json file. Type Bound CriticalConstants Arguments Type Intent Optional Attributes Name class( CriticalConstants ), intent(inout) :: self character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path Calls proc~~from_json~2~~CallsGraph proc~from_json~2 CriticalConstants%from_json proc~scalar_from_json ScalarProperty%scalar_from_json proc~from_json~2->proc~scalar_from_json get get proc~scalar_from_json->get initialize initialize proc~scalar_from_json->initialize load_file load_file proc~scalar_from_json->load_file proc~open_json open_json proc~scalar_from_json->proc~open_json proc~open_json->initialize proc~open_json->load_file failed failed proc~open_json->failed Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Called by proc~~from_json~2~~CalledByGraph proc~from_json~2 CriticalConstants%from_json proc~init_json init_json proc~init_json->proc~from_json~2 interface~substance Substance interface~substance->proc~init_json Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module.","tags":"","loc":"proc/from_json~2.html"},{"title":"forsus_properties – forsus","text":"Possible properties defined in the package. Uses forsus_properties_groups forsus_properties_scalar forsus_properties_critical_constants module~~forsus_properties~~UsesGraph module~forsus_properties forsus_properties module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_groups forsus_properties_groups module~forsus_properties->module~forsus_properties_groups module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus_properties_base forsus_properties_base module~forsus_properties_groups->module~forsus_properties_base json_module json_module module~forsus_properties_scalar->json_module module~forsus_constants forsus_constants module~forsus_properties_scalar->module~forsus_constants module~forsus_properties_scalar->module~forsus_properties_base iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_properties~~UsedByGraph module~forsus_properties forsus_properties module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses.","tags":"","loc":"module/forsus_properties.html"},{"title":"forsus_properties_scalar – forsus","text":"Uses json_module forsus_constants forsus_properties_base module~~forsus_properties_scalar~~UsesGraph module~forsus_properties_scalar forsus_properties_scalar json_module json_module module~forsus_properties_scalar->json_module module~forsus_constants forsus_constants module~forsus_properties_scalar->module~forsus_constants module~forsus_properties_base forsus_properties_base module~forsus_properties_scalar->module~forsus_properties_base iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_properties_scalar~~UsedByGraph module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties forsus_properties module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Derived Types type, public, extends( Property ) :: ScalarProperty Scalar property. Read more… Components Type Visibility Attributes Name Initial character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units real(kind=pr), public :: value Property value Type-Bound Procedures procedure, public :: from_json => scalar_from_json Subroutines public impure elemental subroutine scalar_from_json (self, name, json_str, path) Setup a scalar property from a provided json key and json file path. Arguments Type Intent Optional Attributes Name class( ScalarProperty ), intent(inout) :: self character(len=*), intent(in) :: name Property name. Should be the key in the json file. character(len=*), intent(in) :: json_str json file relative path to executable. character(len=*), intent(in), optional :: path json file relative path to executable.","tags":"","loc":"module/forsus_properties_scalar.html"},{"title":"forsus – forsus","text":"ForSus: Fortran substance properties. Uses forsus_properties forsus_constants forsus_substance module~~forsus~~UsesGraph module~forsus forsus module~forsus_constants forsus_constants module~forsus->module~forsus_constants module~forsus_properties forsus_properties module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_groups forsus_properties_groups module~forsus_properties->module~forsus_properties_groups module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties->module~forsus_properties_scalar module~forsus_substance->module~forsus_properties module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus_properties_base forsus_properties_base module~forsus_properties_groups->module~forsus_properties_base module~forsus_properties_scalar->module~forsus_constants json_module json_module module~forsus_properties_scalar->json_module module~forsus_properties_scalar->module~forsus_properties_base Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Variables Type Visibility Attributes Name Initial character(len=*), public, parameter :: version = VERSION","tags":"","loc":"module/forsus.html"},{"title":"forsus_constants – forsus","text":"Package’s constants. Uses iso_fortran_env module~~forsus_constants~~UsesGraph module~forsus_constants forsus_constants iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_constants~~UsedByGraph module~forsus_constants forsus_constants module~forsus forsus module~forsus->module~forsus_constants module~forsus_properties forsus_properties module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties_scalar->module~forsus_constants proc~open_json open_json proc~open_json->module~forsus_constants module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Variables Type Visibility Attributes Name Initial character(len=*), public, parameter :: forsus_default_dir = \"data/json\" Default database directory. Right now only works for development\nmode character(len=:), public, allocatable :: forsus_dir Custom database directory integer, public, parameter :: pr = real64 Real precision (double)","tags":"","loc":"module/forsus_constants.html"},{"title":"forsus_properties_groups – forsus","text":"Uses forsus_properties_base module~~forsus_properties_groups~~UsesGraph module~forsus_properties_groups forsus_properties_groups module~forsus_properties_base forsus_properties_base module~forsus_properties_groups->module~forsus_properties_base Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_properties_groups~~UsedByGraph module~forsus_properties_groups forsus_properties_groups module~forsus_properties forsus_properties module~forsus_properties->module~forsus_properties_groups module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Derived Types type, public, extends( Property ) :: Groups Groups for a group-contribution based method. Components Type Visibility Attributes Name Initial integer, public, allocatable :: counts (:) integer, public, allocatable :: ids (:) character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units Type-Bound Procedures procedure, public :: from_json Subroutines public impure elemental subroutine from_json (self, name, json_str, path) From a json file and a model name set the present groups. Arguments Type Intent Optional Attributes Name class( Groups ), intent(inout) :: self Groups character(len=*), intent(in) :: name Model name character(len=*), intent(in) :: json_str json file character(len=*), intent(in), optional :: path Path to file","tags":"","loc":"module/forsus_properties_groups.html"},{"title":"forsus_properties_base – forsus","text":"Basic definition of a Property Used by module~~forsus_properties_base~~UsedByGraph module~forsus_properties_base forsus_properties_base module~forsus_properties_groups forsus_properties_groups module~forsus_properties_groups->module~forsus_properties_base module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties_scalar->module~forsus_properties_base module~forsus_properties forsus_properties module~forsus_properties->module~forsus_properties_groups module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Abstract Interfaces abstract interface public impure elemental subroutine abs_from_json(self, name, json_str, path) How a Property reader routine is espected to work. A Property should be setted up by providing it’s name and a json file relative (or absolute) path. The Property instance\nname should be setted up inside the subroutine and later on\nthe Property value(s) should be read from the json file. Inside the subroutine the default forsus_dir path should be used\nbut it should also be possible to use an optional custom path. An example implementation can be seen at [scalar_from_json(subroutine)] Arguments Type Intent Optional Attributes Name class( Property ), intent(inout) :: self Property character(len=*), intent(in) :: name Property’s name ( json key) character(len=*), intent(in) :: json_str json file path character(len=*), intent(in), optional :: path Optional database path Derived Types type, public, abstract :: Property Property base type Read more… Components Type Visibility Attributes Name Initial character(len=:), public, allocatable :: name Property’s name character(len=:), public, allocatable :: units Units Type-Bound Procedures procedure( abs_from_json ), public, deferred :: from_json Functions public function open_json (json_str, path) result(json) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path Return Value type(json_file)","tags":"","loc":"module/forsus_properties_base.html"},{"title":"forsus_substance – forsus","text":"Uses forsus_properties module~~forsus_substance~~UsesGraph module~forsus_substance forsus_substance module~forsus_properties forsus_properties module~forsus_substance->module~forsus_properties module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties->module~forsus_properties_critical_constants module~forsus_properties_groups forsus_properties_groups module~forsus_properties->module~forsus_properties_groups module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties->module~forsus_properties_scalar module~forsus_properties_critical_constants->module~forsus_properties_scalar module~forsus_properties_base forsus_properties_base module~forsus_properties_groups->module~forsus_properties_base json_module json_module module~forsus_properties_scalar->json_module module~forsus_constants forsus_constants module~forsus_properties_scalar->module~forsus_constants module~forsus_properties_scalar->module~forsus_properties_base iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_substance~~UsedByGraph module~forsus_substance forsus_substance module~forsus forsus module~forsus->module~forsus_substance Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Interfaces public interface Substance public function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: Read more… Return Value type( Substance ) Derived Types type, public :: Substance Substance object. Read more… Components Type Visibility Attributes Name Initial type( CriticalConstants ), public :: critical Critical constants type( ScalarProperty ), public :: mathiascopeman (3) Mathias Copeman function parameters character(len=:), public, allocatable :: name Substance name type( ScalarProperty ), public :: parachor Parachor type( Groups ), public :: unifac_vle UNIFAC-VLE model groups Constructor public\n\n \n function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Functions public function init_json (name, path, only) Initialize a Substance object from a json file, provided it’s name.\nIt is also optional to use a custom path for the component. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: name Component’s name character(len=*), intent(in), optional :: path Optional database path character(len=*), intent(in), optional :: only (:) Only extract this parameters, the options are: Read more… Return Value type( Substance )","tags":"","loc":"module/forsus_substance.html"},{"title":"forsus_properties_critical_constants – forsus","text":"Uses forsus_properties_scalar module~~forsus_properties_critical_constants~~UsesGraph module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties_scalar forsus_properties_scalar module~forsus_properties_critical_constants->module~forsus_properties_scalar json_module json_module module~forsus_properties_scalar->json_module module~forsus_constants forsus_constants module~forsus_properties_scalar->module~forsus_constants module~forsus_properties_base forsus_properties_base module~forsus_properties_scalar->module~forsus_properties_base iso_fortran_env iso_fortran_env module~forsus_constants->iso_fortran_env Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Used by module~~forsus_properties_critical_constants~~UsedByGraph module~forsus_properties_critical_constants forsus_properties_critical_constants module~forsus_properties forsus_properties module~forsus_properties->module~forsus_properties_critical_constants module~forsus forsus module~forsus->module~forsus_properties module~forsus_substance forsus_substance module~forsus->module~forsus_substance module~forsus_substance->module~forsus_properties Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Derived Types type, public :: CriticalConstants Critical constants Components Type Visibility Attributes Name Initial type( ScalarProperty ), public :: acentric_factor Acentric Factor [adim] type( ScalarProperty ), public :: critical_pressure Critical Pressure [Pa] type( ScalarProperty ), public :: critical_temperature Critical Temperature [K] type( ScalarProperty ), public :: critical_volume Critical Volume [m3/kmol == L/mol] Type-Bound Procedures procedure, public :: from_json Subroutines public impure elemental subroutine from_json (self, json_str, path) Read all the critical properties from a json file. Arguments Type Intent Optional Attributes Name class( CriticalConstants ), intent(inout) :: self character(len=*), intent(in) :: json_str character(len=*), intent(in), optional :: path","tags":"","loc":"module/forsus_properties_critical_constants.html"},{"title":"properties.f90 – forsus","text":"This file depends on sourcefile~~properties.f90~~EfferentGraph sourcefile~properties.f90 properties.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~group.f90 group.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~properties.f90~~AfferentGraph sourcefile~properties.f90 properties.f90 sourcefile~forsus.f90 forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties !! Possible properties defined in the package. use forsus_properties_scalar , only : ScalarProperty use forsus_properties_critical_constants , only : CriticalConstants use forsus_properties_groups , only : Groups end module","tags":"","loc":"sourcefile/properties.f90.html"},{"title":"scalar_property.f90 – forsus","text":"This file depends on sourcefile~~scalar_property.f90~~EfferentGraph sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~scalar_property.f90~~AfferentGraph sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90 properties.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~forsus.f90 forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties_scalar use forsus_constants , only : pr , forsus_default_dir , forsus_dir use forsus_properties_base , only : Property , open_json use json_module , only : json_file implicit none type , extends ( Property ) :: ScalarProperty !! Scalar property. !! !! A property with a single scalar value, like a critical constant. real ( pr ) :: value !! Property value contains procedure :: from_json => scalar_from_json end type ScalarProperty contains impure elemental subroutine scalar_from_json ( self , name , json_str , path ) !! Setup a scalar property from a provided json key and json file path. use iso_fortran_env , only : error_unit class ( ScalarProperty ), intent ( in out ) :: self character ( len =* ), intent ( in ) :: name !! Property name. Should be the key in the `json` file. character ( len =* ), intent ( in ) :: json_str !! `json` file relative path to executable. character ( len =* ), optional , intent ( in ) :: path !! `json` file relative path to executable. type ( json_file ) :: json self % name = name json = open_json ( json_str , path ) call json % initialize () if ( present ( path )) then call json % load_file ( path // \"/\" // json_str ) else if ( allocated ( forsus_dir )) then call json % load_file ( forsus_dir // \"/\" // json_str ) else call json % load_file ( forsus_default_dir // \"/\" // json_str ) end if end if call json % get ( self % name // \".value(1)\" , self % value ) call json % get ( self % name // \".units\" , self % units ) end subroutine scalar_from_json end module forsus_properties_scalar","tags":"","loc":"sourcefile/scalar_property.f90.html"},{"title":"forsus.F90 – forsus","text":"This file depends on sourcefile~~forsus.f90~~EfferentGraph sourcefile~forsus.f90 forsus.F90 sourcefile~constants.f90 constants.f90 sourcefile~forsus.f90->sourcefile~constants.f90 sourcefile~properties.f90 properties.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~group.f90 group.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~substance.f90->sourcefile~properties.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus !! ForSus: Fortran substance properties. use forsus_constants use forsus_properties use forsus_substance character ( len =* ), parameter :: version = VERSION end module","tags":"","loc":"sourcefile/forsus.f90.html"},{"title":"constants.f90 – forsus","text":"Files dependent on this one sourcefile~~constants.f90~~AfferentGraph sourcefile~constants.f90 constants.f90 sourcefile~base.f90 base.f90 sourcefile~base.f90->sourcefile~constants.f90 sourcefile~forsus.f90 forsus.F90 sourcefile~forsus.f90->sourcefile~constants.f90 sourcefile~properties.f90 properties.f90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~group.f90 group.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_constants !! Package's constants. use iso_fortran_env , only : real64 implicit none integer , parameter :: pr = real64 !! Real precision (double) character ( len = :), allocatable :: forsus_dir !! Custom database directory character ( len =* ), parameter :: forsus_default_dir = \"data/json\" !! Default database directory. Right now only works for development !! mode end module","tags":"","loc":"sourcefile/constants.f90.html"},{"title":"group.f90 – forsus","text":"This file depends on sourcefile~~group.f90~~EfferentGraph sourcefile~group.f90 group.f90 sourcefile~base.f90 base.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~group.f90~~AfferentGraph sourcefile~group.f90 group.f90 sourcefile~properties.f90 properties.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~forsus.f90 forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties_groups use forsus_properties_base , only : Property , open_json type , extends ( Property ) :: Groups !! Groups for a group-contribution based method. integer , allocatable :: ids (:) integer , allocatable :: counts (:) contains procedure :: from_json end type Groups contains impure elemental subroutine from_json ( self , name , json_str , path ) !! From a json file and a model name set the present groups. use json_module , only : json_array , json_file class ( Groups ), intent ( in out ) :: self !! Groups character ( len =* ), intent ( in ) :: name !! Model name character ( len =* ), intent ( in ) :: json_str !! `json` file character ( len =* ), optional , intent ( in ) :: path !! Path to file type ( json_file ) :: json integer :: i , id , count logical :: found character ( len = :), allocatable :: base , str character ( len = 50 ) :: idx ! Initialize empty arrays allocate ( self % ids ( 0 )) allocate ( self % counts ( 0 )) json = open_json ( json_str , path ) base = name // \".group(\" i = 1 do write ( idx , * ) i str = base // trim ( adjustl ( idx )) // \")\" call json % get ( str // \".id\" , id , found = found ) call json % get ( str // \".value\" , count , found = found ) if (. not . found ) exit self % ids = [ self % ids , id ] self % counts = [ self % counts , count ] i = i + 1 end do end subroutine from_json end module forsus_properties_groups","tags":"","loc":"sourcefile/group.f90.html"},{"title":"base.f90 – forsus","text":"This file depends on sourcefile~~base.f90~~EfferentGraph sourcefile~base.f90 base.f90 sourcefile~constants.f90 constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~base.f90~~AfferentGraph sourcefile~base.f90 base.f90 sourcefile~group.f90 group.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90 properties.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~forsus.f90 forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties_base !! Basic definition of a Property implicit none type , abstract :: Property !! Property base type !! !! Define the basics that a property can have. character ( len = :), allocatable :: name !! Property's name character ( len = :), allocatable :: units !! Units contains procedure ( abs_from_json ), deferred :: from_json end type Property abstract interface impure elemental subroutine abs_from_json ( self , name , json_str , path ) !! How a Property reader routine is espected to work. !! !! A Property should be setted up by providing it's name and a !! `json` file relative (or absolute) path. The Property instance !! name should be setted up inside the subroutine and later on !! the Property value(s) should be read from the `json` file. !! !! Inside the subroutine the default `forsus_dir` path should be used !! but it should also be possible to use an optional custom path. !! !! An example implementation can be seen at [scalar_from_json(subroutine)] import Property class ( Property ), intent ( in out ) :: self !! Property character ( len =* ), intent ( in ) :: name !! Property's name (`json` key) character ( len =* ), intent ( in ) :: json_str !! `json` file path character ( len =* ), optional , intent ( in ) :: path !! Optional database path end subroutine abs_from_json end interface contains function open_json ( json_str , path ) result ( json ) use iso_fortran_env , only : error_unit use json_module , only : json_file use forsus_constants , only : forsus_default_dir , forsus_dir type ( json_file ) :: json character ( len =* ), intent ( in ) :: json_str character ( len =* ), optional , intent ( in ) :: path call json % initialize () if ( present ( path )) then call json % load_file ( path // \"/\" // json_str ) else if ( allocated ( forsus_dir )) then call json % load_file ( forsus_dir // \"/\" // json_str ) else call json % load_file ( forsus_default_dir // \"/\" // json_str ) end if end if if ( json % failed ()) then write ( error_unit , * ) \"ERROR: Invalid .json file: \" , json_str error stop 1 end if end function open_json end module forsus_properties_base","tags":"","loc":"sourcefile/base.f90.html"},{"title":"substance.f90 – forsus","text":"This file depends on sourcefile~~substance.f90~~EfferentGraph sourcefile~substance.f90 substance.f90 sourcefile~properties.f90 properties.f90 sourcefile~substance.f90->sourcefile~properties.f90 sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~group.f90 group.f90 sourcefile~properties.f90->sourcefile~group.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~properties.f90->sourcefile~scalar_property.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~group.f90->sourcefile~base.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~substance.f90~~AfferentGraph sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90 forsus.F90 sourcefile~forsus.f90->sourcefile~substance.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_substance use forsus_properties , only : ScalarProperty , CriticalConstants , Groups implicit none type :: Substance !! Substance object. !! !! A Substance object holds all the defined properties available in the !! package. It can be initialized either by hand or from a json file. !! To initialize from a `json` file the user must provide a database !! path by setting up the variable `forsus_dir`. Then defining a !! Substance by it's name (which should be the same as the filename) !! will find all the properties and set them up properly. !! !! When using a custom datafile it is very possible that the information !! in it is limited in comparison of what the original API provides. !! In this case you it is possible to extract only the desired parameters !! with the `only` argument. !! !! Strings for using `only` are: !! !! - \"critical\": Critical constants P_c, T_c, \\omega !! !! ## Examples !! !! ### Default behaviour !! ```fortran !! use forsus, only: Substance, forsus_dir !! type(Substance) :: sus !! !! ! Set the path of the json files !! forsus_dir = \"some/directory/path\" !! !! ! Define your substance !! sus = Substance(\"1-butanol\") !! ``` !! !! ### Using a custom path for a single substance !! !! ```fortran !! use forsus, only: Substance !! sus = Substance(\"1-butanol\", path=\"the/json/is/here/\") !! ``` !! !! ### Extracting only specific information !! !! ```fortran !! use forsus, only: Substance !! character(len=50) :: only_these(3) !! !! ! Only extract the critical constants !! sus = Substance(\"1-butanol\", only=[\"critical\"]) !! !! ! Extracting a list of properties !! only_these(1) = \"critical\" !! only_these(2) = \"unifac\" !! only_these(3) = \"mathiascopeman\" !! sus = Substance(\"1-butanol\", only=only_these) !! ``` !! !! The available parameters to single extraction are: !! !! - \"critical\": Tc, Pc and Acentric Factor !! - \"unifac_vle\": UNIFAC-VLE (Original UNIFAC) parameters !! - \"parachor\": Parachor !! - \"mathiascopeman\": Mathias Copeman \\alpha function !! parameters character ( len = :), allocatable :: name !! Substance name type ( CriticalConstants ) :: critical !! Critical constants type ( ScalarProperty ) :: parachor !! Parachor type ( ScalarProperty ) :: mathiascopeman ( 3 ) !! Mathias Copeman \\alpha function parameters type ( Groups ) :: unifac_vle !! UNIFAC-VLE model groups end type ! Setting this interface allows to use `init_json` as the object init interface Substance module procedure :: init_json end interface contains type ( Substance ) function init_json ( name , path , only ) !! Initialize a Substance object from a json file, provided it's name. !! It is also optional to use a custom path for the component. character ( len =* ), intent ( in ) :: name !! Component's name character ( len =* ), optional , intent ( in ) :: path !! Optional database path character ( len =* ), optional , intent ( in ) :: only (:) !! Only extract this parameters, the options are: !! !! - \"critical\": Tc, Pc and Acentric Factor !! - \"unifac_vle\": UNIFAC-VLE (Original UNIFAC) parameters !! - \"parachor\": Parachor !! - \"mathiascopeman\": Mathias Copeman \\alpha function !! parameters character ( len = :), allocatable :: file integer :: i init_json % name = trim ( name ) file = init_json % name // \".json\" if (. not . present ( only )) then call init_json % critical % from_json ( file , path ) call init_json % unifac_vle % from_json ( \"UnifacVLE\" , file , path ) call init_json % parachor % from_json ( \"Parachor\" , file , path ) call init_json % mathiascopeman ( 1 )% from_json ( \"MatthiasCopemanC1\" , file , path ) call init_json % mathiascopeman ( 2 )% from_json ( \"MatthiasCopemanC2\" , file , path ) call init_json % mathiascopeman ( 3 )% from_json ( \"MatthiasCopemanC3\" , file , path ) else do i = 1 , size ( only ) select case ( trim ( only ( i ))) case ( \"critical\" ) call init_json % critical % from_json ( init_json % name // \".json\" , path ) case ( \"unifac_vle\" ) call init_json % unifac_vle % from_json ( \"UnifacVLE\" , file , path ) case ( \"mathiascopeman\" ) call init_json % mathiascopeman ( 1 )% from_json ( \"MatthiasCopemanC1\" , file , path ) call init_json % mathiascopeman ( 2 )% from_json ( \"MatthiasCopemanC2\" , file , path ) call init_json % mathiascopeman ( 3 )% from_json ( \"MatthiasCopemanC3\" , file , path ) case ( \"parachor\" ) call init_json % parachor % from_json ( \"Parachor\" , file , path ) end select end do end if end function end module","tags":"","loc":"sourcefile/substance.f90.html"},{"title":"critical_constants.f90 – forsus","text":"This file depends on sourcefile~~critical_constants.f90~~EfferentGraph sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~scalar_property.f90 scalar_property.f90 sourcefile~critical_constants.f90->sourcefile~scalar_property.f90 sourcefile~base.f90 base.f90 sourcefile~scalar_property.f90->sourcefile~base.f90 sourcefile~constants.f90 constants.f90 sourcefile~scalar_property.f90->sourcefile~constants.f90 sourcefile~base.f90->sourcefile~constants.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Files dependent on this one sourcefile~~critical_constants.f90~~AfferentGraph sourcefile~critical_constants.f90 critical_constants.f90 sourcefile~properties.f90 properties.f90 sourcefile~properties.f90->sourcefile~critical_constants.f90 sourcefile~forsus.f90 forsus.F90 sourcefile~forsus.f90->sourcefile~properties.f90 sourcefile~substance.f90 substance.f90 sourcefile~forsus.f90->sourcefile~substance.f90 sourcefile~substance.f90->sourcefile~properties.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Source Code module forsus_properties_critical_constants use forsus_properties_scalar , only : ScalarProperty implicit none type :: CriticalConstants !! Critical constants type ( ScalarProperty ) :: critical_pressure !! Critical Pressure [Pa] type ( ScalarProperty ) :: critical_temperature !! Critical Temperature [K] type ( ScalarProperty ) :: critical_volume !! Critical Volume [m3/kmol == L/mol] type ( ScalarProperty ) :: acentric_factor !! Acentric Factor [adim] contains procedure :: from_json end type contains impure elemental subroutine from_json ( self , json_str , path ) !! Read all the critical properties from a `json` file. class ( CriticalConstants ), intent ( in out ) :: self character ( len =* ), intent ( in ) :: json_str character ( len =* ), optional , intent ( in ) :: path call self % critical_pressure % from_json ( \"CriticalPressure\" , json_str , path ) call self % critical_temperature % from_json ( \"CriticalTemperature\" , json_str , path ) call self % critical_volume % from_json ( \"CriticalVolume\" , json_str , path ) call self % acentric_factor % from_json ( \"AcentricityFactor\" , json_str , path ) end subroutine end module","tags":"","loc":"sourcefile/critical_constants.f90.html"}]} \ No newline at end of file diff --git a/type/criticalconstants.html b/type/criticalconstants.html index 0119d63..b2162ad 100644 --- a/type/criticalconstants.html +++ b/type/criticalconstants.html @@ -558,7 +558,7 @@

      Arguments

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/type/groups.html b/type/groups.html index b02f0dc..af866d6 100644 --- a/type/groups.html +++ b/type/groups.html @@ -553,7 +553,7 @@

      Arguments

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/type/property.html b/type/property.html index 87bc5dc..a4a3feb 100644 --- a/type/property.html +++ b/type/property.html @@ -195,7 +195,7 @@

      Inherited by

      - + type~groups->type~property @@ -209,7 +209,7 @@

      Inherited by

      - + type~scalarproperty->type~property @@ -500,7 +500,7 @@

      Arguments

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/type/scalarproperty.html b/type/scalarproperty.html index 7f810ed..9072ef1 100644 --- a/type/scalarproperty.html +++ b/type/scalarproperty.html @@ -563,7 +563,7 @@

      Arguments

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05


      diff --git a/type/substance.html b/type/substance.html index a254241..d969759 100644 --- a/type/substance.html +++ b/type/substance.html @@ -197,7 +197,7 @@

      Using a custom path for a si sus = Substance("1-butanol", path="the/json/is/here/") -

      Extracting limited information

      +

      Extracting only specific information

      use forsus, only: Substance
       character(len=50) :: only_these(3)
       
      @@ -210,6 +210,15 @@ 

      Extracting limited information

      only_these(3) = "mathiascopeman" sus = Substance("1-butanol", only=only_these)
      + +

      The available parameters to single extraction are:

      +
        +
      • “critical”: Tc, Pc and Acentric Factor
      • +
      • “unifac_vle”: UNIFAC-VLE (Original UNIFAC) parameters
      • +
      • “parachor”: Parachor
      • +
      • “mathiascopeman”: Mathias Copeman function + parameters
      • +

      Inherits

      @@ -514,7 +523,7 @@

      Arguments

      - + character(len=*), intent(in), @@ -579,7 +588,7 @@

      Documentation generated by FORD - on 2024-04-03 17:11

      + on 2024-04-16 13:05