ElmerCircuit And StaticCurrentSolver

Numerical methods and mathematical models of Elmer
Post Reply
Tapegoji
Posts: 28
Joined: 12 May 2024, 00:22
Antispam: Yes

ElmerCircuit And StaticCurrentSolver

Post by Tapegoji »

Quick question:

Is it possible to use ElmerCircuit and StaticCurrentSolver simultaneously. I have not seen any example or for that. Is it possible?

Thanks
raback
Site Admin
Posts: 4862
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: ElmerCircuit And StaticCurrentSolver

Post by raback »

Hi

Currently this is not supported. Usually problems involving circuits have been more complicated.

Maybe some generic constrained BCs would do the trick. What kind of case are we looking at?

-Peter
Tapegoji
Posts: 28
Joined: 12 May 2024, 00:22
Antispam: Yes

Re: ElmerCircuit And StaticCurrentSolver

Post by Tapegoji »

Would you mind elaborate more on the Constrain BCs?

I am doing PCB simulation with Elmer StaticCurrentSolver. However, I don't know how to include the circuit elements.

For example, Let's assume we have a resistor that is placed on a PCB. It has two pads that are modeled as boundary conditions in the sif file. I know what is the current through the resistor so I can specify the current density in the boundary condition. Like below

Code: Select all

Boundary Condition 2
  Target Boundaries(1) = 9
  Name = "R1_in"
  Current Density =  -2616.5490132459377
End
Now the other pin, I wan to specify the potential of the pad to be the potential of the first pad minus and offset.
This way I can model a resistor in the solver.

My best try has been using mortar bcs with scaling.

Code: Select all

Boundary Condition 1
  Target Boundaries(1) = 2
  Mortar BC = Integer 2
  Mortar BC Scaling = 0.1
End
However, I don't know how to add offset. I asked ChatGPT how to do it and this is what it came up with. But, it did not work. :-D

Code: Select all

Boundary Condition 1
  Target Boundaries(1) = 2
  Mortar BC = Integer 2
  Potential = Variable "Potential"
    Real MATC "tx - 5.0"
End
kevinarden
Posts: 2420
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: ElmerCircuit And StaticCurrentSolver

Post by kevinarden »

When you say "didn't work" do you mean an error message or a wrong answer?
Tapegoji
Posts: 28
Joined: 12 May 2024, 00:22
Antispam: Yes

Re: ElmerCircuit And StaticCurrentSolver

Post by Tapegoji »

Sorry, I should have been more clear.

the solver seems to work and goes a head with a solution. However, the solution is not correct. In this scenario, I have 45 V on the source bc and I expect 45 - 5 on the slave bc. However, I see that the slave has gotten a large negative number.
Screenshot from 2024-06-09 20-58-42.png
(55.37 KiB) Not downloaded yet

Code: Select all

! R1_2_top
Boundary Condition 1
  Target Boundaries(1) = 4
  Name = "R1_out"
  Mortar BC = Integer 2
  Plane Projector = Logical True 
  Galerkin Projector = Logical True
  Mass Consistent Normals = Logical True
  Potential = Variable "Potential"
    Real MATC "tx - 20.0"
End

! R1_1_top
Boundary Condition 2
  Target Boundaries(1) = 7
  Name = "R1_in"
  Current Density =  -2616.5489590949696
  Mass Consistent Normals = Logical True
End

! pos
Boundary Condition 5
  Target Boundaries(1) = 8
  Name = "VoltageP"
  Potential = 45.0
End

! neg
Boundary Condition 6
  Target Boundaries(1) = 3
  Name = "VoltageN"
  Potential = 0.0
End
I am attaching my sif file and my mesh.
Attachments
pcb_dc_sim.zip
(473.25 KiB) Downloaded 6 times
kevinarden
Posts: 2420
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: ElmerCircuit And StaticCurrentSolver

Post by kevinarden »

I think this is the way to go

Boundary Condition 1
Target Boundaries(1) = 2
Periodic BC = Integer 2
Periodic BC Potential = Logical True
Periodic BC Offset Potential = Real -20.0
End

because in this statement Variable "potential" is not the potential of the other BC
Potential = Variable "Potential"
Real MATC "tx - 20.0"
Tapegoji
Posts: 28
Joined: 12 May 2024, 00:22
Antispam: Yes

Re: ElmerCircuit And StaticCurrentSolver

Post by Tapegoji »

I will add scale and rotation to the list as well. The rotation needs to be adjusted to get a perfect match, as Peter mentioned in my other post. I'll report on this and see how it goes
Post Reply