CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Volume Constraint for topology optimization (adjointShapeOptimizationFoam)

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By verboomj
  • 3 Post By verboomj
  • 1 Post By C. Okubo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2016, 08:37
Default Volume Constraint for topology optimization (adjointShapeOptimizationFoam)
  #1
New Member
 
Jeroen
Join Date: Oct 2016
Posts: 21
Rep Power: 9
verboomj is on a distinguished road
Hello,

First of all I'm very new to programming/adjusting existing OF solvers.

I'm currently working with the solver adjointShapeOptimizationFoam but I'm looking to implement a volume constraint. As it will only appear in the sensitivity and thus only in the steepest descent line of code It shouldn't be to much of coding.

The constraint to be implemented can be seen in the attachment. The SD3 integral is the one to be added in the steepest descent line.

The question:
However I can't seem to find how I should start with volume integrals, in particular the upper integral. I can imagine I need to replace them with a summation of all cell volumes but can use some help in what direction I should look.

volScalarField.V() appears to be a method to get the cell volumes?

Any help is much appreciated.

Kind regards,
Jeroen
Attached Images
File Type: png volumconstraint.PNG (3.8 KB, 32 views)
File Type: png volumeconstraintintegral.PNG (3.2 KB, 26 views)
C. Okubo likes this.
verboomj is offline   Reply With Quote

Old   November 25, 2016, 10:44
Default
  #2
New Member
 
Jeroen
Join Date: Oct 2016
Posts: 21
Rep Power: 9
verboomj is on a distinguished road
So, after three days of digging up a ton of posts I've seem to manage to implement a volume constraint for the solver, still work to be done.

With this constraint it is possible to also find Stokes flow solutions. Initially it would give a full fluid field as a solution, alpha zero everywhere. Furthermore it should give some more freedom to what space your flow can use.

Some results in the attachment. If anyone wants some details feel free to contact me.
Attached Images
File Type: png Stokes_Volume02.PNG (34.4 KB, 42 views)
File Type: png Stokes_Volume04.PNG (39.6 KB, 31 views)
File Type: png NavierStokes_Volume02.PNG (30.6 KB, 30 views)
File Type: png NavierStokes_Volume04.PNG (28.7 KB, 33 views)
kiddmax, FlyBob91 and C. Okubo like this.

Last edited by verboomj; November 26, 2016 at 06:03.
verboomj is offline   Reply With Quote

Old   April 18, 2018, 10:26
Default
  #3
New Member
 
Join Date: Jan 2017
Posts: 22
Rep Power: 9
C. Okubo is on a distinguished road
Hi, verboomj!

Nice work! By your pictures, it really seems to be working! Could you share some details about this implementation? I am working on the same problem right now. I was trying to implement a Constrained Steepest Descent as per "Introduction to Optimum Design by Arora", but my alphas get stuck. Obviously, I am doing something wrong.

Also, are you using the volume constraint as equality or inequality?

Regards,

Okubo
C. Okubo is offline   Reply With Quote

Old   April 23, 2018, 16:16
Default
  #4
New Member
 
Join Date: Jan 2017
Posts: 22
Rep Power: 9
C. Okubo is on a distinguished road
I think I done it!

Was able to do it with verboomj thesis + book and paper below:

https://repository.tudelft.nl/island...0-d4558a5fd1dd
https://link.springer.com/article/10...831-014-9141-9
https://www.springer.com/br/book/9780387303031

Thanks, verboomj!
FlyBob91 likes this.
C. Okubo is offline   Reply With Quote

Old   February 12, 2020, 12:25
Default
  #5
New Member
 
Join Date: Jun 2019
Posts: 20
Rep Power: 6
Cambridge is on a distinguished road
Quote:
Originally Posted by C. Okubo View Post
I think I done it!

Was able to do it with verboomj thesis + book and paper below:

https://repository.tudelft.nl/island...0-d4558a5fd1dd
https://link.springer.com/article/10...831-014-9141-9
https://www.springer.com/br/book/9780387303031

Thanks, verboomj!
Hi C. Okubo

I am new in topology optimization, do you have any tutorials on that using OpenFOAM? How can you replicate the results of verboomj? Could you please help me?

Many many thanks in advance.
Cambridge is offline   Reply With Quote

Old   February 13, 2020, 07:24
Default
  #6
New Member
 
Join Date: Jan 2017
Posts: 22
Rep Power: 9
C. Okubo is on a distinguished road
Hi, Cambridge!

I don't have any tutorials on this case, sorry. I have some cases I ran in the past, but my code is a mess since I've been changing and trying some new stuff. I suggest you to study the references I passed and also this report:

http://www.tfd.chalmers.se/~hani/kur...ortAdjoint.pdf

I do not completely agree with everything on the report, but it gives you a good idea of how to make changes inside the solver.

Also, I think a good beginning is to start all your tests with laminar flow. Use nu = 1 and turn off turbulence models. The adjoint solver can be very unstable when turbulence is on (because of the frozen turbulence hypothesis maybe?) and you get no useful results.

Okubo
C. Okubo is offline   Reply With Quote

Old   February 13, 2020, 15:58
Default
  #7
New Member
 
Join Date: Jun 2019
Posts: 20
Rep Power: 6
Cambridge is on a distinguished road
Quote:
Originally Posted by C. Okubo View Post
Hi, Cambridge!

I don't have any tutorials on this case, sorry. I have some cases I ran in the past, but my code is a mess since I've been changing and trying some new stuff. I suggest you to study the references I passed and also this report:

http://www.tfd.chalmers.se/~hani/kur...ortAdjoint.pdf

I do not completely agree with everything on the report, but it gives you a good idea of how to make changes inside the solver.

Also, I think a good beginning is to start all your tests with laminar flow. Use nu = 1 and turn off turbulence models. The adjoint solver can be very unstable when turbulence is on (because of the frozen turbulence hypothesis maybe?) and you get no useful results.

Okubo
Hi Okubo,

Oh, thank you so much for your help. I will follow and try what you advise. Have you ever done topology optimization by OpenFOAM? Do you any suggestions? Thank you.

regards

Cambridge
Cambridge is offline   Reply With Quote

Reply

Tags
adjointshapeoptimization


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 10:51
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 10:58
New sixDoFRigidBody BC working with laplaceFaceDecomposition Ya_Squall2010 OpenFOAM Running, Solving & CFD 13 April 17, 2013 02:04
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


All times are GMT -4. The time now is 06:52.