-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Both can be done in the application code (meaning no change to Navier is necessary). I would do the following for skin friction
See https://github.com/mfem/mfem/blob/master/miniapps/navier/navier_solver.cpp#L197 for similar usage and a hint how to use attributes for your "wall" that you want to integrate on. This can be done more straightforward, see the QoI computation in the TGV example. I recommend using the above mentioned way first. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your help. Here is what I have done for the form drag `void NavierSolver::ComputeCp() }` If I understand correctly, at the end of this function, Cp_bdr contains the integration of pn_gf in the normal direction (the interior grids/modes are marked zero). If the mesh is perfectly orthogonal and there is only one wall normal direction, summing Cp_bdr over all the processors will give the form drag. Right? If yes, what if the mesh is not orthogonal? In that case, Cp_bdr should be integrated while considering arbitrary wall normal directions for different locations. That is, the form drag in x, y, z directions should be calculated separated. How can this be done? I have done the following for the skin friction: } By the way, in ComputeCFL, there might be two minor issues: (1) hmin is the minimal dimension of element. Should it be the minimal grid size for each integration point? (2) Should CFL be calculated as follows: `---- |
Beta Was this translation helpful? Give feedback.
Both can be done in the application code (meaning no change to Navier is necessary). I would do the following for skin friction
GridFunction
. (You should have that anyways because of initial conditions etc.)GridFunctionCoefficient
from itLinearForm
BoundaryNormalLFIntegrator
with theGridFunctionCoefficient
you just createdSee https://github.com/mfem/mfem/blob/master/miniapps/navier/navier_solver.cpp#L197 for similar usage and a hint how to use attributes for your "wall" that you want to integrate on.
T…