Skip to content

Commit

Permalink
Fix BCs and geometry for pinball
Browse files Browse the repository at this point in the history
  • Loading branch information
jcallaham committed Oct 3, 2024
1 parent 9afa857 commit f0fdb6c
Show file tree
Hide file tree
Showing 6 changed files with 322,966 additions and 78,198 deletions.
2 changes: 1 addition & 1 deletion hydrogym/firedrake/envs/cylinder/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def cyl_velocity_field(self):
theta = atan2(ufl.real(self.y), ufl.real(self.x)) # Angle from origin
self.rad = fd.Constant(RADIUS)
# Tangential velocity
return ufl.as_tensor((self.rad * sin(theta), self.rad * cos(theta)))
return ufl.as_tensor((-self.rad * sin(theta), self.rad * cos(theta)))


class Cylinder(CylinderBase):
Expand Down
12 changes: 6 additions & 6 deletions hydrogym/firedrake/envs/pinball/fine.geo
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
n1 = 30.0;
n2 = 5.0;
n3 = 3;
x_ninf = -6.0;
x_pinf = 20.0;
y_inf = 6.0;
n3 = 1.0;
x_ninf = -20.0;
x_pinf = 40.0;
y_inf = 30.0;

// Cylinder points
R = 0.5;
Expand All @@ -15,15 +15,15 @@ Point(3) = { x0+0.0,y0+R, 0, 1/n1};
Point(4) = { x0-R,y0+0.0, 0, 1/n1};
Point(5) = { x0+0.0,y0-R, 0, 1/n1};

x0 = 1.5*1.866*R;
x0 = 1.5*1.732*R;
y0 = 1.5*R;
Point(6) = { x0, y0, 0, 1/n1};
Point(7) = { x0+R,y0+0.0, 0, 1/n1};
Point(8) = { x0+0.0,y0+R, 0, 1/n1};
Point(9) = { x0-R,y0+0.0, 0, 1/n1};
Point(10) = { x0+0.0,y0-R, 0, 1/n1};

x0 = 1.5*1.866*R;
x0 = 1.5*1.732*R;
y0 = -1.5*R;
Point(11) = { x0, y0, 0, 1/n1};
Point(12) = { x0+0.5,y0+0.0, 0, 1/n1};
Expand Down
Loading

0 comments on commit f0fdb6c

Please sign in to comment.