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

adjointShapeOptimizationFoam fixed outlet

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sailor79

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2011, 11:25
Default adjointShapeOptimizationFoam fixed outlet
  #1
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
Hi guys,

currently I am playing around with adjointShapeOptimizationFoam. For my application I would like to work with a fixed outlet. Is adjointShapeOptimizationFoam able to compute this?

For Example:
I have an circular inlet and a rectangular outlet with bars in it for stiffening (must not be bars). If I compute this with adjointShapeOptimizationFoam, the geometry of the outlet is changed. But that's not what I would like to have.

Maybe someone has an idea.

Thanks in advance

Michael
sailor79 is offline   Reply With Quote

Old   November 29, 2011, 08:19
Default
  #2
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
In what way is the outlet geometry changed? Do you mean that alpha is not equal to 0 in the cells adjacent to the outlet patch?
__________________
David A. Boger
boger is offline   Reply With Quote

Old   November 29, 2011, 08:27
Default
  #3
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
Hi David,

in certain cells within the outlet patch, alpha is not equal to 0.

Michael
sailor79 is offline   Reply With Quote

Old   November 29, 2011, 08:36
Default
  #4
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
Have you tried turning on the zeroCells(alpha, outletCells) command on line 99 of adjointShapeOptimizationFoam.C? You would also need to activate line 94 in createFields.H where outletCells is defined.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   November 29, 2011, 08:39
Default
  #5
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
I did not do that. I will try this and get back to you.

Michael
sailor79 is offline   Reply With Quote

Old   November 29, 2011, 09:08
Default
  #6
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
Hi David,

I modified the solver. For the outlet patch alpha is 0 now. But some cells adjacent to the outlet are 0, too. The patch in this area is a "wall" type. Do you have an idea?

In the tutorial, alpha_max is set to 200. When interpreting the results in ParaFoam, do I have to scale alpha from 0 to 1 or even from 0 to 0.1 (all cells unequal to 0 are "wall")?

Thank you for your kind help

Michael
sailor79 is offline   Reply With Quote

Old   November 29, 2011, 10:33
Default
  #7
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
I guess I don't understand what you mean by "But some cells adjacent to the outlet are 0, too." Wasn't that the goal? Can you try to explain again?

As far as interpreting the results in paraFoam, you're welcome to scale the alpha results, but all that really matters is where the interface is between zero and non-zero values. Hopefully that interface is fairly crisp, but in any event, it will likely require some interpretation or fairing on your part to deduce a smooth geometry from it.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   November 29, 2011, 10:40
Default
  #8
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
I meant, that some cells in the adjacent walls have alpha values of 0. In my understanding, alpha values are only changed for cells without contact to wall-patches. Am I wrong?

Concerning ParaFoam: Is there a way to extract the Geometry of cells with alpha !=0 to an stl file or something?
sailor79 is offline   Reply With Quote

Old   November 29, 2011, 12:09
Default
  #9
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
I attached two images. The inlet is on the left side of the 2d-view and the outlet is on the right side.

In the 3d-view you can see the alpha=0 cells within the wall-patch.

Michael
Attached Images
File Type: png middle.png (7.7 KB, 88 views)
File Type: png surface.png (10.9 KB, 83 views)
sailor79 is offline   Reply With Quote

Old   November 29, 2011, 12:10
Default
  #10
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
I managed to export something similar to the optimized geometry by contour plot and Save Data. This issue is solved.

Last edited by sailor79; November 29, 2011 at 12:48.
sailor79 is offline   Reply With Quote

Old   November 29, 2011, 12:55
Default
  #11
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
Hello sailor79,

I want also extract the Geometry of cells at 0<alpha<1 in order to get an STL file.

How do you manage to get STL surface in Paraview ?

regards,
olivier
olivierG is offline   Reply With Quote

Old   November 29, 2011, 13:20
Default
  #12
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
Hi Olivier,

this thread helped me: http://www.cfd-online.com/Forums/ope...-paraview.html

You can save the geometry with file- Save Data (select stl as file type).

Hope that helps. I have not gone any further, yet.


Michael
kiddmax likes this.
sailor79 is offline   Reply With Quote

Old   November 29, 2011, 13:35
Default
  #13
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
Thanks for this info, Michael

I was looking at an another way, using MeshLab (cloud point => create smooth STL surface), but doing this with paraview seems more direct.

regards,
olivier
olivierG is offline   Reply With Quote

Old   November 29, 2011, 17:33
Default
  #14
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
Michael,

I'm glad you sorted some things out, but I'm a little confused by your results. You said:
Quote:
I meant, that some cells in the adjacent walls have alpha values of 0. In my understanding, alpha values are only changed for cells without contact to wall-patches. Am I wrong?
As far as I can tell, the only constraint imposed in the original code was that alpha (the porosity) should remain zero (i.e., open to fluid) in cells adjacent to the inlet, and we modified the code here to add that alpha should also remain zero in cells adjacent to the outlet. But alpha can remain zero or become non-zero (i.e., closed to fluid) anywhere else, including in cells adjacent to walls.

I'm also a little confused by your pictures. In the 2D slice, it looks as if the fluid enters the small inlet on the left and then branches before reaching the outlet. Maybe it's just confusing because of the particular slice you chose, but is the flow able to reach the outlet plane?

And out of curiosity, what is the cost function in this case? Are you minimizing the loss of total pressure, which was the cost function distributed with the code?

David
__________________
David A. Boger
boger is offline   Reply With Quote

Old   December 6, 2011, 09:55
Default
  #15
New Member
 
Join Date: Apr 2010
Location: Linz, Austria
Posts: 16
Rep Power: 16
sailor79 is on a distinguished road
Hi David,

excuse my late reply, but there are couple of other things going on at the moment.

I am minimizing total pressure in my example. In the pictures above, the fluid is not able to reach the outlet as far as I can see.

Also the result seems to change always. After a couple of time steps you have a similar geometry once again. Therefore I increased the Mesh density and calculated a lot of time steps. You can see 2D views attached to this post. 700 s looks similar to 500 s, 800 s looks similar to 600 s.

Does this look plausible to you?

Regards

Michael
Attached Images
File Type: png 200.png (9.8 KB, 64 views)
File Type: png 300.png (14.4 KB, 55 views)
File Type: png 400.png (9.5 KB, 51 views)
File Type: png 500.png (10.9 KB, 50 views)
File Type: png 600.png (10.5 KB, 60 views)
sailor79 is offline   Reply With Quote

Reply


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
Compressible flow, no data at the outlet mireis FLUENT 6 September 3, 2015 03:10
Fixed Outlet Mass Flux boundary condition? trex930 OpenFOAM Pre-Processing 2 June 30, 2010 22:44
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45
VOF Outlet boundary condition in cfd - ace JM Main CFD Forum 0 December 15, 2006 09:07
Impinging Jet. Outlet Boundary Condition Vincent Main CFD Forum 0 December 16, 2003 11:49


All times are GMT -4. The time now is 17:26.