Skip to content

Commit

Permalink
Fix experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
s9latimm committed Oct 20, 2024
1 parent f063f05 commit 2430f3b
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ jobs:
prerelease: false
files: |
classes.pdf
packages.pdf
Empty file removed src/be/__init__.py
Empty file.
9 changes: 0 additions & 9 deletions src/be/__main__.py

This file was deleted.

1 change: 1 addition & 0 deletions src/nse/model/experiments/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def __init__(
obstruction = Figure(Rectangle((4.7, .7), (5.3, 1.3)))

foam = Foam(
'block',
xs,
ys,
step,
Expand Down
4 changes: 3 additions & 1 deletion src/nse/model/experiments/empty.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ def __init__(
flow: float = 1,
_: bool = False,
) -> None:
name = Empty.__name__
step = .1
xs = Axis('x', 0, 10)
ys = Axis('y', 0, 2)
boundary = Figure(Line((0, 0), (10, 0)), Line((0, 2), (10, 2)))
obstruction = Figure()

foam = Foam(
name,
xs,
ys,
step,
Expand All @@ -32,7 +34,7 @@ def __init__(
)

super().__init__(
Empty.__name__,
name,
xs,
ys,
boundary,
Expand Down
3 changes: 2 additions & 1 deletion src/nse/model/experiments/foam.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Foam(Experiment):

def __init__(
self,
name: str,
x: Axis,
y: Axis,
step: float,
Expand All @@ -27,7 +28,7 @@ def __init__(
rho: float,
flow: float,
) -> None:
name = f'step-{step:.3f}-{nu:.3f}-{flow:02.0f}'.replace('.', '_')
name = f'{name.lower()}-{step:.3f}-{nu:.3f}-{flow:02.0f}'.replace('.', '_')
self.__grid = Grid(
x.arrange(step, True),
y.arrange(step, True),
Expand Down
4 changes: 3 additions & 1 deletion src/nse/model/experiments/slalom.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ def __init__(
flow: float = 1,
supervised: bool = False,
) -> None:
name = Slalom.__name__
step = .1
xs = Axis('x', 0, 10)
ys = Axis('y', 0, 2)
boundary = Figure(Line((0, 0), (10, 0)), Line((0, 2), (10, 2)))
obstruction = Figure(Rectangle((0, 0), (1, 1)), Rectangle((4.5, 1), (5.5, 2)))

foam = Foam(
name,
xs,
ys,
step,
Expand All @@ -32,7 +34,7 @@ def __init__(
)

super().__init__(
Slalom.__name__,
name,
xs,
ys,
boundary,
Expand Down
4 changes: 3 additions & 1 deletion src/nse/model/experiments/slit.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ def __init__(
flow: float = 1,
_: bool = False,
) -> None:
name = Slit.__name__
step = .1
xs = Axis('x', 0, 10)
ys = Axis('y', 0, 2)
boundary = Figure(Line((0, 0), (10, 0)), Line((0, 2), (10, 2)))
obstruction = Figure(Rectangle((4.7, 0), (5.3, .7)), Rectangle((4.7, 1.3), (5.3, 2)))

foam = Foam(
name,
xs,
ys,
step,
Expand All @@ -32,7 +34,7 @@ def __init__(
)

super().__init__(
Slit.__name__,
name,
xs,
ys,
boundary,
Expand Down
4 changes: 3 additions & 1 deletion src/nse/model/experiments/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ def __init__(
flow: float = 1,
supervised: bool = False,
) -> None:
name = Step.__name__
step = .1
xs = Axis('x', 0, 10)
ys = Axis('y', 0, 2)
boundary = Figure(Line((0, 0), (10, 0)), Line((0, 2), (10, 2)))
obstruction = Figure(Rectangle((0, 0), (1, 1)))

foam = Foam(
name,
xs,
ys,
step,
Expand All @@ -32,7 +34,7 @@ def __init__(
)

super().__init__(
Step.__name__,
name,
xs,
ys,
boundary,
Expand Down

0 comments on commit 2430f3b

Please sign in to comment.