Coder Social home page Coder Social logo

rezaakb / pinns-torch Goto Github PK

View Code? Open in Web Editor NEW
113.0 2.0 22.0 53.09 MB

PINNs-Torch, Physics-informed Neural Networks (PINNs) implemented in PyTorch.

License: BSD 3-Clause "New" or "Revised" License

Python 85.51% Jupyter Notebook 14.11% Makefile 0.38%
cuda-graph jit-compiler physics-informed-neural-networks pinns pytorch

pinns-torch's People

Contributors

rezaakb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pinns-torch's Issues

Project root directory not found

I installed your packages as described and tried to run

python examples/navier_stokes/train.py

but i get an error;

`
Traceback (most recent call last):
File "[..]pinns-torch/examples/navier_stokes/train.py", line 8, in
import pinnstorch
File [..]local/lib/python3.10/site-packages/pinnstorch/init.py", line 1, in
from pinnstorch.train import train
File "[..].local/lib/python3.10/site-packages/pinnstorch/train.py", line 15, in
rootutils.setup_root(file, indicator=".project-root", pythonpath=True)
File "[..].local/lib/python3.10/site-packages/rootutils/rootutils.py", line 148, in setup_root
path = find_root(search_from, indicator)
File "[..].local/lib/python3.10/site-packages/rootutils/rootutils.py", line 70, in find_root
raise FileNotFoundError(f"Project root directory not found. Indicators: {indicator}")
FileNotFoundError: Project root directory not found. Indicators: ['.project-root']

`
Hope you can help...

How to set boundary conditions on arbitrary nodes in complex geometry

Why are the boundary conditions such as non-slip and inflow conditions not included in the loss in the example (aneurysm3D). I tried doing 3-D test calculation and cannot get a solution (loss doesn't decrease enough), probably because it does not consider the loss of the boundary conditions.

And I couldn't understand why epoch is set only 1 step in aneurysm3D example. Is it enough to predict three dimensional flow field ?

About solving 2D Poisson's equation

I would like to ask if it is possible to use this repository for solving 2D Poisson's equation? It would be nice if there is already implemented example for 2D poission equation. Thank you.

TypeError: unhashable type: 'list' Raised when the batch_size is set

Hi, thanks for your efforts on this wonderful project! When I am setting the batch_size in the config.yaml. There is error like this. I have seen the same issue, and tried to set the save_pred: true in the config.yaml, but still the same error.

main.py 94 decorated_main
_run_hydra(

utils.py 394 _run_hydra
_run_app(

utils.py 457 _run_app
run_and_report(

utils.py 223 run_and_report
raise ex

utils.py 220 run_and_report
return func()

utils.py 458 <lambda>
lambda: hydra.run(

hydra.py 132 run
_ = ret.return_value

utils.py 260 return_value
raise self._return_value

utils.py 186 run_job
ret.return_value = task_function(task_cfg)

train_real_temp.py 180 main
metric_dict, _ = pinnstorch.train(

utils.py 85 wrap
raise ex

utils.py 73 wrap
metric_dict, object_dict = task_func(

train.py 174 train
preds_list = trainer.predict(

trainer.py 864 predict
return call._call_and_handle_interrupt(

call.py 44 _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)

trainer.py 903 _predict_impl
results = self._run(model, ckpt_path=ckpt_path)

trainer.py 987 _run
results = self._run_stage()

trainer.py 1028 _run_stage
return self.predict_loop.run()

utilities.py 182 _decorator
return loop_run(self, *args, **kwargs)

prediction_loop.py 124 run
self._predict_step(batch, batch_idx, dataloader_idx, dataloader_iter)

prediction_loop.py 231 _predict_step
batch = call._call_strategy_hook(trainer, "batch_to_device", batch, dataloader_idx=dataloader_idx)

call.py 309 _call_strategy_hook
output = fn(*args, **kwargs)

strategy.py 278 batch_to_device
return model._apply_batch_transfer_handler(batch, device=device, dataloader_idx=dataloader_idx)

module.py 347 _apply_batch_transfer_handler
batch = self._call_batch_hook("transfer_batch_to_device", batch, device, dataloader_idx)

module.py 336 _call_batch_hook
return trainer_method(trainer, hook_name, *args)

call.py 157 _call_lightning_module_hook
output = fn(*args, **kwargs)

pinn_module.py 241 transfer_batch_to_device
self.copy_batch(batch)

pinn_module.py 329 copy_batch
spatial, time, solution = self.static_batch[key]

TypeError:
unhashable type: 'list'

it seems that the download link is broken

when I run the command python examples/navier_stokes/train.py, an error occurs:

[2024-06-09 09:50:04,184][pinnstorch.utils.utils][ERROR] -
Traceback (most recent call last):
File "/mnt/workspace/duhao/opt/anaconda3/envs/pinns/lib/python3.9/site-packages/urllib3/connectionpool.py", line 700, in urlopen
self._prepare_proxy(conn)
File "/mnt/workspace/duhao/opt/anaconda3/envs/pinns/lib/python3.9/site-packages/urllib3/connectionpool.py", line 996, in _prepare_proxy
conn.connect()
File "/mnt/workspace/duhao/opt/anaconda3/envs/pinns/lib/python3.9/site-packages/urllib3/connection.py", line 369, in connect
self._tunnel()
File "/mnt/workspace/duhao/opt/anaconda3/envs/pinns/lib/python3.9/http/client.py", line 930, in _tunnel
raise OSError(f"Tunnel connection failed: {code} {message.strip()}")
OSError: Tunnel connection failed: 407 Proxy Authentication Required

it seems that the download link is broken

Demo example in tutorial did not provide expected result

I just directly cloned this repository, had virtual env setup and ran tutorials/0-Schrodinger.ipynb, but the resulted prediction did not reach convergence. Is there any additional setting should be done or any hyperparameters?
image

what means of idx_t

I ran the Navier-Stokes example for solving the NS equation using PINN, but I'm unsure about the meaning of 'idx_t' in the 'pred_dataset' section. If it specifies time, can I obtain a time series of prediction results?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.