82 13
De : regis_anne.lebrun_dut...@yahoo.fr
[mailto:regis_anne.lebrun_dut...@yahoo.fr]
Envoyé : vendredi 3 août 2018 18:40
À : bou...@gmail.com; BAUDIN Michael
Cc : users@openturns.org
Objet : Re: [ot-users] Simplified symbolic functions
Hi Michael,
Try this:
import openturns as ot
Q = 1013.
Ks = 3
a'
What is the trick you used to make it work ?
(This is with OT 1.11).
Best regards,
Michaël
Michaël BAUDIN
Ingénieur - Chercheur
EDF – R&D
Département Management des Risques Industriels
6, quai Watier
78401 CHATOU
michael.bau...@edf.fr
Tél. : 01 30 87 81 82
Fax : 01 30 87 82 13
-M
;
What is the trick you used to make it work ?
(This is with OT 1.11).
Best regards,
Michaël
Michaël BAUDIN
Ingénieur - Chercheur
EDF – R&D
Département Management des Risques Industriels
6, quai Watier
78401 CHATOU
michael.bau...@edf.fr
Tél. : 01 30 87 81 82
Fax : 01 30 87 82 13
-Mes
--
De : bou...@gmail.com [mailto:bou...@gmail.com]
Envoyé : lundi 12 mars 2018 21:26
À : BAUDIN Michael
Cc : users@openturns.org
Objet : Re: [ot-users] Simplified symbolic functions
Hello Michael,
We investigated using ExprTk to parse analytical formulas instead of muParser,
it is known to be f
Hello Michael,
We investigated using ExprTk to parse analytical formulas instead of
muParser, it is known to be faster.
Almost all muParser formulas can be parsed by ExprTk without changes,
but it also provides many more features. And multiple outputs are
trivial with this backend.
This has been
Hi Michael,
You can try this:
from openturns import *from math import sqrt
def functionCrue(X) :
Q, Ks, Zv, Zm, Hd, Zb, L, B = X
alpha = (Zm - Zv)/L
H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)
Zc = H + Zv
Zd = Zb + Hd
S = Zc - Zd
return [H,S]
myFunction = PythonFunction(8, 2,
Hello,
You can use intermediate variables using multiple expressions with the comma separator:
>>> f=ot.SymbolicFunction(['x1', 'x2', 'x3'], ['x3=x1+x2,x3'])
>>> f([2,3,0])
class=Point name=Unnamed dimension=1 values=[5]
But this only works to return a single value as only the last _express