I would have posted this as a reply to " Schematics for other purpose than PCB and simulation" but that thread has been closed. I’m working on using KiCad to help design and simulate the plumbing system in my home.
I’m renovating my home and am adding whole house reverse osmosis and am replacing my gas water heater with an indirect (i.e. heat exchanger based) water heating system as well as hot water recirculation to get “instant on” hot water. I looked at several PI&D design software packages but really didn’t find something I that was low cost/free, seemed easy to use, and supported hydraulic simulation of my design. So I’ve ventured down the path of using KiCad to capture my design and linking it to a surprisingly good (and free) hydraulic system simulator developed by the, wait for it…, U.S. Environmental Protection Agency, called “EPANet”.
EPANet was developed to support municipal and regional water distribution systems but seems to work quite well for home water distribution networks as well. Things like pressure boosting pumps, cisterns, filters, piping systems, mixing valves, etc., pressure drops due to flow rate and elevation changes can all be modeled. Both static (analogous to “DC” simulations in Spice) and dynamic (i.e. valves turning on and off) behavior can be simulated. The piping models are non-linear (i.e. they work for both laminar and turbulent flow) and the simulations are fast.
What I’ve done so far with this is to create a few dozen Kicad symbols for the types of components I use (e.g. valves, storage tanks, filters, pressure booster pumps, PEX piping, etc.) as well as some sensors (e.g. pressure and temperature, TDS (total dissolved solids)). and begun capturing my design. I use hierarchical sheets quite a lot mainly to keep each page of the drawing from getting too busy, but also because I have some functions, like re-mixing source water in different proportions with the RO output so it’s suitable for drinking vs. laundry, etc.
While EPANet has a GUI based editor, it’s very primitive. However, it has some nice features that KiCad lacks (like showing simulation results (e.g. static water pressure) in the network) as the simulation proceeds. Its “netlist” is 100% text based, so it should be able to be generated from KiCad. But, it requires a flat netlist so I’m looking at the KIPE toolkit in case it can help.
There are many things left to do to implement what I have in mind. I’m still tweaking/adding symbols just to capture the design. The design itself is still evolving. I’m a complete NOOB at generating KiCad netlists, much less the “netlist” that EPANet wants. All sorts of new parameters need to be added to the symbols just to tell EPANet what it needs to know to simulate properly. I haven’t run into any showstoppers yet, but I’m sure I’ll find some stuff requiring workarounds. I seem to recall that assigning instance specific parameter values for hierarchical sheets that get “passed into” the sheet when flattening the design is a limitation that KiCad hasn’t addressed yet. This comes up a lot when running pipes of various sizes, types, and lengths.
I’m happy to post a picture of my design so far, but I don’t know how to attach something like that to this post, much less stuff like the symbols I’ve created