Skip to content

Commit

Permalink
Merge branch 'i573' of github.com:NiklasVin/tutorials into i573
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasVin committed Oct 22, 2024
2 parents 4319fce + 0495678 commit 46c7d2b
Show file tree
Hide file tree
Showing 54 changed files with 990 additions and 182 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ REPE_OUT/
restart_flow_*.dat
forces_breakdown.dat
surface_flow_*.csv
history_*.csv
history*.csv

# ASTE
result.stats.json
Expand Down
1 change: 1 addition & 0 deletions changelog-entries/557.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added SDC from pySDC as new time-stepping scheme in [partitioned-heat-conduction tutorial](https://precice.org/tutorials-partitioned-heat-conduction.html) with FEniCS.
11 changes: 11 additions & 0 deletions channel-transport-reaction/chemical-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
numpy >1, <2
fenicsprecice~=2.0

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0

6 changes: 5 additions & 1 deletion channel-transport-reaction/chemical-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-package .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 chemical-reaction-advection-diffusion.py

close_log
close_log
10 changes: 10 additions & 0 deletions channel-transport-reaction/fluid-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
numpy >1, <2
fenicsprecice~=2.0

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
5 changes: 5 additions & 0 deletions channel-transport-reaction/fluid-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-package .venv
. .venv/bin/activate
pip install -r requirements.txt


python3 fluid.py

close_log
3 changes: 3 additions & 0 deletions elastic-tube-1d/fluid-python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matplotlib
numpy >1, <2
pyprecice~=3.0
4 changes: 4 additions & 0 deletions elastic-tube-1d/fluid-python/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 ./FluidSolver.py ../precice-config.xml

close_log
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
numpy >1, <2
pyprecice~=3.0
scipy
4 changes: 4 additions & 0 deletions elastic-tube-1d/solid-python/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 ./SolidSolver.py ../precice-config.xml

close_log
10 changes: 10 additions & 0 deletions elastic-tube-3d/solid-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fenicsprecice~=2.0
numpy >1, <2

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
7 changes: 7 additions & 0 deletions elastic-tube-3d/solid-fenics/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env bash
set -e -u

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-package .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 solid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmiprecice
4 changes: 4 additions & 0 deletions flow-around-controlled-moving-cylinder/controller-fmi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ if [ ! -f PIDcontroller.fmu ]; then
cd ../../
fi

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

fmiprecice ./fmi-settings.json ./precice-settings.json

close_log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pyprecice~=3.0
numpy >1, <2
4 changes: 4 additions & 0 deletions flow-around-controlled-moving-cylinder/solid-python/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 solid.py ../precice-config.xml

close_log
24 changes: 24 additions & 0 deletions flow-over-heated-plate/fluid-su2/laminar_config_unsteady.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,30 @@ LINEAR_SOLVER_ERROR= 1E-6
% Max number of iterations of the linear solver for the implicit formulation
LINEAR_SOLVER_ITER= 10

% -------------------------- MULTIGRID PARAMETERS -----------------------------%
%
% Multi-grid levels (0 = no multi-grid)
MGLEVEL= 3
%
% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE)
MGCYCLE= V_CYCLE
%
% Multi-grid pre-smoothing level
MG_PRE_SMOOTH= ( 1, 2, 3, 3 )
%
% Multi-grid post-smoothing level
MG_POST_SMOOTH= ( 0, 0, 0, 0 )
%
% Jacobi implicit smoothing of the correction
MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 )
%
% Damping factor for the residual restriction
MG_DAMP_RESTRICTION= 0.75
%
% Damping factor for the correction prolongation
MG_DAMP_PROLONGATION= 0.75


% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------%
%
% Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, HLLC,
Expand Down
10 changes: 10 additions & 0 deletions flow-over-heated-plate/solid-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fenicsprecice~=2.0
numpy >1, <2

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
4 changes: 4 additions & 0 deletions flow-over-heated-plate/solid-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 solid.py

close_log
8 changes: 4 additions & 4 deletions oscillator-overlap/mass-left-python/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -e -u

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r ../solver-python/requirements.txt

python3 ../solver-python/oscillator.py Mass-Left

close_log
8 changes: 4 additions & 4 deletions oscillator-overlap/mass-right-python/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -e -u

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r ../solver-python/requirements.txt

python3 ../solver-python/oscillator.py Mass-Right

close_log
1 change: 1 addition & 0 deletions oscillator/mass-left-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmiprecice
4 changes: 4 additions & 0 deletions oscillator/mass-left-fmi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ if [ ! -f ../solver-fmi/Oscillator.fmu ]; then
cd ../../../mass-left-fmi
fi

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

fmiprecice fmi-settings.json precice-settings.json
python3 ../solver-fmi/calculate-error.py ../mass-left-fmi/fmi-settings.json ../mass-left-fmi/precice-settings.json ../mass-right-fmi/fmi-settings.json ../mass-right-fmi/precice-settings.json Mass-Left

Expand Down
8 changes: 4 additions & 4 deletions oscillator/mass-left-python/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -e -u

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r ../solver-python/requirements.txt

python3 ../solver-python/oscillator.py Mass-Left

close_log
1 change: 1 addition & 0 deletions oscillator/mass-right-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmiprecice
4 changes: 4 additions & 0 deletions oscillator/mass-right-fmi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ if [ ! -f ../solver-fmi/Oscillator.fmu ]; then
cd ../../../mass-right-fmi
fi

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

fmiprecice fmi-settings.json precice-settings.json
python3 ../solver-fmi/calculate-error.py ../mass-left-fmi/fmi-settings.json ../mass-left-fmi/precice-settings.json ../mass-right-fmi/fmi-settings.json ../mass-right-fmi/precice-settings.json Mass-Right

Expand Down
3 changes: 0 additions & 3 deletions oscillator/mass-right-python/requirements.txt

This file was deleted.

8 changes: 4 additions & 4 deletions oscillator/mass-right-python/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -e -u

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r ../solver-python/requirements.txt

python3 ../solver-python/oscillator.py Mass-Right

close_log
1 change: 1 addition & 0 deletions oscillator/solver-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmiprecice
7 changes: 7 additions & 0 deletions oscillator/solver-python/mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[mypy]

[mypy-scipy.*]
ignore_missing_imports = True

[mypy-precice.*]
ignore_missing_imports = True
Loading

0 comments on commit 46c7d2b

Please sign in to comment.