Menu

#204 Use of python libraries for material property laws compiled with python interfaces

3.4.0
closed
None
2021-08-16
2020-02-10
No

Hello Thomas,

I've tried to use python libraries in mfront to get some information from the .so, generated from a material property law.
I think the useful libraries are in tfel.system (in particular ExternalLibraryManager) but i don't find tutorials or any documentation about how to use in python these libraries...
Have you got any examples of these libraries' use ?
Thank you for your future answer and obviously for MFront in general.

Rémi Coustal

Mechanical engineer
Ceramic, Accidental and Modeling
Fuel Framatome

Discussion

  • Helfer Thomas

    Helfer Thomas - 2020-02-10

    Hi Rémi,

    Indeed, the class ExternalLibraryManager is the main entry point to read metadata about generated material properties. However, this class is not very handy .

    The ExternalMaterialPropertyDescription class can be more usefull in many cases, although far less developped than the ExternalBehaviourDescription class.

    Here is an example:

    from tfel.system import ExternalMaterialPropertyDescription
    mp = ExternalMaterialPropertyDescription('src/libCyranoInconel600.so',
                                             'Inconel600_YoungModulus')
    print(mp.arguments)
    

    One may have a look at the C++ implementation to see which feature of the ExternalLibraryManager are used:

          this->tfel_version = elm.getTFELVersion(l, f);
          this->build_id = elm.getBuildId(l, f);
          this->source = elm.getSource(l, f);
          this->mfront_interface = elm.getInterface(l, f);
          this->arguments = elm.getMaterialPropertyVariables(l, f);
    

    Thomas

     
  • Helfer Thomas

    Helfer Thomas - 2020-02-11

    Hi Rémi,
    just started this page http://tfel.sourceforge.net/TFELSystem.html
    Let us close this ticket when this page is finished, ok ?
    Thomas

     
  • Rémi Coustal

    Rémi Coustal - 2020-02-13

    Hi Thomas,
    Thank you for the doc page, i'm sure it will be useful !
    I let you close the ticket when the page is completed.
    Rémi

     
  • Helfer Thomas

    Helfer Thomas - 2020-02-13

    Great, let us this ticket to discuss what is missing/not documented.

     
  • Helfer Thomas

    Helfer Thomas - 2020-02-13
    • status: open --> accepted
    • assigned_to: Helfer Thomas
     
  • Helfer Thomas

    Helfer Thomas - 2020-11-13

    @rcoustal What shall we do with this ticket ?

     
  • Helfer Thomas

    Helfer Thomas - 2021-08-16
    • status: accepted --> closed
     

Log in to post a comment.