Issue with Heat Generation in MAPDL #3996
-
Hello, I'm running a thermal simulation in MAPDL where I include a heat generation rate along with all the necessary boundary conditions. After applying everything, I solve the simulation using the following commands: mapdl.allsel() However, the results seem incorrect when I apply all conditions (including the heat generation) before solving. Interestingly, I found that if I first apply all the boundary conditions except the heat generation, solve the model, then return to preprocessing using mapdl.prep7(), add only the heat generation, and solve again, I get the correct results. So the process that gives me a good solution is:
Only with this two-step approach do I get accurate results. If I try solving everything in one go with all conditions set at once, the results are wrong. Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @gcassianno Yes, you are missing something. Can you provide an example script? If not we can use one of the VM models as a test script. My first thought is that MAPDL allows for one type of load to be applied directly to a element (or element face). So it has surface effect elements that can be stacked on which facillitate additional loads. |
Beta Was this translation helpful? Give feedback.
-
Thanks for replying, @mikerife I created a simplified example of what I'm doing. mapdl.prep7()
mapdl.mp("kxx", 1, 45)
mapdl.et(1, 90)
mapdl.esize(0.1)
mapdl.block(0, 1, 0, 1, 0, 1)
mapdl.vsweep(1)
mapdl.nsel('s','loc','x',0)
mapdl.sf('all','conv',20,100)
mapdl.nsel('s','loc','y',0)
mapdl.sf('all','conv',20,100)
mapdl.nsel('s','loc','z',0)
mapdl.bf('all','temp',100)
nodes_with_hgen = mapdl.nsel('s','loc','z',0.5)
x, y = 1000, 1500.2
heat = np.linspace(x, y, len(nodes_with_hgen))
##########
for i in range(len(nodes_with_hgen)):
mapdl.bf(nodes_with_hgen[i],'hgen',heat[i])
##########
mapdl.allsel()
mapdl.run('/solu')
mapdl.solve()
mapdl.finish()
mapdl.post1()
mapdl.set(1)
mapdl.contour('all','9')
mapdl.view(-1,1,1,1)
mapdl.plnsol('temp')
In my case, this approach doesn’t yield the correct solution, I need to redefine the body force between # # in the following step.
_ = mapdl.prep7()
for i in range(len(nodes_with_hgen)):
mapdl.bf(nodes_with_hgen[i],'hgen',heat[i])
mapdl.allsel()
mapdl.run('/solu')
mapdl.solve()
mapdl.finish()
mapdl.post1()
mapdl.set(1)
mapdl.contour('all','9')
mapdl.view(-1,1,1,1)
mapdl.plnsol('temp') After doing so, I obtain the correct solution. Perhaps the issue lies in how I'm defining the heat generation. I tried specifying a table, but APDL crashes. |
Beta Was this translation helpful? Give feedback.
Hi @gcassianno can you post a image of the incorrect result and the correct result you are getting. In a thermal analysis temperature is not a force, it is a boundary condition so this:
does nothing. Maybe you meant
And the mapdl.bf(nodes_with_hgen[i],'hgen',heat[i]) need to be indented (guess this might be a copy/paste issue and not from your script...)
Here is what I get running the corrected input file:
Mike