Skip to content
Snippets Groups Projects
Commit 533017e6 authored by Chloé Mimeau's avatar Chloé Mimeau
Browse files

use Noca forces in the flow sphere example

parent 1169d73d
No related branches found
No related tags found
No related merge requests found
...@@ -214,13 +214,13 @@ cb = ControlBox(parent=box, origin=cbpos, length=cblength) ...@@ -214,13 +214,13 @@ cb = ControlBox(parent=box, origin=cbpos, length=cblength)
coeffForce = 1. / (0.5 * uinf ** 2 * pi * RADIUS ** 2) coeffForce = 1. / (0.5 * uinf ** 2 * pi * RADIUS ** 2)
io_forces=IOParams('drag_and_lift_NocaII') io_forces=IOParams('drag_and_lift_NocaII')
#monitors['forcesNoca'] = NocaForces(velo, vorti, monitors['forcesNoca'] = NocaForces(velo, vorti,
# discretization=topo_with_ghosts, discretization=topo_with_ghosts,
# nu=VISCOSITY, nu=VISCOSITY,
# volume_of_control=cb, volume_of_control=cb,
# normalization=coeffForce, normalization=coeffForce,
# obstacles=[sphere], obstacles=[sphere],
# io_params=io_forces) io_params=io_forces)
io_forcesPenal=IOParams('drag_and_lift_Mom') io_forcesPenal=IOParams('drag_and_lift_Mom')
monitors['forcesMom'] = MomentumForces(velocity=velo, monitors['forcesMom'] = MomentumForces(velocity=velo,
......
...@@ -405,6 +405,7 @@ class NocaForces(Forces): ...@@ -405,6 +405,7 @@ class NocaForces(Forces):
# --- First part of the integral --- # --- First part of the integral ---
# int(0.5 (uu)n - (nu)u) # int(0.5 (uu)n - (nu)u)
# i_n component # i_n component
nbc = self.velocity.nb_components
res[i_n] += 0.5 * normal * npw.real_sum( res[i_n] += 0.5 * normal * npw.real_sum(
sum([vd[j][ind] ** 2 for j in i_t]) - vd[i_n][ind] ** 2) sum([vd[j][ind] ** 2 for j in i_t]) - vd[i_n][ind] ** 2)
# other components # other components
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment