diff --git a/BscElectrolyteModels.egg-info/SOURCES.txt b/BscElectrolyteModels.egg-info/SOURCES.txt deleted file mode 100644 index ec989abfcf3359a0372724bcc4fc2f9cd9c274a0..0000000000000000000000000000000000000000 --- a/BscElectrolyteModels.egg-info/SOURCES.txt +++ /dev/null @@ -1,23 +0,0 @@ -LICENSE -README.md -pyproject.toml -setup.cfg -setup.py -BscElectrolyteModels.egg-info/PKG-INFO -BscElectrolyteModels.egg-info/SOURCES.txt -BscElectrolyteModels.egg-info/dependency_links.txt -BscElectrolyteModels.egg-info/entry_points.txt -BscElectrolyteModels.egg-info/requires.txt -BscElectrolyteModels.egg-info/top_level.txt -BscElectrolyteModels.egg-info/zip-safe -src/ElectrolyticDiode.py -src/Eq02.py -src/Eq04.py -src/EqN.py -src/Helper_DoubleLayerCapacity.py -src/__init__.py -tests/test_ElectrolyticDiode.py -tests/test_Eq02.py -tests/test_Eq04.py -tests/test_EqN.py -tests/test_Helper_DoubleLayerCapacity.py \ No newline at end of file diff --git a/BscElectrolyteModels.egg-info/top_level.txt b/BscElectrolyteModels.egg-info/top_level.txt deleted file mode 100644 index eac2d36c1ef1fda9a6f9c8786db84293051c1009..0000000000000000000000000000000000000000 --- a/BscElectrolyteModels.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -Bsc-ElectrolyteModels diff --git a/BscElectrolyteModels.egg-info/PKG-INFO b/FENICSxDGM.egg-info/PKG-INFO similarity index 94% rename from BscElectrolyteModels.egg-info/PKG-INFO rename to FENICSxDGM.egg-info/PKG-INFO index 4600c3ca15b76a50af6f556a017f94b85d207b6d..7e72ec7f367d3f0270c19fc46ddca6be7e681709 100644 --- a/BscElectrolyteModels.egg-info/PKG-INFO +++ b/FENICSxDGM.egg-info/PKG-INFO @@ -1,5 +1,5 @@ Metadata-Version: 2.1 -Name: BscElectrolyteModels +Name: FENICSxDGM Version: 1.0 Summary: A description is yet to follow Home-page: https://git.rwth-aachen.de/JanHab/Bsc-ElectrolyteModels @@ -9,7 +9,7 @@ License: GNU General Public License v3.0 or later Keywords: fenics-project,Battery Simulation,finite element method Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) Classifier: Programming Language :: Python :: 3 -Requires-Python: ==3.12.3 +Requires-Python: >=3.12.3 Description-Content-Type: text/markdown License-File: LICENSE Requires-Dist: pyvista==0.43.10 @@ -27,9 +27,9 @@ Requires-Dist: sphinx_rtd_theme==3.0.1; extra == "docs" Provides-Extra: build Requires-Dist: build>=0.7.0; extra == "build" Provides-Extra: dev -Requires-Dist: BScElectrolytemodels[tests]; extra == "dev" -Requires-Dist: BScElectrolytemodels[docs]; extra == "dev" -Requires-Dist: BScElectrolytemodels[build]; extra == "dev" +Requires-Dist: FENICSxDGM[tests]; extra == "dev" +Requires-Dist: FENICSxDGM[docs]; extra == "dev" +Requires-Dist: FENICSxDGM[build]; extra == "dev" # Reproducibility Repository for Numerical Treatment of a Thermodynamically Consistent Electrolyte Model (B.Sc. Thesis - Jan Habscheid) @@ -60,7 +60,7 @@ All the calculations were performed on a Linux machine. According to the documen ``` conda create --name fenicsx-env python=3.12.3 -y conda activate fenicsx-env -conda install -c conda-forge fenics-dolfinx=0.8.0 mpich=4.2.1 pyvista=0.43.10 matplotlib=3.8.4 numpy=1.26.4 scipy=1.14.0 pytest==8.3.3 -y +conda install -c conda-forge fenics-dolfinx=0.8.0 mpich=4.2.1 pyvista=0.43.10 gcc=12.4.0 matplotlib=3.8.4 numpy=1.26.4 scipy=1.14.0 pytest==8.3.3 -y ``` ### Alternative installation diff --git a/FENICSxDGM.egg-info/SOURCES.txt b/FENICSxDGM.egg-info/SOURCES.txt new file mode 100644 index 0000000000000000000000000000000000000000..800bc67c5ffac9ff09c51576d816759614dd16db --- /dev/null +++ b/FENICSxDGM.egg-info/SOURCES.txt @@ -0,0 +1,23 @@ +LICENSE +README.md +pyproject.toml +setup.cfg +setup.py +FENICSxDGM.egg-info/PKG-INFO +FENICSxDGM.egg-info/SOURCES.txt +FENICSxDGM.egg-info/dependency_links.txt +FENICSxDGM.egg-info/entry_points.txt +FENICSxDGM.egg-info/requires.txt +FENICSxDGM.egg-info/top_level.txt +FENICSxDGM.egg-info/zip-safe +src/ElectrolyticDiode.py +src/Eq02.py +src/Eq04.py +src/EqN.py +src/Helper_DoubleLayerCapacity.py +src/__init__.py +tests/test_ElectrolyticDiode.py +tests/test_Eq02.py +tests/test_Eq04.py +tests/test_EqN.py +tests/test_Helper_DoubleLayerCapacity.py \ No newline at end of file diff --git a/BscElectrolyteModels.egg-info/dependency_links.txt b/FENICSxDGM.egg-info/dependency_links.txt similarity index 100% rename from BscElectrolyteModels.egg-info/dependency_links.txt rename to FENICSxDGM.egg-info/dependency_links.txt diff --git a/BscElectrolyteModels.egg-info/entry_points.txt b/FENICSxDGM.egg-info/entry_points.txt similarity index 100% rename from BscElectrolyteModels.egg-info/entry_points.txt rename to FENICSxDGM.egg-info/entry_points.txt diff --git a/BscElectrolyteModels.egg-info/requires.txt b/FENICSxDGM.egg-info/requires.txt similarity index 72% rename from BscElectrolyteModels.egg-info/requires.txt rename to FENICSxDGM.egg-info/requires.txt index f08ddad2fbba14b117fd049223a2d5abadb233e2..ef44023b95a3d14015bfa0e082666fa7b1190c0b 100644 --- a/BscElectrolyteModels.egg-info/requires.txt +++ b/FENICSxDGM.egg-info/requires.txt @@ -6,9 +6,9 @@ scipy==1.14.0 build>=0.7.0 [dev] -BScElectrolytemodels[tests] -BScElectrolytemodels[docs] -BScElectrolytemodels[build] +FENICSxDGM[tests] +FENICSxDGM[docs] +FENICSxDGM[build] [docs] sphinx==7.3.7 diff --git a/FENICSxDGM.egg-info/top_level.txt b/FENICSxDGM.egg-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..a0ebb6eb232b72eaaab423f11a02573a18408250 --- /dev/null +++ b/FENICSxDGM.egg-info/top_level.txt @@ -0,0 +1 @@ +FENICSxDGM diff --git a/BscElectrolyteModels.egg-info/zip-safe b/FENICSxDGM.egg-info/zip-safe similarity index 100% rename from BscElectrolyteModels.egg-info/zip-safe rename to FENICSxDGM.egg-info/zip-safe diff --git a/build/lib/Bsc-ElectrolyteModels/__init__.py b/build/lib/Bsc-ElectrolyteModels/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/build/lib/Bsc-ElectrolyteModels/ElectrolyticDiode.py b/build/lib/FENICSxDGM/ElectrolyticDiode.py similarity index 100% rename from build/lib/Bsc-ElectrolyteModels/ElectrolyticDiode.py rename to build/lib/FENICSxDGM/ElectrolyticDiode.py diff --git a/build/lib/Bsc-ElectrolyteModels/Eq02.py b/build/lib/FENICSxDGM/Eq02.py similarity index 100% rename from build/lib/Bsc-ElectrolyteModels/Eq02.py rename to build/lib/FENICSxDGM/Eq02.py diff --git a/build/lib/Bsc-ElectrolyteModels/Eq04.py b/build/lib/FENICSxDGM/Eq04.py similarity index 100% rename from build/lib/Bsc-ElectrolyteModels/Eq04.py rename to build/lib/FENICSxDGM/Eq04.py diff --git a/build/lib/Bsc-ElectrolyteModels/EqN.py b/build/lib/FENICSxDGM/EqN.py similarity index 100% rename from build/lib/Bsc-ElectrolyteModels/EqN.py rename to build/lib/FENICSxDGM/EqN.py diff --git a/build/lib/Bsc-ElectrolyteModels/Helper_DoubleLayerCapacity.py b/build/lib/FENICSxDGM/Helper_DoubleLayerCapacity.py similarity index 100% rename from build/lib/Bsc-ElectrolyteModels/Helper_DoubleLayerCapacity.py rename to build/lib/FENICSxDGM/Helper_DoubleLayerCapacity.py diff --git a/build/lib/FENICSxDGM/__init__.py b/build/lib/FENICSxDGM/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18742b0a46d34b5481c083238d2930ed976c323e --- /dev/null +++ b/build/lib/FENICSxDGM/__init__.py @@ -0,0 +1,5 @@ +from .ElectrolyticDiode import ElectrolyticDiode +from .Eq02 import solve_System_2eq, create_refined_mesh +from .Eq04 import solve_System_4eq +from .EqN import solve_System_Neq +from .Helper_DoubleLayerCapacity import * \ No newline at end of file diff --git a/dist/BscElectrolyteModels-1.0-py3-none-any.whl b/dist/FENICSxDGM-1.0-py3-none-any.whl similarity index 77% rename from dist/BscElectrolyteModels-1.0-py3-none-any.whl rename to dist/FENICSxDGM-1.0-py3-none-any.whl index fd17b699cfa34864d347290b3d90d59d0c1e2287..de6fbfd32a614c32ba7a13917281e11d70c97f32 100644 Binary files a/dist/BscElectrolyteModels-1.0-py3-none-any.whl and b/dist/FENICSxDGM-1.0-py3-none-any.whl differ diff --git a/dist/fenicsxdgm-1.0.linux-x86_64.tar.gz b/dist/fenicsxdgm-1.0.linux-x86_64.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8e3f717f7cefacf05580c1564c869962d5fdfbb6 Binary files /dev/null and b/dist/fenicsxdgm-1.0.linux-x86_64.tar.gz differ diff --git a/dist/fenicsxdgm-1.0.tar.gz b/dist/fenicsxdgm-1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9e2fb5d7abd0441e5741e6b79817dc81ccab1327 Binary files /dev/null and b/dist/fenicsxdgm-1.0.tar.gz differ diff --git a/setup.cfg b/setup.cfg index d38a8f818a9483d56f32c832672a2ee394f41221..4a81424b1ed5b7d604bdfbab38e991dba085f0d7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = BScElectrolytemodels +name = FENICSxDGM version = attr: 1.0 author = Jan Habscheid, Manuel Torrilhon, Lambert Theisen author_email = Jan.Habscheid@rwth-aachen.de, lambert.theisen@rwth-aachen.de, mt@mathcces.rwth-aachen.de @@ -18,7 +18,7 @@ package_dir= =src packages = find: zip_safe = True -python_requires == 3.12.3 +python_requires >= 3.12.3 include_package_data = True install_requires = pyvista == 0.43.10 @@ -42,6 +42,6 @@ docs = sphinx_rtd_theme == 3.0.1 build = build >= 0.7.0 dev = - BScElectrolytemodels[tests] - BScElectrolytemodels[docs] - BScElectrolytemodels[build] \ No newline at end of file + FENICSxDGM[tests] + FENICSxDGM[docs] + FENICSxDGM[build] \ No newline at end of file diff --git a/setup.py b/setup.py index 5d16151a1ae45c78235d6ce914fd6145a2b293e2..8ebf6ca98835a76dc39f383911eebc8f50f22a0a 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,19 @@ from setuptools import setup, find_packages setup( - name="BscElectrolyteModels", + name="FENICSxDGM", version="1.0", description="A description is yet to follow", url="https://git.rwth-aachen.de/JanHab/Bsc-ElectrolyteModels", author="Jan Habscheid, Lambert Theisen, Manuel Torrilhon", author_email="Jan.Habscheid@rwth-aachen.de, lambert.theisen@rwth-aachen.de, mt@mathcces.rwth-aachen.de", - packages=["Bsc-ElectrolyteModels"], - package_dir={"Bsc-ElectrolyteModels":"src"}, - package_data={"Bsc-ElectrolyteModels": ["tests/*"]}, - python_requires="==3.12.3", + packages=["FENICSxDGM"], + # packages=find_packages("src"), + package_dir={"FENICSxDGM":"src"}, + # package_dir={"": "src"}, + package_data={"FENICSxDGM": ["tests/*"]}, + # package_data={"": ["tests/*"]}, + python_requires=">=3.12.3", install_requires=[ "pyvista == 0.43.10", "numpy == 1.26.4", diff --git a/src/FENICSxDGM.egg-info/PKG-INFO b/src/FENICSxDGM.egg-info/PKG-INFO new file mode 100644 index 0000000000000000000000000000000000000000..7e72ec7f367d3f0270c19fc46ddca6be7e681709 --- /dev/null +++ b/src/FENICSxDGM.egg-info/PKG-INFO @@ -0,0 +1,117 @@ +Metadata-Version: 2.1 +Name: FENICSxDGM +Version: 1.0 +Summary: A description is yet to follow +Home-page: https://git.rwth-aachen.de/JanHab/Bsc-ElectrolyteModels +Author: Jan Habscheid, Lambert Theisen, Manuel Torrilhon +Author-email: Jan.Habscheid@rwth-aachen.de, lambert.theisen@rwth-aachen.de, mt@mathcces.rwth-aachen.de +License: GNU General Public License v3.0 or later +Keywords: fenics-project,Battery Simulation,finite element method +Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) +Classifier: Programming Language :: Python :: 3 +Requires-Python: >=3.12.3 +Description-Content-Type: text/markdown +License-File: LICENSE +Requires-Dist: pyvista==0.43.10 +Requires-Dist: numpy==1.26.4 +Requires-Dist: scipy==1.14.0 +Provides-Extra: notebook +Requires-Dist: jupyter>=1.0.0; extra == "notebook" +Provides-Extra: tests +Requires-Dist: pytest==8.3.3; extra == "tests" +Provides-Extra: docs +Requires-Dist: sphinx==7.3.7; extra == "docs" +Requires-Dist: myst-parser==4.0.0; extra == "docs" +Requires-Dist: sphinx-copybotton==0.5.2; extra == "docs" +Requires-Dist: sphinx_rtd_theme==3.0.1; extra == "docs" +Provides-Extra: build +Requires-Dist: build>=0.7.0; extra == "build" +Provides-Extra: dev +Requires-Dist: FENICSxDGM[tests]; extra == "dev" +Requires-Dist: FENICSxDGM[docs]; extra == "dev" +Requires-Dist: FENICSxDGM[build]; extra == "dev" + +# Reproducibility Repository for Numerical Treatment of a Thermodynamically Consistent Electrolyte Model (B.Sc. Thesis - Jan Habscheid) + +[](https://git.rwth-aachen.de/Jan.Habscheid/bsc-electrolytemodels/pipelines) +[](https://janhab.pages.rwth-aachen.de/bsc-electrolytemodels/) +[](https://doi.org/10.5281/zenodo.13645296) +[](https://git.rwth-aachen.de/jan.habscheid/bsc-electrolytemodels/-/tags) +[](https://git.rwth-aachen.de/Jan.Habscheid/bsc-electrolytemodels/-/blob/main/LICENSE?ref_type=heads) + +## Thesis + +This repository contains the code to reproduce the results presented in the bachelor thesis: Numerical Treatment of a Thermodynamically Consistent Electrolyte Model +Find the thesis at [https://doi.org/10.18154/RWTH-2024-09837](https://doi.org/10.18154/RWTH-2024-09837) + +### Abstract + +Batteries play a crucial role in the energy transition. The production of green energy depends on external factors. Storing energy in batteries is necessary to access green energy at any time. + +Better optimized batteries are essential for the future. Lifetime, loading time, and energy loss are just some aspects that must be improved to prepare for a greener future. Numerical simulations are crucial to understanding and optimizing batteries' behavior. Those simulations enable researchers to test many different materials without considerable additional expenses to, for example, find the best combination of anions and cations. + +The classical Nernst-Planck model for the ion transport in an electrolyte fails to predict the correct concentration in the boundaries of the electrolyte. This work will present and analyze a thermodynamically consistent electrolyte model with dimensionless units under isothermal conditions. A simplified version of the system for the one-dimensional equilibrium of an ideal mixture and the incompressible limit will be considered. The numerical implementation of the model with the open-source software FEniCSx will be discussed. Furthermore, the influence of different boundary conditions, material parameters, solvation, and compressibility on the electric potential, pressure, and ion concentration will be investigated, and the model will be compared with the classical Nernst-Planck model. Examples of the double layer capacity and electrolytic diode will be considered. + +## Installation + +As a numerical solver, mainly FEniCSx was used and installed via conda. +All the calculations were performed on a Linux machine. According to the documentation, everything should work well on macOS, but this was not tested. FEniCSx offers some beta versions for Windows support, but it is recommended to use WSL2 instead. + +``` +conda create --name fenicsx-env python=3.12.3 -y +conda activate fenicsx-env +conda install -c conda-forge fenics-dolfinx=0.8.0 mpich=4.2.1 pyvista=0.43.10 gcc=12.4.0 matplotlib=3.8.4 numpy=1.26.4 scipy=1.14.0 pytest==8.3.3 -y +``` + +### Alternative installation + +Use the "environment.yml" file to install all necessary environments + +``` +conda env create -f environment.yml +``` + +### macOS installation using Docker + +``` +docker compose build +docker compose run solver +``` + +### Testing + +Use pytest with +``` +python -m pytest +``` + +to verify that everything was installed correctly. + + +## Usage + +Find the visualizations from the thesis and some extra calculations in the "examples" folder. +In the subfolder "ReproducableCode" is the code, to execute the calculations with some first visualizations. +The subfolder "Data" stores the data for all the simulations in a *.npz file, which can be read with numpy `np.load(file.npz)`. +"Visualizations" creates the necessary figures from the thesis and stores them in *.svg format in "Figures". + +In "src" there are the generic FEniCSx implementations, that were used to calculate the examples. + + +## Contact + +**Author** +- Jan Habscheid +- Jan.Habscheid@rwth-aachen.de + +**Supervisor** +- Dr. Lambert Theissen +- ACoM - Applied and Computational Mathematics +- RWTH Aachen University +- theisen@acom.rwth-aachen.de + +**Supervisor** +- Prof. Dr. Manuel Torrilhon +- ACoM - Applied and Computational Mathematics +- RWTH Aachen University +- mt@acom.rwth-aachen.de diff --git a/src/FENICSxDGM.egg-info/SOURCES.txt b/src/FENICSxDGM.egg-info/SOURCES.txt new file mode 100644 index 0000000000000000000000000000000000000000..d9be7a858f3a0ecafa61865c948a3291f417312e --- /dev/null +++ b/src/FENICSxDGM.egg-info/SOURCES.txt @@ -0,0 +1,23 @@ +LICENSE +README.md +pyproject.toml +setup.cfg +setup.py +src/ElectrolyticDiode.py +src/Eq02.py +src/Eq04.py +src/EqN.py +src/Helper_DoubleLayerCapacity.py +src/__init__.py +src/FENICSxDGM.egg-info/PKG-INFO +src/FENICSxDGM.egg-info/SOURCES.txt +src/FENICSxDGM.egg-info/dependency_links.txt +src/FENICSxDGM.egg-info/entry_points.txt +src/FENICSxDGM.egg-info/requires.txt +src/FENICSxDGM.egg-info/top_level.txt +src/FENICSxDGM.egg-info/zip-safe +tests/test_ElectrolyticDiode.py +tests/test_Eq02.py +tests/test_Eq04.py +tests/test_EqN.py +tests/test_Helper_DoubleLayerCapacity.py \ No newline at end of file diff --git a/src/FENICSxDGM.egg-info/dependency_links.txt b/src/FENICSxDGM.egg-info/dependency_links.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/src/FENICSxDGM.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/src/FENICSxDGM.egg-info/entry_points.txt b/src/FENICSxDGM.egg-info/entry_points.txt new file mode 100644 index 0000000000000000000000000000000000000000..7bcc5d3ffd0275679d5e3d0d72b5a5c1dabcd4d6 --- /dev/null +++ b/src/FENICSxDGM.egg-info/entry_points.txt @@ -0,0 +1,2 @@ +[console_scripts] +my-example-utility = example.example_module:main diff --git a/src/FENICSxDGM.egg-info/requires.txt b/src/FENICSxDGM.egg-info/requires.txt new file mode 100644 index 0000000000000000000000000000000000000000..ef44023b95a3d14015bfa0e082666fa7b1190c0b --- /dev/null +++ b/src/FENICSxDGM.egg-info/requires.txt @@ -0,0 +1,23 @@ +pyvista==0.43.10 +numpy==1.26.4 +scipy==1.14.0 + +[build] +build>=0.7.0 + +[dev] +FENICSxDGM[tests] +FENICSxDGM[docs] +FENICSxDGM[build] + +[docs] +sphinx==7.3.7 +myst-parser==4.0.0 +sphinx-copybotton==0.5.2 +sphinx_rtd_theme==3.0.1 + +[notebook] +jupyter>=1.0.0 + +[tests] +pytest==8.3.3 diff --git a/src/FENICSxDGM.egg-info/top_level.txt b/src/FENICSxDGM.egg-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..a0ebb6eb232b72eaaab423f11a02573a18408250 --- /dev/null +++ b/src/FENICSxDGM.egg-info/top_level.txt @@ -0,0 +1 @@ +FENICSxDGM diff --git a/src/FENICSxDGM.egg-info/zip-safe b/src/FENICSxDGM.egg-info/zip-safe new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/src/FENICSxDGM.egg-info/zip-safe @@ -0,0 +1 @@ + diff --git a/src/__init__.py b/src/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bcc2039fe9be304ccc005c2e9ca2650a9a1520e3 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -0,0 +1,5 @@ +from .ElectrolyticDiode import ElectrolyticDiode +from .Eq02 import solve_System_2eq +from .Eq04 import solve_System_4eq, create_refined_mesh +from .EqN import solve_System_Neq +from .Helper_DoubleLayerCapacity import * \ No newline at end of file diff --git a/src/__pycache__/__init__.cpython-312.pyc b/src/__pycache__/__init__.cpython-312.pyc index 19664c3690d8a063333fd239f1546b1f8295d536..9c87bd1f102a448ab968c971a61bb8e63da79017 100644 Binary files a/src/__pycache__/__init__.cpython-312.pyc and b/src/__pycache__/__init__.cpython-312.pyc differ diff --git a/test_install.ipynb b/test_install.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..dac775abc086aeb0ca10aadf92b155421d427ea0 --- /dev/null +++ b/test_install.ipynb @@ -0,0 +1,84 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import FENICSxDGM as DGM" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "phi_left = 5.0\n", + "phi_right = 0.0\n", + "p_right = 0.0\n", + "y_A_R = 1/3\n", + "y_C_R = 1/3\n", + "z_A = -1.0\n", + "z_C = 1.0\n", + "K = 'incompressible'\n", + "Lambda2 = 8.553e-6\n", + "a2 = 7.5412e-4\n", + "number_cells = 1024\n", + "relax_param = .1\n", + "rtol = 1e-4\n", + "max_iter = 500" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "ename": "AttributeError", + "evalue": "module 'src' has no attribute 'solve_System_2eq'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[5], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m y_A, y_C, phi, p, x \u001b[38;5;241m=\u001b[39m \u001b[43mDGM\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msolve_System_2eq\u001b[49m(phi_left, phi_right, p_right, z_A, z_C, y_A_R, y_C_R, K, Lambda2, a2, number_cells, relax_param\u001b[38;5;241m=\u001b[39mrelax_param, x0\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0\u001b[39m, x1\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m, refinement_style\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124muniform\u001b[39m\u001b[38;5;124m'\u001b[39m, return_type\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mVector\u001b[39m\u001b[38;5;124m'\u001b[39m, max_iter\u001b[38;5;241m=\u001b[39mmax_iter, rtol\u001b[38;5;241m=\u001b[39mrtol)\n", + "\u001b[0;31mAttributeError\u001b[0m: module 'src' has no attribute 'solve_System_2eq'" + ] + } + ], + "source": [ + "y_A, y_C, phi, p, x = DGM.solve_System_2eq(phi_left, phi_right, p_right, z_A, z_C, y_A_R, y_C_R, K, Lambda2, a2, number_cells, relax_param=relax_param, x0=0, x1=1, refinement_style='uniform', return_type='Vector', max_iter=max_iter, rtol=rtol)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "fenicsx-env", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}