🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Efficiency computation with values of a 2D variation curve

Frank_Mau_1User: "Frank_Mau_1"
Altair Community Member
Updated by Frank_Mau_1

Hi!

In general I want to calculate the motor efficiency in a transient magnetic flux simulation.

I have the output power and input power calculated in 2 different 2D curves:

F2D_TechTuto_BrushlessIPMMotor_overview.pdf -> Page 86 and before.

And I have found the information how to print the mean value of a 2D curve in the output area:

print (CurveVariation2D['OUTPUT_POWER'].y[0].meanValues

What I need is how to use the mean values of curves in a calculation:

Something like: CurveVariation2D['OUTPUT_POWER'].y[0].meanValues/CurveVariation2D['INPUT_POWER'].y[0].meanValues

I want to calculate the efficiency value and put it an I/O parameter or in a 2D curve to check it after postprocessing.

Thanks.

 

Find more posts tagged with

Sort by:
1 - 4 of 41
    C_FavreUser: "C_Favre"
    Altair Employee
    Accepted Answer
    Updated by C_Favre

    Hi,

    I propose you to use the following python command (in Bold) in order to compute the efficiency.

    Firstly you can store in a pyhton variable the output and input power with the following command:

    Output_power=CurveVariation2D['OUTPUT_POWER'].y[0].meanValues[0]

    Input_power=CurveVariation2D['INPUT_POWER'].y[0].meanValues[0]

    After that create a python variable to store the efficiency:

    Efficiency=Output_power/Input_power

    Then you can then display the efficiency  in the output area using the python command:

    print 'Efficiency='+str(Efficiency)

    The value obtained can be stored in a I/O parameter using the python command

    VariationParameterFormula['EFFICIENCY'].formula=str(Efficiency)

    Please note that in thise case the parameter efficicncy already exist so it will just updated its value if you want to create it with a refernce value of 0 you can use the command:

    VariationParameterFormula(name='EFFICIENCY',
                              formula='0.0')

    I hope this helps.

    Best regards.

    Cyril Favre

    Hi,

    Another way is to use a macro, Analyse2DCurve.PFM, which can be loaded in the Extensions/Macros in the Data Tree, and then run for any 2D curve to compute the integral, max, mean, min, rectified mean and RMS values. The values are saved as I/O parameters that can be used in calculations.

    Best regards,

    Alexandru

    Frank_Mau_1User: "Frank_Mau_1"
    Altair Community Member
    OP
    Updated by Frank_Mau_1

    Hi,

    I propose you to use the following python command (in Bold) in order to compute the efficiency.

    Firstly you can store in a pyhton variable the output and input power with the following command:

    Output_power=CurveVariation2D['OUTPUT_POWER'].y[0].meanValues[0]

    Input_power=CurveVariation2D['INPUT_POWER'].y[0].meanValues[0]

    After that create a python variable to store the efficiency:

    Efficiency=Output_power/Input_power

    Then you can then display the efficiency  in the output area using the python command:

    print 'Efficiency='+str(Efficiency)

    The value obtained can be stored in a I/O parameter using the python command

    VariationParameterFormula['EFFICIENCY'].formula=str(Efficiency)

    Please note that in thise case the parameter efficicncy already exist so it will just updated its value if you want to create it with a refernce value of 0 you can use the command:

    VariationParameterFormula(name='EFFICIENCY',
                              formula='0.0')

    I hope this helps.

    Best regards.

    Cyril Favre

    Thank you very much. You were faster than light with your answer ;-) 

    Frank_Mau_1User: "Frank_Mau_1"
    Altair Community Member
    OP
    Updated by Frank_Mau_1

    Hi,

    Another way is to use a macro, Analyse2DCurve.PFM, which can be loaded in the Extensions/Macros in the Data Tree, and then run for any 2D curve to compute the integral, max, mean, min, rectified mean and RMS values. The values are saved as I/O parameters that can be used in calculations.

    Best regards,

    Alexandru

    Thank you very much. This is a great work around. If I analyze the python script I get also my solution.