Skip to content

Commit

Permalink
Resolved a bug, which was due to newly implemented spring damper forc…
Browse files Browse the repository at this point in the history
…e calculation
  • Loading branch information
jellepoland committed Aug 13, 2024
1 parent 6f08131 commit 3a409c6
Show file tree
Hide file tree
Showing 29 changed files with 499 additions and 449 deletions.
14 changes: 7 additions & 7 deletions Simulations/Gao_et_al.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
import matplotlib.pyplot as plt
from scipy.constants import c

from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem
from Particle_System_Simulator.Sim.simulations import Simulate_Lightsail
import Particle_System_Simulator.Mesh.mesh_functions as MF
import Particle_System_Simulator.ExternalForces.optical_interpolators.interpolators as interp
from Particle_System_Simulator.ExternalForces.LaserBeam import LaserBeam
from Particle_System_Simulator.ExternalForces.OpticalForceCalculator import (
from PSS.particleSystem.ParticleSystem import ParticleSystem
from PSS.Sim.simulations import Simulate_Lightsail
import PSS.Mesh.mesh_functions as MF
import PSS.ExternalForces.optical_interpolators.interpolators as interp
from PSS.ExternalForces.LaserBeam import LaserBeam
from PSS.ExternalForces.OpticalForceCalculator import (
OpticalForceCalculator,
)
from Particle_System_Simulator.ExternalForces.OpticalForceCalculator import (
from PSS.ExternalForces.OpticalForceCalculator import (
ParticleOpticalPropertyType,
)

Expand Down
14 changes: 7 additions & 7 deletions Simulations/Gao_et_al_sweep_dirty.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
import matplotlib.pyplot as plt
from scipy.constants import c

from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem
from Particle_System_Simulator.Sim.simulations import Simulate_Lightsail
import Particle_System_Simulator.Mesh.mesh_functions as MF
import Particle_System_Simulator.ExternalForces.optical_interpolators.interpolators as interp
from Particle_System_Simulator.ExternalForces.LaserBeam import LaserBeam
from Particle_System_Simulator.ExternalForces.OpticalForceCalculator import (
from PSS.particleSystem.ParticleSystem import ParticleSystem
from PSS.Sim.simulations import Simulate_Lightsail
import PSS.Mesh.mesh_functions as MF
import PSS.ExternalForces.optical_interpolators.interpolators as interp
from PSS.ExternalForces.LaserBeam import LaserBeam
from PSS.ExternalForces.OpticalForceCalculator import (
OpticalForceCalculator,
)
from Particle_System_Simulator.ExternalForces.OpticalForceCalculator import (
from PSS.ExternalForces.OpticalForceCalculator import (
ParticleOpticalPropertyType,
)

Expand Down
14 changes: 7 additions & 7 deletions Simulations/Simple_config_round.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
from scipy.interpolate import griddata
from scipy.interpolate import interp1d

from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem
from Particle_System_Simulator.Sim.simulations import Simulate_Lightsail
import Particle_System_Simulator.Mesh.mesh_functions as MF
import Particle_System_Simulator.ExternalForces.optical_interpolators.interpolators as interp
from Particle_System_Simulator.ExternalForces.LaserBeam import LaserBeam
from Particle_System_Simulator.ExternalForces.OpticalForceCalculator import (
from PSS.particleSystem.ParticleSystem import ParticleSystem
from PSS.Sim.simulations import Simulate_Lightsail
import PSS.Mesh.mesh_functions as MF
import PSS.ExternalForces.optical_interpolators.interpolators as interp
from PSS.ExternalForces.LaserBeam import LaserBeam
from PSS.ExternalForces.OpticalForceCalculator import (
OpticalForceCalculator,
)
from Particle_System_Simulator.ExternalForces.OpticalForceCalculator import (
from PSS.ExternalForces.OpticalForceCalculator import (
ParticleOpticalPropertyType,
)

Expand Down
2 changes: 1 addition & 1 deletion Tutourial/Poisson's Ratio.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"\n",
"sys.path.append(os.path.abspath(\"../.\"))\n",
"sys.path.append(os.path.abspath(\"../..\"))\n",
"from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem\n",
"from PSS.particleSystem.ParticleSystem import ParticleSystem\n",
"\n",
"matplotlib.rcParams[\"figure.figsize\"] = [10, 5]\n",
"# %matplotlib qt\n",
Expand Down
20 changes: 10 additions & 10 deletions Tutourial/Tutorial 1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 1,
"id": "db865830",
"metadata": {},
"outputs": [],
Expand All @@ -23,7 +23,7 @@
"import sys, os\n",
"\n",
"sys.path.append(os.path.abspath(\"..\"))\n",
"from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem\n",
"from PSS.particleSystem.ParticleSystem import ParticleSystem\n",
"\n",
"# dictionary of required parameters\n",
"params = {\n",
Expand Down Expand Up @@ -77,7 +77,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 2,
"id": "ff126088",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -161,7 +161,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 3,
"id": "d037c6dc",
"metadata": {},
"outputs": [
Expand All @@ -171,7 +171,7 @@
"Text(0.5, 0.92, 'Initial state')"
]
},
"execution_count": 24,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -229,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 4,
"id": "5a3e4150",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -287,7 +287,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 5,
"id": "f0ccc10f",
"metadata": {},
"outputs": [
Expand All @@ -297,7 +297,7 @@
"(0.1, 54.7)"
]
},
"execution_count": 13,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -356,7 +356,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 6,
"id": "9f376722",
"metadata": {},
"outputs": [
Expand All @@ -366,7 +366,7 @@
"Text(0.5, 0.92, 'Final state')"
]
},
"execution_count": 14,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
},
Expand Down
16 changes: 8 additions & 8 deletions Tutourial/Tutourial2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
"sys.path.append(os.path.abspath(\"..\"))\n",
"\n",
"# LLS specific imports\n",
"from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem\n",
"from Particle_System_Simulator.Sim.simulations import Simulate_Lightsail\n",
"import Particle_System_Simulator.Mesh.mesh_functions as MF\n",
"import Particle_System_Simulator.ExternalForces.optical_interpolators.interpolators as interp\n",
"from Particle_System_Simulator.ExternalForces.LaserBeam import LaserBeam\n",
"from Particle_System_Simulator.ExternalForces.OpticalForceCalculator import (\n",
"from PSS.particleSystem.ParticleSystem import ParticleSystem\n",
"from PSS.Sim.simulations import Simulate_Lightsail\n",
"import PSS.Mesh.mesh_functions as MF\n",
"import PSS.ExternalForces.optical_interpolators.interpolators as interp\n",
"from PSS.ExternalForces.LaserBeam import LaserBeam\n",
"from PSS.ExternalForces.OpticalForceCalculator import (\n",
" OpticalForceCalculator,\n",
")\n",
"from Particle_System_Simulator.ExternalForces.OpticalForceCalculator import (\n",
"from PSS.ExternalForces.OpticalForceCalculator import (\n",
" ParticleOpticalPropertyType,\n",
")"
]
Expand Down Expand Up @@ -681,7 +681,7 @@
"outputs": [],
"source": [
"# Importing necessary modules for optical interpolators\n",
"from Particle_System_Simulator.ExternalForces.optical_interpolators import (\n",
"from PSS.ExternalForces.optical_interpolators import (\n",
" interpolators as interp,\n",
")\n",
"\n",
Expand Down
6 changes: 3 additions & 3 deletions code_Validation/airbag_problem/airbag_square_cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import numpy as np
import matplotlib.pyplot as plt

from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem
from Particle_System_Simulator.Sim.simulations import Simulate_airbag
import Particle_System_Simulator.Mesh.mesh_functions as MF
from PSS.particleSystem.ParticleSystem import ParticleSystem
from PSS.Sim.simulations import Simulate_airbag
import PSS.Mesh.mesh_functions as MF

params = {
# model parameters
Expand Down
2 changes: 1 addition & 1 deletion code_Validation/hencky_problem/hencky_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import matplotlib.pyplot as plt
import pandas as pd
import time
from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem
from PSS.particleSystem.ParticleSystem import ParticleSystem


def instantiate_ps():
Expand Down
6 changes: 3 additions & 3 deletions code_Validation/inflated_SiN_membrane/inflated_membrane.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
import numpy as np
import matplotlib.pyplot as plt

from Particle_System_Simulator.particleSystem import ParticleSystem
from Particle_System_Simulator.Sim.simulations import Simulate_airbag
import Particle_System_Simulator.Mesh.mesh_functions as MF
from PSS.particleSystem import ParticleSystem
from PSS.Sim.simulations import Simulate_airbag
import PSS.Mesh.mesh_functions as MF

curve_fitting_parameters = {
"125": {"A1/s": 1.094e-02, "A2/s": 1.630e-04, "A1/r": 6.462e-03, "A2/r": 9.490e-05},
Expand Down
2 changes: 1 addition & 1 deletion code_Validation/saddle_form/saddle_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import matplotlib.pyplot as plt
import pandas as pd
import time
from Particle_System_Simulator.particleSystem import ParticleSystem
from PSS.particleSystem import ParticleSystem


def instantiate_ps():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pandas as pd
import sys
import time
from Particle_System_Simulator.particleSystem import ParticleSystem
from PSS.particleSystem import ParticleSystem

from sympy import *

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pandas as pd
import sys
import time
from Particle_System_Simulator.particleSystem import ParticleSystem
from PSS.particleSystem import ParticleSystem


def instantiate_ps():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import pandas as pd
import sys
import time
from Particle_System_Simulator.particleSystem import ParticleSystem
from Particle_System_Simulator.AnalysisModules import system_energy
from PSS.particleSystem import ParticleSystem
from PSS.AnalysisModules import system_energy


def instantiate_ps():
Expand Down
4 changes: 2 additions & 2 deletions code_Verification/damping_force/damping_force.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import pandas as pd
from scipy.integrate import solve_ivp
import sys
from Particle_System_Simulator.particleSystem import ParticleSystem
from Particle_System_Simulator.AnalysisModules import system_energy
from PSS.particleSystem import ParticleSystem
from PSS.AnalysisModules import system_energy


def instantiate_ps():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import matplotlib.pyplot as plt
import pandas as pd
import sys
from Particle_System_Simulator.particleSystem import ParticleSystem
from PSS.particleSystem import ParticleSystem


def instantiate_ps():
Expand Down
2 changes: 1 addition & 1 deletion code_Verification/spring_force/spring_force.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import matplotlib.pyplot as plt
import pandas as pd
import sys
from Particle_System_Simulator.particleSystem.ParticleSystem import ParticleSystem
from PSS.particleSystem.ParticleSystem import ParticleSystem


def connectivity_matrix():
Expand Down
2 changes: 1 addition & 1 deletion src/PSS/ExternalForces/LaserBeam.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np
import matplotlib.pyplot as plt
from Particle_System_Simulator.particleSystem.SystemObject import SystemObject
from PSS.particleSystem.SystemObject import SystemObject


class LaserBeam(SystemObject):
Expand Down
Loading

0 comments on commit 3a409c6

Please sign in to comment.