I am getting two errors when I run definition in the 'Test models' section, as "Failed to read hstp file" and "The PDD file does not exist".

ramin_21612
ramin_21612 Altair Community Member
edited January 2023 in Community Q&A

Hi all,
I generated hyperStudy file from Altair flux 2021 and imported it as a resource in Altair HyperStudy. Then I define input variables. When I run definition in the 'Test models' section, I get two errors as "Failed to read hstp file" and "The PDD file does not exist". The 'write' and 'execute' icons have green tick, but 'Extract' icon has red tick. Could you please tell me what does it mean? And how to clear these errors?

Best Answer

  • Diana M._20503
    Diana M._20503
    Altair Employee
    edited December 2021 Answer ✓

    Hello

    I did it step by step and minimize the goal function(torque ripple).

    image

    ,but the post-processing results showed that the torque ripple function didn't change. In addition, I did this procedure even by considering the torque-mean as constraint, but the output functions didn't change, which are shown as below:

    image

    Hi Ramin,

    I think I see what's happen. On the image you shared I see that torque values recovered from Flux are always the same whatever the variables values are. That's why torque_ripple doesn't change neither. Indeed your simulations are done correctly and the model has been solved with updated parameters values, but the results (values stored under I/O parameters in Flux) are not updated. This part is handled by your post-processing python file.

    To fix this, you would need to execute the macro within the python. This macro Analyze2Dcurve allows several things: extract values from the curve, create I/O parameters and also update the I/O parameters if they exist.

    In other words when you run the python for the first time (I always suggest to test the post-processing python file in Flux before connecting to HyperStudy), the torque curve is displayed and the macro extracts the values and create torque I/O parameters. After this, at each new evaluation the same post-processing is automated through the python where the same macro is used to update the results.

    Does that make sense?

    Below is an example of similar post-processing python. If the macro is already loaded in your model, you can skip the section "Load macro", but you definitely need to run the macro (highlighted line below).

    Note: the command CurveVariation2D[ALL].delete() avoids issue with same curve name. I think you have it added.

     

    image

     

    Hope it helps.

     

    Regards,

    Diana

Answers

  • Diana M._20503
    Diana M._20503
    Altair Employee
    edited December 2021

    Hello,

    These errors means that HyperStudy was not able to get the results because the solver (Flux) didn't provide them. You need to investigate what's happen on the solver side.

    My guess is that you are using a using post-processing python file in Flux. Is that correct?

    If only the Extract task is failed, there is maybe an error when executing this python file.

    I'd suggest you to look at the Flux log files available in the run folder under approaches\.. to see what is the error. The same error should also be recovered in the task_exe_stderr.txt.

     

    Hope it helps.

    Regards,

    Diana

  • ramin_21612
    ramin_21612 Altair Community Member
    edited December 2021

    Hi Diana

    Thanks. Your answer help me a lot. One more thing, I want to minimize torque ripple of the IPMSM by coupling the Altair flux to HyperStudy. How can I define this parameter as goal function? 

  • Diana M._20503
    Diana M._20503
    Altair Employee
    edited December 2021

    Hi Diana

    Thanks. Your answer help me a lot. One more thing, I want to minimize torque ripple of the IPMSM by coupling the Altair flux to HyperStudy. How can I define this parameter as goal function? 

    Hello,

    I'm glad it helped.

    You recover in HyperStudy the torque values (max, min, mean) exported from Flux. By the way, you have probably used the post-processing python file for this purpose: to display Torque curve and then apply the macro Analyze2Dcurve to extract/store the values into I/O parameters and be able to select them through the coupling component (*.f2hst).

    Then, in HyperStudy you can define additional response Torque_ripples defined by an expression such as (torque_max-torque_min)/2.

    image

    Does this address your need?

    Regards,

    Diana

  • ramin_21612
    ramin_21612 Altair Community Member
    edited December 2021

    Hello,

    I'm glad it helped.

    You recover in HyperStudy the torque values (max, min, mean) exported from Flux. By the way, you have probably used the post-processing python file for this purpose: to display Torque curve and then apply the macro Analyze2Dcurve to extract/store the values into I/O parameters and be able to select them through the coupling component (*.f2hst).

    Then, in HyperStudy you can define additional response Torque_ripples defined by an expression such as (torque_max-torque_min)/2.

    image

    Does this address your need?

    Regards,

    Diana

    Hello

    I did it step by step and minimize the goal function(torque ripple).

    image

    ,but the post-processing results showed that the torque ripple function didn't change. In addition, I did this procedure even by considering the torque-mean as constraint, but the output functions didn't change, which are shown as below:

    image

  • Diana M._20503
    Diana M._20503
    Altair Employee
    edited December 2021 Answer ✓

    Hello

    I did it step by step and minimize the goal function(torque ripple).

    image

    ,but the post-processing results showed that the torque ripple function didn't change. In addition, I did this procedure even by considering the torque-mean as constraint, but the output functions didn't change, which are shown as below:

    image

    Hi Ramin,

    I think I see what's happen. On the image you shared I see that torque values recovered from Flux are always the same whatever the variables values are. That's why torque_ripple doesn't change neither. Indeed your simulations are done correctly and the model has been solved with updated parameters values, but the results (values stored under I/O parameters in Flux) are not updated. This part is handled by your post-processing python file.

    To fix this, you would need to execute the macro within the python. This macro Analyze2Dcurve allows several things: extract values from the curve, create I/O parameters and also update the I/O parameters if they exist.

    In other words when you run the python for the first time (I always suggest to test the post-processing python file in Flux before connecting to HyperStudy), the torque curve is displayed and the macro extracts the values and create torque I/O parameters. After this, at each new evaluation the same post-processing is automated through the python where the same macro is used to update the results.

    Does that make sense?

    Below is an example of similar post-processing python. If the macro is already loaded in your model, you can skip the section "Load macro", but you definitely need to run the macro (highlighted line below).

    Note: the command CurveVariation2D[ALL].delete() avoids issue with same curve name. I think you have it added.

     

    image

     

    Hope it helps.

     

    Regards,

    Diana

  • ramin_21612
    ramin_21612 Altair Community Member
    edited December 2021

    Hi Diana,

    The problem is currently solved. Thank you for your time 

    ramin

  • ramin_21612
    ramin_21612 Altair Community Member
    edited December 2021

    Hello,

    These errors means that HyperStudy was not able to get the results because the solver (Flux) didn't provide them. You need to investigate what's happen on the solver side.

    My guess is that you are using a using post-processing python file in Flux. Is that correct?

    If only the Extract task is failed, there is maybe an error when executing this python file.

    I'd suggest you to look at the Flux log files available in the run folder under approaches\.. to see what is the error. The same error should also be recovered in the task_exe_stderr.txt.

     

    Hope it helps.

    Regards,

    Diana

    hello Diana

    I'm sorry to ask you another question, but I tried to optimize a motor with new specifications, and in 'Test models' step, I received extract errors which are 'Failed to read hstp file' and 'The PDD file does not exist'. The task_exe_stderr.text is reported this message:

    console: Failed to install '': java.nio.charset.UnsupportedCharsetException: cp720.
    [64612|1638920652242|1|WARNING ][UseCase|UseCaseManager.changeUseCase] : No use case transaction found
    [65241|1638920854077|1|WARNING ][ExecuteBatchSpyAction|ExecuteBatchSpyAndExitAction.doAction] : Execution of C:/Program Files/Altair/2021.2/hwdesktop/hst/scripts/python/python3.5/win64/alt/hst/eac/cmd/hstupdate_flux.py failed: Traceback (most recent call last): File "C:/Program Files/Altair/2021.2/hwdesktop/hst/scripts/python/python3.5/win64/alt/hst/eac/cmd/hstupdate_flux.py", line 585, in <module> main() File "C:/Program Files/Altair/2021.2/hwdesktop/hst/scripts/python/python3.5/win64/alt/hst/eac/cmd/hstupdate_flux.py", line 550, in main hstUpdate.updateProject() File "C:/Program Files/Altair/2021.2/hwdesktop/hst/scripts/python/python3.5/win64/alt/hst/eac/cmd/hstupdate_flux.py", line 550, in main hstUpdate.updateProject() File "C:/Program Files/Altair/2021.2/hwdesktop/hst/scripts/python/python3.5/win64/alt/hst/eac/cmd/hstupdate_flux.py", line 453, in updateProject raise ex

    I can't find out where is the problem. What's your opinion?

  • Diana M._20503
    Diana M._20503
    Altair Employee
    edited December 2021

    Hi Diana,

    The problem is currently solved. Thank you for your time 

    ramin

    Hi Ramin,

    Glad to hear this. You are welcome.

    Diana

  • Ice Berg
    Ice Berg New Altair Community Member
    edited December 2022

    Hi Ramin,

    I think I see what's happen. On the image you shared I see that torque values recovered from Flux are always the same whatever the variables values are. That's why torque_ripple doesn't change neither. Indeed your simulations are done correctly and the model has been solved with updated parameters values, but the results (values stored under I/O parameters in Flux) are not updated. This part is handled by your post-processing python file.

    To fix this, you would need to execute the macro within the python. This macro Analyze2Dcurve allows several things: extract values from the curve, create I/O parameters and also update the I/O parameters if they exist.

    In other words when you run the python for the first time (I always suggest to test the post-processing python file in Flux before connecting to HyperStudy), the torque curve is displayed and the macro extracts the values and create torque I/O parameters. After this, at each new evaluation the same post-processing is automated through the python where the same macro is used to update the results.

    Does that make sense?

    Below is an example of similar post-processing python. If the macro is already loaded in your model, you can skip the section "Load macro", but you definitely need to run the macro (highlighted line below).

    Note: the command CurveVariation2D[ALL].delete() avoids issue with same curve name. I think you have it added.

     

    image

     

    Hope it helps.

     

    Regards,

    Diana

    Hello good day. I just started using Hyperstudy and Fluxmotor software but I am inexperienced.
    By optimizing the magnet dimensions of an example electric motor, I wanted to make an
    analysis example, where I thought about keeping the current torque value and reducing the
    ripple torque value. After uploading the link file (HstConnector.fm2hst) to Hyperstudy, it gave two
    errors: "Failed to read hstp file" and "The pdd file does not exist". Can you explain step by step
    how I can fix it? Can you share a detailed article or pdf document that solves this problem?
    I am using these programs for the first time. I am a student and I want to do academic studies.
    I would be grateful if you help. Thank you.
  • Diana M._20503
    Diana M._20503
    Altair Employee
    edited January 2023
    Ice Berg said:

    Hello good day. I just started using Hyperstudy and Fluxmotor software but I am inexperienced.
    By optimizing the magnet dimensions of an example electric motor, I wanted to make an
    analysis example, where I thought about keeping the current torque value and reducing the
    ripple torque value. After uploading the link file (HstConnector.fm2hst) to Hyperstudy, it gave two
    errors: "Failed to read hstp file" and "The pdd file does not exist". Can you explain step by step
    how I can fix it? Can you share a detailed article or pdf document that solves this problem?
    I am using these programs for the first time. I am a student and I want to do academic studies.
    I would be grateful if you help. Thank you.

    Hello,

    If this request has not been answered yet, I would suggest to look at the blog

    "Top 5 Guide to the HyperStudy-FluxMotor users" within this forum.

    I think you run to this behavior because of the files path length.

    Can you check this and let me know if it helped or not?

    Regards,

    Diana