Skip to content

How to calculate the frictional and form drags in Navier_solver? #2033

Answered by jandrej
Watchmojo asked this question in Q&A
Discussion options

You must be logged in to vote

Both can be done in the application code (meaning no change to Navier is necessary). I would do the following for skin friction

  1. Retrieve the velocity GridFunction. (You should have that anyways because of initial conditions etc.)
  2. Create a GridFunctionCoefficient from it
  3. Create a new LinearForm
  4. Add the BoundaryNormalLFIntegrator with the GridFunctionCoefficient you just created
  5. Now you can (at any time you like, because the coefficients are automatically updated!) assemble this form and retrieve the quantity.

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.

T…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by tzanio
Comment options

You must be logged in to vote
2 replies
@jandrej
Comment options

@Watchmojo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants