Skip to content

Commit

Permalink
Added test data, fixed ptyhon code to run with the test data added de…
Browse files Browse the repository at this point in the history
…pendency
  • Loading branch information
samvanderzwan committed Sep 10, 2024
1 parent ff84f88 commit 7c7ec3a
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 5 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Lockgate

Modules to calcualte the forces on lock gates.
Modules to calculate the forces on lock gates.
It consists of different modules to calcualte the force for different situations.
The following modules are identified:

1. Lockgate1:
2. Lockgate2:
3. Lockgate3:
4. Lockgate4:
5. Lockgate5:
6. Lockgate6:
7. Lockgate7:
8. Lockgate8:

More info can be found on read the docs
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]
authors = [
{ name = "Sam van der Zwan", email = "[email protected]" },
]
description = "Modules to calcualte the forces on lock gates."
description = "Modules to calculate the forces on lock gates."
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
Expand All @@ -19,7 +19,9 @@ classifiers = [
"Topic :: Scientific/Engineering :: Physics",
]

dependencies = ["coloredlogs~=15.0.1"]
dependencies = ["coloredlogs~=15.0.1",
"numpy~=1.21.2",
]

[project.optional-dependencies]
dev = [
Expand Down
2 changes: 1 addition & 1 deletion src/lockgate/lockgate3/LGATE3.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,5 @@ def gate7(fileName):
fileout.close()

if __name__ == "__main__":
filename = 'B001'
filename = r'.\test_data\lockgate3\B001'
gate7(filename)
4 changes: 3 additions & 1 deletion src/lockgate/lockgate8/REFL2.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ def refl(fileName, maxsteps):
alfa = (hlm-hv)/na0
print(alfa)
fileout.close()


if __name__ == "__main__":
maxsteps = 500 # Number of steps going over a period of wave between two sections
filename = 'R21'
filename = r'.\test_data\lockgate8\R21'
refl(filename, maxsteps)
7 changes: 7 additions & 0 deletions test_data/lockgate3/B001.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-5.00 12.00
-4.90 12.50 0.40 1.00 0.00
13.00 1.50
0.90 0.70 0.90 0.70
0.00
1000. 0.02
-.01309
15 changes: 15 additions & 0 deletions test_data/lockgate8/R10.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
** Hv Zk
0.00 -4.00
** LAB LCD LEF LGH LIJ LKL
3.75 7.50 7.50 7.50 7.50 3.75
** BAB BCD BEF BGH BIJ BKL
25.00 22.00 19.00 16.00 13.00 10.00
** dt tinit tend
0.05 0.00 240.00
** NTM
4
** TM QM
-10.00 10.00
0.00 10.00
100.00 10.00
500.00 10.00
9 changes: 9 additions & 0 deletions test_data/lockgate8/R20.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
0.00 -4.00
7.50 15.00 15.00 15.00 15.00 7.50
40.00 34.00 28.00 22.00 16.00 10.00
0.1 0.00 240.00
4
-10.00 10.00
0.00 10.00
100.00 10.00
500.00 10.00
9 changes: 9 additions & 0 deletions test_data/lockgate8/R21.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
0.00 -4.00
7.50 15.00 15.00 15.00 15.00 7.50
40.00 40.00 40.00 40.00 40.00 40.00
0.1 0.00 240.00
4
-10.00 10.00
0.00 10.00
100.00 10.00
500.00 10.00

0 comments on commit 7c7ec3a

Please sign in to comment.