Inconsistent number of responses on DRESP2 card 22

Turbokraken
Turbokraken Altair Community Member
edited October 2020 in Community Q&A

Hello Everyone,

 

I am trying to do a rather weird optimization: I have multiple structures which are all held in place by a single master structure. I want to optimize the master structure so that all sub-structures receive roughly the same stresses.

For this, I have created 5 responses, each possessing the static stress of about 10k elements which is one sub-structure.

Then I created another response, called GlobalStress, which possesses a dequation. This dequation shall then use and weigh the difference of the stresses in the sub-structure, e.g. S1 - S2, S2 - S3 and the resulting value shall be minimized. Which is why the objective is to minimize this response.

 

The dequation looks something like this:

StressG(S1,S2,S3,S4,S5) = (ABS((S1**2)-(S2**2)))**2+(ABS((S2**2)-(S3**2)))**2+(ABS((S3**2)-(S4**2)))**2+(ABS((S4**2)-(S5**2)))**2+(ABS((S5**2)-(S1**2)))**2

 

Now what is bugging me is this: In the DRESP 1/2 L card of the response with the dequation, I put in the response list all responses from S1 to S5, as they appear in the dequation, too.
However when I start the optimization I get an error saying the following:

*** ERROR # 1810 ***
  Inconsistent number of responses on DRESP2 card 22.

 

Which I frankly dont understand.

 

Unfortunately I will not be able to share the model, as the content is protected.

Is there an obvious mistake that I did? it is my first time working with dequations and I may have missed something. But why are the number of responses inconsistent?

 

Best Regards,

Lennart

Answers

  • Turbokraken
    Turbokraken Altair Community Member
    edited September 2019

    Dear All,

     

    I have unfortunately not been able to solve the issue on my own for now.

    However I have an assumption on what the issue might be: S1, S2, etc. are defined as responses of 'static stress' of multiple elements.

    Is the response automatically creating an average value, or a maximum value from the huge amount of stresses from the 10k+ element?

    If not, it would explain why simply adding and multiplying a whole array of stresses may not be working.

     

    Is there any other way how to create the average or the max stress from an array of stresses?

     

    Best Regards,

    Lennart

  • Rahul Rajan_21763
    Rahul Rajan_21763 New Altair Community Member
    edited October 2019

    Hello Everyone,

     

    I am trying to do a rather weird optimization: I have multiple structures which are all held in place by a single master structure. I want to optimize the master structure so that all sub-structures receive roughly the same stresses.

    For this, I have created 5 responses, each possessing the static stress of about 10k elements which is one sub-structure.

    Then I created another response, called GlobalStress, which possesses a dequation. This dequation shall then use and weigh the difference of the stresses in the sub-structure, e.g. S1 - S2, S2 - S3 and the resulting value shall be minimized. Which is why the objective is to minimize this response.

     

    The dequation looks something like this:

    StressG(S1,S2,S3,S4,S5) = (ABS((S1**2)-(S2**2)))**2+(ABS((S2**2)-(S3**2)))**2+(ABS((S3**2)-(S4**2)))**2+(ABS((S4**2)-(S5**2)))**2+(ABS((S5**2)-(S1**2)))**2

     

    Now what is bugging me is this: In the DRESP 1/2 L card of the response with the dequation, I put in the response list all responses from S1 to S5, as they appear in the dequation, too.
    However when I start the optimization I get an error saying the following:

    *** ERROR # 1810 ***
      Inconsistent number of responses on DRESP2 card 22.

     

    Which I frankly dont understand.

     

    Unfortunately I will not be able to share the model, as the content is protected.

    Is there an obvious mistake that I did? it is my first time working with dequations and I may have missed something. But why are the number of responses inconsistent?

     

    Best Regards,

    Lennart

     

    This seems to happen if function response (DRESP2) is not referenced in either the objective or constraints. If used, error message does not appear.

  • Turbokraken
    Turbokraken Altair Community Member
    edited October 2019

    Dear Rahul,

     

    Thank you for your answer.

    It appears that I could find the reason it did not work so far: Unfortunately your idea did not work, the DRESP2 was already referenced in the objective. (Although I did put an extra constraint with a high upper limit just to be safe)

    What did work though was reducing the number of elements to 1. Which kind of makes sense because in the formula I would ask to subtract S1 and S2, which in that case would have 10k+ values.

     

    Which brings me to my hopefully last question: Can you think of a sensible way to get an average value of all the elements in a specific region/part/property?

  • Rahul Rajan_21763
    Rahul Rajan_21763 New Altair Community Member
    edited October 2019

    You could use DRESP3 .

    When a desired response is not available from OptiStruct, either directly or via equations, it may be calculated through external user-supplied functions implemented in shared/dynamic libraries or external files as External Responses. Please refer attached document for same.

    Unable to find an attachment - read this blog