Skip to content
@Funz

Funz

Parametric scientific computing engine

TL;DR

Parametric scientific computing ?

  • Take a "parametrized" input file (contains $x, $y,... replacing some numerical values),
  • Define values taken by these parameter (or let a dedicated algorithm do),
  • Run calculations on remote ressources,
  • Parse results & analyse.

Funz eases this "functional" wrapping of your simulation.

Demo

  • Python: Open In Colab
  • R: Open In Colab

Examples

Funz makes your simulations callable as functions for any of cmd.exe / bash / python / R / Java:

  • From Excel spreadsheet "sheet.xlsx", get cell commented with "=total" for each 10 different values of cell commented with "$income": \
    Funz.bat Run -m Excel -if sheet.xlsx -iv income=10,20,30,35,40,42,45,47,50,52 -oe total`
  • Search convection coefficient which leads to a minimal temperature of 25.5 degrees with OpenModelica PDE solver: \
    Funz.sh RunDesign -m OpenModelica -if NewtonCooling.mo -iv convection=[0.5,1.0] -oe "min(T)" -d Brent -do ytarget=25.5`
  • Build a response surface of MySimulator for x1 in [-5,5] and x2 in [-5,5]:
    # pip install Funz
    import Funz
    X = {'x1':np.arange(-5, 5, 0.25),'x2':np.arange(-5, 5, 0.25)}
    y = Funz.Run(model="MySimulator",input_files=["inputfile1","inputfile2"],input_variables= X ,all_combinations=True)['y']
    # mplt.plot_surface(X['x1'], X['x2'], y)
  • Propagate x1 as uniform random and x2 as normal random uncertainties through MySimulator:
    # devtools::install_github("Funz/Funz.R")
    library(Funz)
    hist( Funz::Run(model="MySimulator",input.files=c("inputfile1","inputfile2"),input.variables= list(x1=runif(100),x2=rnorm(100)) )['y'] )
  • Chain simulations:
    # pip install Funz
    import Funz
    X = {'x1':..., 'x2':...}
    # first simulator, inputfile1 and inputfile2 contain 'x1' and 'x2' variables
    y1 = Funz.Run(model="MySimulator1",input_files=["inputfile1","inputfile2"],input_variables= X)['y']
    # second simulator, depends on results of first one also, inputfile3 contains 'x1', 'x2' and 'y1' variables
    y2 = Funz.Run(model="MySimulator2",input_files=["inputfile3"],input_variables= X.update(y1))['z']
    # post-processing in Excel (postrpro.xlsx sheet contains cells commented by '$x1' or '$x2'), returns cell value commented as "=result"
    result  = Funz.Run(model="Excel",input_files=["postpro.xlsx"],input_variables= X.update(y2))['result']

Pinned

  1. plugin-Modelica plugin-Modelica Public

    OpenModelica plugin for Funz

    C

  2. algorithm-Brent algorithm-Brent Public

    Brent (1D root finding) algorithm for Funz

    R

  3. plugin-Excel plugin-Excel Public

    Excel plugin for Funz

    Java

  4. plugin-template plugin-template Public template

    Generic template to implement a simulation plugin for Funz

    Batchfile

  5. algorithm-template algorithm-template Public template

    Generic template to implement a "design of experiments" algorithm for Funz

    R

  6. package-template package-template Public template

    Fork this ant project to generate your standard bundle (Funz + plugins)

    1

Repositories

Showing 10 of 36 repositories

Top languages

Loading…

Most used topics

Loading…