If I run the script at the bottom in Flux2D via the PyFlux Command prompt, a curve is made with the name "CURVE_LOSS_REGION_V101". If I extract the curve, I obtain the data I need.
If I embed this piece of code in a Python script, the code runs smoothly and the script is ran without errors. However, the actual curve is not made and therefore the data cannot be extracted in my Python script.
Note that I'm sure the even if I run the code via a Python script, the part below is executed because if I first run the Python script and than copy paste the results below in the PyFlux Command prompt, I get the following error:
LOSSES_IN_REGION_V101 : a self-same name result already exists
Moreover, if I change the text in the code, to for example, LOSSES_IN_REGION_V102 and I run the code again (so in PyFlux Command prompt), 2 curves suddenly appear: LOSSES_IN_REGION_V101 and LOSSES_IN_REGION_V102.
How can I force Flux2D to generate that curve from Python, without intervention from within Flux2D? What do I need to change?
result = IronLossesRegion(faceRegions=[RegionFace['OS_TOOTH']], timeInterval=EvolutivePath(parameterSet=[SetParameterFixed(paramEvol=VariationParameter['I_RMS'], currentValue=100), SetParameterFixed(paramEvol=VariationParameter['CTRL_ANGLE'], currentValue=45), SetParameterFixed(paramEvol=VariationParameter['SPEED'], currentValue=1500), SetParameterXVariable(paramEvol=VariationParameter['ANGPOS_ROTOR'], limitMin=40, limitMax=140)]), curveName='CURVE_LOSS_REGION_V101', resultName='LOSSES_IN_REGION_V101', lossSpatialParameterName='DVOL_LOSS_MEAN_V101', energySpatialParameterName='DVOL_ENERGY_LOSS_V101', periodicity=FullCycleIronLosses(), sheetLossModel=CaseDefinedInMaterial())