CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

adjointShapeOptimizationFoam: optimizing shape only in certain parts of domain?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2020, 23:03
Question adjointShapeOptimizationFoam: optimizing shape only in certain parts of domain?
New Member
Join Date: May 2020
Posts: 5
Rep Power: 4
cduchat is on a distinguished road

I have a case for which I would like to optimize the shape of a volute-like channel, but without modifying the shape of the zone that feeds it.

Is there a way to do that?

More details below for those who have time to read...

Basically the system is a spinning drum partially filled with water, and the volute-like channel scoops some of the water out, so the whole thing is quite similar to a Pitot pump for which I would like to optimize the Pitot scoop outer shape and inner channel but without changing the drum/housing itself.

Normally it would make sense to cut the drum out of the study and apply a mapped patch, but it is impossible here since for various reasons the shape of the scoop and channel does strongly impact the flow conditions inside the drum.

So what I am trying to do now is to have adjointShapeOptimizationFoam behave like simpleFoam in the drum zone of the domain, and perform the shape optimization only inside the channel and in the vicinity of the volute/Pitot scoop.

Using topoSet I have successfully created a cellSet "f0" (and its corresponding cellZone "drum"). Using a scalarFixedValueConstraint in fvOptions I tried to fix to zero the value of "alpha" inside this part of the domain (no error message, so the syntax is correct, but a warning on the second iteration, sometimes repeated for a few more iterations stating that the constraint is not applied due to the field "alpha" being "never used"). This approach didn't help as the "alpha" values kept being different from the constrained value of zero in the "drum" zone (or in the "f0" set: I have tried both) looking into the source code it appears that alpha is not really an input but rather an output of adjointShapeOtimizationFoam determined from U and Ua (file createFields.H in the sources of the solver).

The case as it currently is set up runs and converges really fine, the mesh is good, everything is okay, except for this shape optimization that I need to somehow turn off in the "drum" part of the domain.

Any idea as to how to proceed?


PS: I use BlueCFD core 2017 (openFOAM v5 compiled and slightly tweaked for Windows).

Here is the fvOptions constraint
    type            scalarFixedValueConstraint;
    active          yes;
    selectionMode   cellSet; //cellZone
    cellSet         f0;
    //cellZone        drum;
    fieldValues     { alpha 0.0;}
And the warning message that I get on one to ten iterations at the beginning (and then no more warning for the rest of the run).
--> FOAM Warning : 
    From function virtual void Foam::fv::option::checkApplied() const
    in file cfdTools/general/fvOptions/fvOption.C at line 125
    Source fixedAlpha defined for field alpha but never used
And here is the part of the source code from "createFields.H" corresponding to the creation of the field "alpha"
volScalarField alpha
    lambda*max(Ua & U, zeroSensitivity)

Last edited by cduchat; July 22, 2020 at 23:09. Reason: adding source code of field alpha's creation
cduchat is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
[ANSYS Meshing] 3-D meshing with multiple parts pokhrel ANSYS Meshing & Geometry 0 June 26, 2016 17:44
Two parts in a domain LeenaPhD FLUENT 1 February 6, 2015 06:13
injection problem Mark New FLUENT 0 August 4, 2013 02:30
Vertical Axis Wind Turbine Rotating Domain Problems TWaung CFX 4 May 1, 2012 04:14

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