DRESP3 constraint for size of ply
Hello,
I am looking to create a custom constraint to place a lower bound on the number of nodes a ply can have after Freesize optimization.
My first attempt at this was to run the optimization once as normal. Then create a new response that passes in the nodes from the ply I'm looking to constrain. This response would then be constrained by a constraint to a minimum value of 700 (it would start its first iteration at 650, as shown).
With the response returning the length of the input to the response .oml file.
This response function seems to work as intended, all the x-positions of the nodes are being passed in, and the response is '650' as i expected. but then the optimizer just... ends after iteration 0.
What am I doing wrong? I've gotten OS-T 4095 working no problem, but my desired response is strictly geometry based and doesn't actually involve any of the standard responses (mass, stress, etc...). So I think I'm missing something crucial.
Thanks! and let me know if I can provide any additional detail.
Answers
-
Hi Andrew,
It looks like your custom response is the sum of the number of nodes that you've picked that make up a ply in a previous free size optimization. And this sum you are constraining to be greater than 700, but the number of nodes defined in the DRESP3 in DGRIDB will always be 650. Between iterations of the optimization the number of nodes will stay the same, so the optimization will not be able to satisfy the constraint. What would be updated in the optimization iterations with DGRIDB would be the x-coordinate locations of the nodes.
Can you let us know more details on your goal here? If it is to produce a more manufacturable design for composites, we have a tutorial on manufacturing constraints for composite structures, OS-T 4090 which might be helpful to explore some available options. You can explore minimum/maximum ply width, ply thickness percentage, etc. Hopefully that's helpful.
Thanks,
Rob H.
0 -
Robert Hoglund said:
Hi Andrew,
It looks like your custom response is the sum of the number of nodes that you've picked that make up a ply in a previous free size optimization. And this sum you are constraining to be greater than 700, but the number of nodes defined in the DRESP3 in DGRIDB will always be 650. Between iterations of the optimization the number of nodes will stay the same, so the optimization will not be able to satisfy the constraint. What would be updated in the optimization iterations with DGRIDB would be the x-coordinate locations of the nodes.
Can you let us know more details on your goal here? If it is to produce a more manufacturable design for composites, we have a tutorial on manufacturing constraints for composite structures, OS-T 4090 which might be helpful to explore some available options. You can explore minimum/maximum ply width, ply thickness percentage, etc. Hopefully that's helpful.
Thanks,
Rob H.
Hi Robert,
Thanks for getting back to me. Yes, that was the intent of that design, I had hoped that by selecting these nodes in the context of an existing ply, as the optimization process iterates and the ply boundaries change, the selected nodes would also update, but had feared this was not the case.
I would be happy to go into more of my final actual goal:
I am looking to create a better constraint to design for Automated Fiber Placement (AFP).
The current 'TAPE' composite design constraint does not accurately reflect the manufacturing limits of AFP, and instead just groups elements into meta-elements of the size and orientation specified by the minimum length and width, and adjusts these meta-element thicknesses as a whole.
I am considering two ways to get a more optimized design that still respects minimum tow lengths.
First, using Automatic 'Zone Based' as a constraint on the free size design variable, with the size equal to the minimum tow length, and coupling the 0/90 plies, and +/-45 plies together.
If one makes the conceit that the final layup should be balanced, which I am willing to make, this actually works pretty well for 0/90 plies. As the squares output by this constraint align nicely with these material orientations. However, the +/-45 plies are comprised of squares whose edges do not align with the material axes. If these could be generated in reference to a coordinate system rotated 45deg (resulting in 'diamonds' rather than 'squares') they would be much more manufacturable.
Additionally, it is frustrating that Optistruct restricts this minimum size (as well as MINDIM) to 12x the average element size, but I guess I can work around that.
The second approach is more what my initial question was geared toward.
I wrote a custom DRESP3 function that does the following:- Loads the most recent design iteration's .fem file of an optimization in progress
- Parses the .fem file, extracting the nodes, elements, plies, and ply orientations
- Groups the elements into strips of the minimum tow width
- Looks at the ends of the strip, to measure its length.
- Creates a penalty score, depending on how far below the minimum length that strip is (0 penalty if greater length)
- Sums up the penalties of every tow in that ply, and gives the ply an overall score.
These ply scores are the response values which are then constrained by the optimization (ideally to 0, but realistically just some small value).
An illustration:
I've gotten this working to the point where Optistruct can call it during the optimization process, and recognize that some of these scores are above their acceptable limits, but then it just loops forever (tested up to 24 hours), calling the response function repeatedly without incrementing the iteration.
I am attempting to constrain plies 10 and 15, which makes the vector in the 4th input make sense.
I am passing in the current compliance, as that is my objective to minimize, but it isn't actually used at all in calculating the responses, in contrast to the OS-T 4095 tutorial using the stresses passed in.
My response will never update until a new iteration is generated because it needs FSTOSZ to actually generate new sets of elements comprising plies. It gets to iteration 2 because the plies haven't been generated before that, so the constraints are 'satisfied'.
In conclusion I have three direct questions, in addition to happily accepting any other advice you may have:
What is Optistruct looking for when it is calling the response functions repeatedly between iteration outputs? When I examine the OST4095 process in the same way, I can see the input stresses subtly changing between response function calls:
In this tutorial the DRESP3 function is called 61 times between iteration 0 and 1, and 46 times between iteration 2 and 3.
Is there a way to FORCE optistruct to output a new iteration every time a response function is called? Rather than waiting for... some condition to be met.
Is there a way to set the reference axes to be different for different material orientations in the 'Zone' based sizing constraints? So that the 0/90 and 45/-45 are in different orientations.
Thank you for your help,
-Andrew
I have attached my code and sample .fem model in case that helps illustrate things, but it's kind of temperamental at the moment.
0 -
Andrew Atkinson said:
Hi Robert,
Thanks for getting back to me. Yes, that was the intent of that design, I had hoped that by selecting these nodes in the context of an existing ply, as the optimization process iterates and the ply boundaries change, the selected nodes would also update, but had feared this was not the case.
I would be happy to go into more of my final actual goal:
I am looking to create a better constraint to design for Automated Fiber Placement (AFP).
The current 'TAPE' composite design constraint does not accurately reflect the manufacturing limits of AFP, and instead just groups elements into meta-elements of the size and orientation specified by the minimum length and width, and adjusts these meta-element thicknesses as a whole.
I am considering two ways to get a more optimized design that still respects minimum tow lengths.
First, using Automatic 'Zone Based' as a constraint on the free size design variable, with the size equal to the minimum tow length, and coupling the 0/90 plies, and +/-45 plies together.
If one makes the conceit that the final layup should be balanced, which I am willing to make, this actually works pretty well for 0/90 plies. As the squares output by this constraint align nicely with these material orientations. However, the +/-45 plies are comprised of squares whose edges do not align with the material axes. If these could be generated in reference to a coordinate system rotated 45deg (resulting in 'diamonds' rather than 'squares') they would be much more manufacturable.
Additionally, it is frustrating that Optistruct restricts this minimum size (as well as MINDIM) to 12x the average element size, but I guess I can work around that.
The second approach is more what my initial question was geared toward.
I wrote a custom DRESP3 function that does the following:- Loads the most recent design iteration's .fem file of an optimization in progress
- Parses the .fem file, extracting the nodes, elements, plies, and ply orientations
- Groups the elements into strips of the minimum tow width
- Looks at the ends of the strip, to measure its length.
- Creates a penalty score, depending on how far below the minimum length that strip is (0 penalty if greater length)
- Sums up the penalties of every tow in that ply, and gives the ply an overall score.
These ply scores are the response values which are then constrained by the optimization (ideally to 0, but realistically just some small value).
An illustration:
I've gotten this working to the point where Optistruct can call it during the optimization process, and recognize that some of these scores are above their acceptable limits, but then it just loops forever (tested up to 24 hours), calling the response function repeatedly without incrementing the iteration.
I am attempting to constrain plies 10 and 15, which makes the vector in the 4th input make sense.
I am passing in the current compliance, as that is my objective to minimize, but it isn't actually used at all in calculating the responses, in contrast to the OS-T 4095 tutorial using the stresses passed in.
My response will never update until a new iteration is generated because it needs FSTOSZ to actually generate new sets of elements comprising plies. It gets to iteration 2 because the plies haven't been generated before that, so the constraints are 'satisfied'.
In conclusion I have three direct questions, in addition to happily accepting any other advice you may have:
What is Optistruct looking for when it is calling the response functions repeatedly between iteration outputs? When I examine the OST4095 process in the same way, I can see the input stresses subtly changing between response function calls:
In this tutorial the DRESP3 function is called 61 times between iteration 0 and 1, and 46 times between iteration 2 and 3.
Is there a way to FORCE optistruct to output a new iteration every time a response function is called? Rather than waiting for... some condition to be met.
Is there a way to set the reference axes to be different for different material orientations in the 'Zone' based sizing constraints? So that the 0/90 and 45/-45 are in different orientations.
Thank you for your help,
-Andrew
I have attached my code and sample .fem model in case that helps illustrate things, but it's kind of temperamental at the moment.
Hi Andrew
Thanks for following up. If you remove the automatic zone-based definition (which sets groups of elements to have the same thickness in free size optimization) you can realize designs which have the orientation in different directions according to the width and min length TAPE parameters. The MINDIM for minimum member size is 3x the average element size (not sure where you see it says 12x)? I attached a model showing this, it should be clear in the image.
To give some ideas on your DRESP3 if you want to continue building a custom response for AFP:
Optistruct is calling the DRESP3 function to calculate the sensitivities with respect to the design variables. OptiStruct uses the gradient information to update the response value in the optimization. So it may call that function a number of times to do that. You can input the SENSOUT field on the DRESP3 card to change how this is done. SENSOUT,AUTO can help improve the run time by using finite differences. SENSOUT,USER allows you to input the sensitivities by calculating them in the Compose function.
I ran your OptiStruct model with finite difference sensitivities (SENSOUT,AUTO) and got an answer about sensitivities being equal to zero with the constraints being violated. So you need to consider how the constraint on the ply score and sensitivities are implemented (constraint < 10 and the response values were over 100 so it would not be satisfied). Those models are attached too. Hopefully this information is helpful.
Thanks,
Rob H.
0