Replies: 4 comments 7 replies
-
|
Is it because multiple line searches need to be performed within one optimization iteration cycle, and the sum of "ls" in the last column of the opt_IPOPT.txt file equals the total number of steady-state calculation iterations in the .out file? Also, is the field file written out only after each IPOPT optimization cycle? Could you please confirm if my understanding above is correct? |
Beta Was this translation helpful? Give feedback.
-
|
Regarding your questions. Yes, the total number of flow simulations is usually much higher than the number of optimization iterations because of the line search (ls column in the log). IPOPT's log file has the correct number of optimization iterations. In DAFoam, we do not know how many iterations IPOPT has, so DAFoam will save intermediate data, e.g., 0.0001, every time an adjoint solution is called. Therefore, the number of intermediate folders, e.g., 0.0001, can be slightly higher than the IPOPT iterations. This is because the optimizer sometimes calls the adjoint and then does not use it as the major optimization iteration. Regarding your observation about the drag difference, I suspect it is related to how you scale the drag in OpenFOAM's post-processing util. We verified DAFoam's drag vs OpenFOAM's built-in drag computations; they should be the same. |
Beta Was this translation helpful? Give feedback.
-
|
The problem is that you set rhoInf 998.8 in OpenFOAM, which is not quite right. If you are using an incompressible flow solver, like simpleFoam, you should always use rhoInf=1. This is because incompressible flow variables in OpenFOAM have already been normalized by rho. |
Beta Was this translation helpful? Give feedback.
-
|
@cfddinner, We are doing a campaign to collect DAFoam user feedback. Check this page. Are you available for a 30-minute Zoom meeting with our DAFoam team? If yes, please email me at [email protected]. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Recently, when I was running my own case using DAFoam, I encountered an issue: while the .out file has already completed over 30 iterations, only 15 sets of data are recorded in each partitioned "processor" folder, and the opt_IPOPT.txt file has only logged 12 rounds of optimization records.To be specific, I went through dozens of iterations shown in the .out file displayed in the first image, but IPOPT only recorded a dozen iterations. Moreover, the data between the two does not match. Therefore, should we refer to the .out file or the IPOPT output file to check the number of optimization iterations?



I have also noticed that there is a slight discrepancy in the drag calculation results between the one obtained using OpenFOAM's built-in post-processing tool and the one calculated by DAFoam.Additionally, I would like to use drag force as the objective function and configure the daOptions accordingly, but it seems that the drag force value is two orders of magnitude lower than expected.
daOptions = {
"solverName": "DASimpleFoam",
"designSurfaces": ["Fluid.model"],
"primalMinResTol": 1e-8,
"primalMinResTolDiff": 1e3,
"primalBC": {
},
"function": {
"Drag": {
"type": "force",
"source": "patchToFace",
"patches": ["Fluid.model"],
"directionMode": "fixedDirection",
"direction": [1.0, 0.0, 0.0],
"scale": 1.0,
},
},
Beta Was this translation helpful? Give feedback.
All reactions