Skip to content

Commit 35b8b34

Browse files
switch to uniform sample
1 parent d406c27 commit 35b8b34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

perpendicular-flap/fluid-nutils/fluid.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# for details on this solver see https://doi.org/10.1002/nme.6443
99

10-
def main(inflow=10., viscosity=1., density=1., theta=.5, timestepsize=.01):
10+
def main(inflow=10., viscosity=1., density=1., theta=.5, timestepsize=.01, npoints_per_elem=3):
1111

1212
# mesh and geometry definition
1313
topo, geom = mesh.rectilinear([
@@ -54,7 +54,7 @@ def main(inflow=10., viscosity=1., density=1., theta=.5, timestepsize=.01):
5454
ns.urel_i = 'ubasis_ni ?lhs_n' # relative velocity
5555
ns.u_i = 'umesh_i + urel_i' # total velocity
5656
ns.p = 'pbasis_n ?lhs_n' # pressure
57-
ns.qw = couplingsample.asfunction(numpy.concatenate([p.weights for p in couplingsample.points]))
57+
ns.qw = 1 / npoints_per_elem
5858

5959
# boundary conditions for fluid equations
6060
sqr = domain.boundary['wall,flap'].integral('urel_k urel_k d:x0' @ ns, degree=4)

0 commit comments

Comments
 (0)