About adjointShapeOptimizationFoam
Dear Foamers,
I am trying to figure out how adjointShapeOptimizationFoam works. The first attempt I did was to run the tutorial. Everything goes well - tough I don't completely und the results - except for a detail: if I change the inlet name (e.g. from inlet to inlet1) I get this error: Code:
phd@lab-laptop:~/Scrivania/pitzDaily$ blockMesh Thanks for help. Samuele |
Hi Samuele,
In createFields.H of this solver, there is a line const labelList& inletCells = mesh.boundary()["inlet"].faceCells(); so you got the error message. Hope that helps, Fumiya |
So,
isn't it possible to have more than one inlet? If so, what should I do? Should I edit the solver? Also, always about that solver, could it solve 3D flows? Thanks a lot, Samuele |
Hi,
I think you have to edit the solver to use with the geometry that has the multiple inlets. In the original solver, the inletCells defined in the code is used to keep alpha=0 at cells adjacent to the "inlet". If you have another inlet, I think you need to the same for it. This solver can solve both 2d and 3d flows. Hope that helps, fumiya |
Thanks again. So, it seems feasible and pretty easy. Let's see. If I have problems, I'll post them here.
Also, just one more question: I don't want to modify alpha, but I'd rather change mass flow or something like that to optimize my flow (in a fixed geometry). Do you think it is possible? Thanks a lot, Samuele |
Hi Samuele,
adjointShapeOptimizationFoam performs a "topological" optimization of the flow, i.e. it modifies the porosity of each cell; so at the end of the cycle you will know where you have to modify the geometry wrt the distribution of alpha. What you ask to perform ( change mass flow for example) I think it's not feasible with this kind of optimization and, by the way, with a fixed geometry. Hope this help Simone |
I am gonna try to edit the source. In this case I should be able to he the optimization I like best. Right?
|
That's for sure the best solution! :)
|
2 Attachment(s)
Something wrong in my case (see attached pictures).
Maybe it's wrong BC in U, Ua? Places, where I'm not sure: in 0/U Code:
inlet Code:
inlet |
Hi Avdeev,
The adjoint velocity direction is opposite to the primal. See the tutorial files. I hope this helps. Best regards, Sylvester |
Thanks, Sylvester.
0/U was ok. Problem was in Ua - now it's work fine: Code:
inlet |
adjointShapeOptimizationFoam/pitzDaily tutorial
Hi,
Judging from the direction of the adjoint velocity on the inlet of the pitzDaily tutorial, I think it converts a minimization problem of total pressure loss(=I) to the maximization problem of -I. If this is the case, the adjoint boundary conditions on the outlet boundary do not correctly correspond to the reference. I think lambda should be set to an negative value in constant/transportProperties file when solving minimization problems. In this case, you have to change the boundary condition of the adjoint velocity Ua: Code:
// For pitzDaily tutorial Fumiya |
All times are GMT -4. The time now is 13:20. |