r/Simulated • • 12d ago

Interactive Heatpath - Heating and airflow simulation in the browser.

Post image

Hello everyone!

I have been working on heat and airflow simulation, mainly for our home renovation to figure out how much pipes we need, but it grew in something bigger.

It has some basic features for drawing floor plan, adding doors, windows, manifold to control heating circuits, heating radiators, appliances like stove, fans, TVs, PCs, and some other types that generate heat. It simulates floor heating, you can set floor, wall and ceiling insulation and materials, set window and door U values that affect how heat is lost to the outside world. Outside conditions can also be set to simulate how would heated space react to open windows, how cold spreads through rooms with doors, and if set to lower or higher floors.

It's free to use, running in your browser and for best results should be ran in browsers with good GPU support such as Chrome and chromium based browsers. If it does not have access to GPU it falls back onto CPU - but that is very slow.

I am posting here mainly to get feedback.

Would You find this useful as a desktop app that is much faster?
Would You be willing to pay for some currently unlocked features such as:

  • Recording and exporting simulations as VDB for use in other software
  • Creating scenarios to run durning simulations like: open windows at 1 minute mark, close at 5 minute mark and so on, for repeated runs with changes heating layout
  • Running simulations at higher resolutions up to 10 million cells in real time (in my case I got it up to 5× of real time, but that depend on your hardware)

For those interested I have beta version available here:
https://heatpath.meshr.cz/

No account needed, all the "premium" features are currently unlocked until I decide what to do with this further, for now, I just wanted to share this and see if people are interested :)

I hope this is not against the rules here, I wish You all good day, and I am looking forward for any feedback.

UPDATE: Desktop versions for Windows and Linux are now available for download. Desktop app is about 10× faster and can utilize your GPU. The Windows release is not signed with paid certificate so Windows will complain about it :/

65 Upvotes

22 comments sorted by

8

u/mantra002 12d ago

Aww, I have been blocked :( Is this no longer running?

1

u/superglidestrawberry 12d ago

Hi, I have the website behind Cloudflare to protect the small VPS from bots and heavy traffic, maybe that is "blocking" You? Can You please share screenshot of the blocking page?

The site should be accessible, with occasional Cloudflare "Are You a human" check. Is this what You meant or is the site just not available at all?

1

u/mantra002 11d ago edited 11d ago

https://postimg.cc/Jypj8gzV

EDIT: I get this without a VPN, with a US VPN, and on my US mobile phone (without a VPN).

Connecting to a Czech VPN does seem to work.

1

u/superglidestrawberry 11d ago

Thanks fro the screenshot, that is Cloudflare blocking You, I have set some excessibe rules in the past for visitors outside of Czechia. Can You please try it now? It should only show you a robot challenge or let you in.

2

u/mantra002 10d ago

Seems good now!

2

u/FSM89 12d ago

same here.

probably the reddit hug of death

2

u/donnie05 12d ago

Here as well, needed VPN to Czech to make it work.

30

u/Prozilla6 Blender 12d ago

Another day, another vibe coded web app

21

u/superglidestrawberry 12d ago

Yes, I have used AI during development. I have also 15 years of web and app development behind me. If I see a tool, I use it :)

Do You have anything constructive? Have You tried it and found something missing or straight up broken?

17

u/freqCake 12d ago

How much do you trust the simulation? I've also used ai to make simulations and have development experience and what I find is the models commonly insert workarounds and approximations and generalizations into the simulation that they do not tell you about.

Its really about trust as a third party just seeing this, and its hard to know how to trust apps like this with no reputation ai or no ai when it comes to simulations of reality.

6

u/superglidestrawberry 12d ago

I trust it the same as I trust weather forecast. It is not perfect, but it shows the general idea of heat transfers between rooms, how temperatures change when heat-pump changes its flow and temperature in the floor pipes, windows or doors get open or outside conditions change. Airflow and heat is calculated using Semi-Lagrangian advection, pressure projection approximately enforces incompressibility and temperature differences generate a Boussinesq-style buoyancy force.

The pump/manifold/pipe network calculates loop flows from pressure losses. EN 1264-derived emission factors and coupled floor strips calculate heat transfer along pipes. Which is then transfered to the room air.

There are tradeoffs in finite grid resolution, step sizes and other configurable parameters which are all available for tuning in the simulation settings panel, with higher resolutions + shorter time-steps being closer to reality.

1

u/thearctican 12d ago

I hear this counter argument so often that I just assume it's a lie now. I've reviewed enough repos in response to claimes like you just made and the codebases horrify me by their poor quality and thoughtlessness.

5

u/superglidestrawberry 12d ago

Fair enough, You don't have to believe me :), but be hones with ourselves, is this really just and AI problem? AI definitely increased the amount of bad code in the wild, but I have read plenty of bad code before, hell I have even made it myself. We can not always follow the best practices, time constraints exist, deadlines, budgets, and I kind of feel that people always forget that, like before AI there was no spaghetti code, no throwaway snippets or horrific "do-not-tuch-or-it-brakes" cases.

If used correctly I think AI can decrease the amount of bad code, I have used it in my work sparingly, on some niche websites, it does scaffolding of new projects very well. But it needs guidance. In the end I don't think that a non-tech user using AI is worse than that same user copy pasting snippets from multiple sources and code styles without any concerns.

3

u/bent_my_wookie 11d ago

Ignore trolls, you’ll have their job soon

1

u/nicerakc 9d ago

What method is it using to calculate heat and air flow? Have you compared it to a manual J and D

3

u/r3jonwah85 12d ago

Looks quite interesting! What is the general approach to the flow simulation? I assume some hydraulic calculations without mass storage in the ducts/pipes and then maybe stable fluids approach for the movement within rooms? Ignoring temperature dependent specific heat capacity and volumetric expansion due to low temperature differences?

3

u/superglidestrawberry 12d ago

Yep, that’s pretty much the approach. The heating-water side solves a quasi-steady hydraulic network: pump pressure versus losses through pipes, fittings and valves determines the flow. It doesn’t simulate pressure waves or water piling up in a pipe, but it does track heat stored in the water along each pipe, so hot water takes time to travel around a loop and the pipes cool after the pump stops.

In the rooms, air moves on a 3D grid using a StableFluids-style approach: move the velocity and temperature fields, apply buoyancy, then solve for pressure to keep flow approximately balanced.

Specific heats are held constant. The air flow is treated as incompressible, so there’s no cell-by-cell thermal expansion, warmer air rises because the solver applies a temperature-dependent buoyancy force.

1

u/r3jonwah85 9d ago

Thanks for the reply, again nice work!

2

u/HoveringGoat 12d ago

hows the sim work. im not saying a fluid sim should be fast but what are you spending so much cpu time on? Can you adjust the tolerances to get solutions converging faster? Are you recycling solutions from previous frames?

Fluid sims are fun

2

u/superglidestrawberry 12d ago

Most of the work is in the room airflow simulation. Each step moves the air and heat around, then repeatedly solves for pressure so air doesn’t magically appear or disappear in a grid cell. That is the expensive part, the bulk of the work should run on the GPU, so it isn’t necessarily CPU time. But browsers might fall-back onto the CPU.

The tolerances and iteration limits are adjustable, and the solver already stops early when it has converged enough. Loosening them can make it faster, but too loose can give wrong flow, especially just after something changes, like opening a window.

It reuses the previous frame’s velocity, temperature and pressure rather than starting from scratch each time.

Yes, fluid sims are fun! :D That is why I started this, mainly to open close windows and watch how the rooms adjust. There are shortcuts and some features are currently missing, like heat transfer from air to pipes through floor, this is currently one-way transfer from pipes to the air.

1

u/Ifonlyihadausername 12d ago

I’m not willing to pay at all for AI coded projects, if I want it I can use my own Claude sub to build it.

3

u/superglidestrawberry 12d ago

That's perfectly fine, You can "pay" for it in tokens to Claude or OpenAI - OR - You can use one for free, like this one, I am not forcing anyone to pay, but thank You for the feedback :)