xarthur Posted March 1, 2022 Share Posted March 1, 2022 I want to do a heat transmission animation. Similar to what those engineering software like Ansys can do, but with a more complex structure. example img. I guess this is not something like CFD, but more like transmission inside solids. Is it possible to do in Houdini? Don't have a clue how... Quote Link to comment Share on other sites More sharing options...
NabilJ Posted March 1, 2022 Share Posted March 1, 2022 I'm not sure if I understand exactly what you need. An attribute transfer will surely do the job ? In this example it transfers the Cd attribute on the inside boxes too Quote Link to comment Share on other sites More sharing options...
xarthur Posted March 1, 2022 Author Share Posted March 1, 2022 2 hours ago, NabilJ said: I'm not sure if I understand exactly what you need. An attribute transfer will surely do the job ? In this example it transfers the Cd attribute on the inside boxes too My bad. To explain it a bit clearer, I want to use Houdini as a simulation tool, for instance, like the vellum system. In this case, say, I have two plates (or more complex structures). I want to see how heat is transmitted in the material (how fast, how distributed, etc.) by tuning some parameters of the material. (For instance, I can tune the stiffness of material in FEM sim to have different deformation results). Quote Link to comment Share on other sites More sharing options...
Librarian Posted March 1, 2022 Share Posted March 1, 2022 (edited) @xarthur http://wordpress.discretization.de/ddg2016/ ____ files on Topic On Growth and Form Edited March 1, 2022 by Librarian Quote Link to comment Share on other sites More sharing options...
xarthur Posted March 2, 2022 Author Share Posted March 2, 2022 23 hours ago, Librarian said: @xarthur http://wordpress.discretization.de/ddg2016/ ____ files on Topic On Growth and Form Thanks. I'm actually aware of the wave function. I didn't go for this for two reasons: 1. it works better for surface propagation, while my structure is more like a "tree-like" structure, where a lot of rots are connected, but no a "solid" volume. 2. Not easy to implement these differential equations in discrete form. That's why I asked here to see if there are build-in nodes for this kind of purpose. Quote Link to comment Share on other sites More sharing options...
Librarian Posted March 11, 2022 Share Posted March 11, 2022 @xarthur if you search on Berlin Math Houdini you gonna find DEC_heat_with_boundaries(solver) Python with SciPy. bdy_d_val = np.array(geo.pointIntAttribValues("bdy_d_val")) bdy_n_val = np.array(geo.pointIntAttribValues("bdy_n_val")) # read time step time_step = geo.attribValue("time_step") # read matrices d0 = cache_node.cachedUserData("d0") star1 = cache_node.cachedUserData("star1") star0 = cache_node.cachedUserData("star0") star0inv = cache_node.cachedUserData("star0inv") # build L = -d0.transpose().dot(star1.dot(d0)) D = star0inv.dot(L) # index slice instructions indB = np.flatnonzero(bdy_d) indI = np.flatnonzero(bdy_d==0) # slice the matrix LI = L[indI,:] LIB = LI[:,indB] LII = LI[:,indI] star0 = star0 + L - L # convert from diag star0I = star0[indI,:] star0IB = star0I[:,indB] star0II = star0I[:,indI] # slice vector uI = u[indI] # solver pre n = LII.shape[0] lhs = star0II - time_step*LII rhs = star0II.dot(uI) + time_step*LIB.dot(bdy_d_val[indB]) + time_step*star0II.dot(bdy_n_val[indI]) # linear solve out = la.cg(lhs,rhs) # assign solution solI = out[0] u[indB] = bdy_d_val[indB] u[indI] = solI # save to attribute hou.Geometry.setPointFloatAttribValues(geo,"u", u ) Quote Link to comment Share on other sites More sharing options...
xarthur Posted March 13, 2022 Author Share Posted March 13, 2022 (edited) On 11/03/2022 at 9:17 AM, Librarian said: @xarthur if you search on Berlin Math Houdini you gonna find DEC_heat_with_boundaries(solver) Python with SciPy. bdy_d_val = np.array(geo.pointIntAttribValues("bdy_d_val")) bdy_n_val = np.array(geo.pointIntAttribValues("bdy_n_val")) # read time step time_step = geo.attribValue("time_step") # read matrices d0 = cache_node.cachedUserData("d0") star1 = cache_node.cachedUserData("star1") star0 = cache_node.cachedUserData("star0") star0inv = cache_node.cachedUserData("star0inv") # build L = -d0.transpose().dot(star1.dot(d0)) D = star0inv.dot(L) # index slice instructions indB = np.flatnonzero(bdy_d) indI = np.flatnonzero(bdy_d==0) # slice the matrix LI = L[indI,:] LIB = LI[:,indB] LII = LI[:,indI] star0 = star0 + L - L # convert from diag star0I = star0[indI,:] star0IB = star0I[:,indB] star0II = star0I[:,indI] # slice vector uI = u[indI] # solver pre n = LII.shape[0] lhs = star0II - time_step*LII rhs = star0II.dot(uI) + time_step*LIB.dot(bdy_d_val[indB]) + time_step*star0II.dot(bdy_n_val[indI]) # linear solve out = la.cg(lhs,rhs) # assign solution solI = out[0] u[indB] = bdy_d_val[indB] u[indI] = solI # save to attribute hou.Geometry.setPointFloatAttribValues(geo,"u", u ) Hi, really appreciate the help. But would you mind sharing the original source of this script? I searched "Berlin Math Houdini" and different combinations of keywords including "heat" or "solver",but cannot find something similar. I also went over their blog: http://wordpress.discretization.de/houdini/ , nothing either... Edited March 13, 2022 by xarthur typo. Quote Link to comment Share on other sites More sharing options...
Librarian Posted March 13, 2022 Share Posted March 13, 2022 I all-ready posted that ...diff to found maybe to make on complex shapes you need to google this "DEC_heat_with_boundaries " Lady that shared have them on google drive ... + you have this Dude that shared this (name---search for "White Dog Houdini twitter"...many files ..Have FUN @xarthur Quote Link to comment Share on other sites More sharing options...
xarthur Posted March 13, 2022 Author Share Posted March 13, 2022 The problem is that I googled that "DEC_heat_with_boundaries", but got nothing... Then DuckDuckGo gives me a lot of results... Seems google is banning some results based on my location??? But anyway, got what I want. Thank you! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.