Skip to content

Increasing the usage #10

Closed
Closed

Description

@sridhar-mani

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.

Activity

  1. sridhar-mani commented on Apr 20, 2025

    @sridhar-mani
    ContributorAuthor

    GPU.js is also a light weight gpu programming wrapper in js. Taichi.js is superior to it.

  2. nikoscham commented on Apr 23, 2025

    @nikoscham
    Member

    If it is possible like that we can offload chunks of the computation to separate workers

    I've made some updates with Web Workers. Here's a 2D fin tutorial using a worker:
    https://feascript.com/tutorials/HeatConduction2DFinWorker.html
    To run this, from the FEAScript website, you will need to disable "cross-origin" restrictions in your browser. For example for the Chromium browser I use the command chromium-browser --disable-web-security --user-data-dir="/tmp/chrome-cors" --disable-site-isolation-trials

    To resolve this CORS issue properly, we have two main options:

    1. Copy the FEAScript-core files into the website repository (https://github.com/FEAScript/FEAScript-website) to ensure same-origin or
    2. Host the FEAScript-core library on a dedicated server (not GitHub Pages) that allows for the configuration of appropriate CORS headers.

    Please share any other potential solutions you might have. Thanks again for the contribution!

  3. nikoscham commented on Apr 23, 2025

    @nikoscham
    Member

    I have also created this minimal Web Worker example https://feascript.com/tutorials/heat-conduction-2d-fin-worker.html
    I have reduced the mesh size, as the 36x18 version took quite a while to run. We need a faster linear solver here!

  4. sridhar-mani commented on Apr 23, 2025

    @sridhar-mani
    ContributorAuthor

    If it is possible like that we can offload chunks of the computation to separate workers

    I've made some updates with Web Workers. Here's a 2D fin tutorial using a worker: https://feascript.com/tutorials/HeatConduction2DFinWorker.html To run this, from the FEAScript website, you will need to disable "cross-origin" restrictions in your browser. For example for the Chromium browser I use the command chromium-browser --disable-web-security --user-data-dir="/tmp/chrome-cors" --disable-site-isolation-trials

    To resolve this CORS issue properly, we have two main options:

    1. Copy the FEAScript-core files into the website repository (https://github.com/FEAScript/FEAScript-website) to ensure same-origin or
    2. Host the FEAScript-core library on a dedicated server (not GitHub Pages) that allows for the configuration of appropriate CORS headers.

    Please share any other potential solutions you might have. Thanks again for the contribution!

    Packaging FEAScript-core as an ES6 module and publishing it as an npm library is one of the cleanest and most future-proof solutions.

  5. nikoscham commented on Apr 23, 2025

    @nikoscham
    Member

    If it is possible like that we can offload chunks of the computation to separate workers

    I've made some updates with Web Workers. Here's a 2D fin tutorial using a worker: https://feascript.com/tutorials/HeatConduction2DFinWorker.html To run this, from the FEAScript website, you will need to disable "cross-origin" restrictions in your browser. For example for the Chromium browser I use the command chromium-browser --disable-web-security --user-data-dir="/tmp/chrome-cors" --disable-site-isolation-trials
    To resolve this CORS issue properly, we have two main options:

    1. Copy the FEAScript-core files into the website repository (https://github.com/FEAScript/FEAScript-website) to ensure same-origin or
    2. Host the FEAScript-core library on a dedicated server (not GitHub Pages) that allows for the configuration of appropriate CORS headers.

    Please share any other potential solutions you might have. Thanks again for the contribution!

    Packaging FEAScript-core as an ES6 module and publishing it as an npm library is one of the cleanest and most future-proof solutions.

    Great, we’ll go ahead with that. I just want to finalize a couple of features before we prepare the first release (v0.1.0). These are: 1) finalize the 1D solid heat transfer solver and 2) the .msh meshes import. Once those are in place, we will publish it to npm.

  6. sridhar-mani commented on Apr 23, 2025

    @sridhar-mani
    ContributorAuthor

    If it is possible like that we can offload chunks of the computation to separate workers

    I've made some updates with Web Workers. Here's a 2D fin tutorial using a worker: https://feascript.com/tutorials/heat-conduction-2d-fin-worker.html To run this, from the FEAScript website, you will need to disable "cross-origin" restrictions in your browser. For example for the Chromium browser I use the command chromium-browser --disable-web-security --user-data-dir="/tmp/chrome-cors" --disable-site-isolation-trials
    To resolve this CORS issue properly, we have two main options:

    1. Copy the FEAScript-core files into the website repository (https://github.com/FEAScript/FEAScript-website) to ensure same-origin or
    2. Host the FEAScript-core library on a dedicated server (not GitHub Pages) that allows for the configuration of appropriate CORS headers.

    Please share any other potential solutions you might have. Thanks again for the contribution!

    Packaging FEAScript-core as an ES6 module and publishing it as an npm library is one of the cleanest and most future-proof solutions.

    Great, we’ll go ahead with that. I just want to finalize a couple of features before we prepare the first release (v0.1.0). These are: 1) finalize the 1D solid heat transfer solver and 2) the .msh meshes import. Once those are in place, we will publish it to npm.

    Sure we can do it. Also go through this library and see if its okay to integrate this also:https://github.com/amandaghassaei/msh-parser.

  7. nikoscham commented on Apr 27, 2025

    @nikoscham
    Member

    Also go through this library and see if its okay to integrate this also:https://github.com/amandaghassaei/msh-parser.

    Maybe we could try incorporate it in the FEAScript platform. However, I am concerned since it doesn't seem to be actively maintained and also it doesn't seem to work with the 2D meshes I have tried..

    By the way, FEAScript platform is the latest addition to the project - a browser-based visual editor. You can test it by downloading this XML example and loading it into the FEAScript platform. Let me know what you think if you check it out!

  8. nikoscham commented on May 13, 2025

    @nikoscham
    Member

    I just want to finalize a couple of features before we prepare the first release (v0.1.0). These are: 1) finalize the 1D solid heat transfer solver and 2) the .msh meshes import. Once those are in place, we will publish it to npm.

    Sure we can do it.

    These tasks are now complete — the first release is just around the corner! I’ll run some tests over the next 1–2 days to make sure everything is working properly. We will proceed with the npm packaging after that.

  9. sridhar-mani commented on May 13, 2025

    @sridhar-mani
    ContributorAuthor

    Yeah maybe we can try to modularize the code such that it can be a lego like approach like openfoam.

  10. nikoscham commented on May 13, 2025

    @nikoscham
    Member

    Yeah maybe we can try to modularize the code such that it can be a lego like approach like openfoam.

    Yes, that's my goal too. Hopefully, we'll get there as development progresses. The idea is to have solvers (e.g., solidHeatTransferScript) that are complete applications for specific types of simulations, analogous to OpenFOAM solvers (e.g., solidFoam). These solvers would call reusable components of the software, such as meshGenerationScript, basisFunctionsScript, numericalIntegrationScript, etc. Ideally, the integration between solvers and reusable components will become more robust and efficient as the project matures.

  11. nikoscham commented on May 19, 2025

    @nikoscham
    Member

    This issue has been added to the FEAScript roadmap for the upcoming 0.2.0 release (https://github.com/orgs/FEAScript/discussions/17). Specifically, it concerns using GPU acceleration to speed up iterative solvers.

    Tasks

  12. changed the issue type fromtoon May 19, 2025
  13. linked a pull request that will close this issueAdded worker #9on Oct 7, 2025
  14. linked a pull request that will close this issueFeature/web gpu #53on Oct 23, 2025
  15. linked a pull request that will close this issueFeature/consolidate solvers #56on Nov 5, 2025
  16. added this to the 0.2.0 milestone on Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions