Jump to content
xarthur

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.

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

Share this post


Link to post
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
image.png.9e1e28805639475f99fe612854718e5a.png

Share this post


Link to post
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
image.png.9e1e28805639475f99fe612854718e5a.png

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 this post


Link to post
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 this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites
Posted (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 by xarthur
typo.

Share this post


Link to post
Share on other sites

I all-ready posted that ...diff to found maybe :rolleyes:
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
 

 

Share this post


Link to post
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!

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×