-
Notifications
You must be signed in to change notification settings - Fork 2
Increasing the usage #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also instead of plotting maybe we can make a time dependent solver and try running it in a simple mesh to see how it goes. |
Thanks for the pull request! WebGPU can be a solution. Additionally, using a more memory-efficient linear solver would help. Currently, I’m using lusolve (LU Decomposition), which isn’t ideal for large problems (mesh size ~1000, as you noted). An iterative solver (e.g. GMRES) would be a better option. However, I believe both improvements can be combined (i.e. implementing an iterative solver optimized for GPU). I can create a roadmap for such an implementation. |
Yes! exactly i think openfoam using such solvers which are memory efficient to achieve near accurate results. If it is possible like that we can offload chunks of the computation to seperate workers and offload asynchronously to webgpu maybe? |
Yes, we should do that. I believe that using iterative solvers on the GPU is the only way to have an efficient CFD solver in JS. Also, iterative solvers can produce results as accurate as direct solvers, but they require more iterations (however they use less memory and are better for parallel execution). |
If possible compile this into a npm library that might be good. |
I'll look into this, thanks for your suggestion |
I can help you with that if needed |
I've temporarily disabled the web worker export due to persistent CORS issues when loading Comlink from CDN. Once we resolve these cross-origin restrictions (either by bundling Comlink locally or finding a compatible CDN), we can re-enable this feature. See here: 8e478dd |
That can be solved once we use the es export as per the standard that we will follow if we make it as a library in npm. I have solved the issue locally but i think its better to use es dynamic import as that will always maintain the functionality. Is it okay? And if it is then we can restructure the src into a library. |
@sridhar-mani Yes, making FEAScript into an npm library would definitely help. This would address the issues with CORS. I'll need a bit of time to read up on npm packaging (I am not as experienced as you in this). |
No worries. I'm working on writing a import module to import tetra meshes from gmesh. Want a clarification whether that is the best mesh format for FEA. FYI-Saw the pr its good to use it from local. And it would solve the issue for now in the current stage. |
Originally posted by @sridhar-mani in #5 I have implemented a simple iterative solver (Jacobi Method) - https://github.com/FEAScript/FEAScript-core/blob/main/src/methods/jacobiMethodScript.js |
GPU.js is also a light weight gpu programming wrapper in js. Taichi.js is superior to it. |
Currently with the web worker also when we reach the mesh size of about 1000 or so we get memory issue. I am not a CFD person so i'm guessing a workaround is needed to run the simulation in the WebGPU offloading all the work load to it and only plotting the result.
The text was updated successfully, but these errors were encountered: