Once we understand "the flywheel inertia mystery", I returned on the main question in a more general overview.

If one have the function g expressed in a closed form [eg: g(x,y)= f(x)*exp(4y-5); f(x)=sin(x) ] you don't have problems. One can insert the expression inside the "function type: user defined" tab.
One has problems when you have the function f(x) not in a closed form, but with a dots graph. You can't multiply a graph for a function.
I found a workaround:
- add to the assembly a "fake component" with its own motion axis,
- attribute to that one a torque motor defined with a table and on the domain you want,
- make a netload measure on the fake torque motor,
- now you have the function f(x) that you can insert in a user defined fuction,
- make attention to the units! Inside the definition of g you may adjust with some constant the value of f.
I use this method to calculate the J and the J' of the motion equation.

Here are two curve of J(theta): the yellow one comes from the simulation with "my method", the ciano one comes from an algebraic calculus.

The differences are small and decrease with the number of points growing (the simulation time step).