Simple simulation of electrical potential / current. #3505
Replies: 4 comments 22 replies
-
Hello, @Drinausaur, Unfortunately, this is a common pitfall when working with attributes. We need to document this better. The array you pass to That being said, there is another issue: I would suggest avoiding
or
With one of these inside your loop you should set the proper values in Best wishes, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I have been doing some tests for the past few days, and the simulation is working. I tried setting a Neumann BC to 0, but it is not what I want to enforce. I don't want the net current exiting the simulation to be 0, I want the current exiting the simulation to be 0 everywhere. What is the fem / mfem function I should use for that ? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am not a FEM expert, but an electronics guy who reads about FEM online ( including the MFEM guide ).
I am trying to set up a "simple" simulation of some pieces of copper, add voltage sources ( DBC if I understand properly ), and current sources ( NBC ).
I started with the voltage sources starting from example 1, but I can't figure out why it does not work. ( I have been looking at that code for days now ).
It seems that I am able to set the voltage to some regions, but not all, and the regions that are assigned take different values.
Before that code, I load the mesh, store voltage values in
m_dbcv
and the region they correspond to inm_dbcs
And then I get this: ( I tried to set each element to a different voltage, I did not connected them, yet )
here is my mesh:
pcb_3d.msh.zip
Could you help me understand why it does not work?
Beta Was this translation helpful? Give feedback.
All reactions