# Heat Transmission Possible?

## Recommended Posts

I want to do a heat transmission animation.

Similar to what those engineering software like Ansys can do, but with a more complex structure.

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...

##### Share on other sites

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

##### Share on other sites

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).

##### Share on other sites

Edited by Librarian
##### Share on other sites

23 hours ago, Librarian said:

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.

##### Share on other sites

• 2 weeks later...

@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"))

time_step = geo.attribValue("time_step")

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 )

##### Share on other sites

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"))

time_step = geo.attribValue("time_step")

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 by xarthur
typo.
##### Share on other sites

I all-ready posted that ...diff to found maybe
to make on complex shapes you need to google this
"DEC_heat_with_boundaries "
+ you have this
Dude that shared this (name---search for "White Dog Houdini twitter"...many files ..Have FUN @xarthur

##### Share on other sites

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!

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×