Page 1 of 1

ElmerCircuit And StaticCurrentSolver

Posted: 06 Jun 2024, 18:57
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

Re: ElmerCircuit And StaticCurrentSolver

Posted: 06 Jun 2024, 22:40
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

Re: ElmerCircuit And StaticCurrentSolver

Posted: 09 Jun 2024, 01:49
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

Re: ElmerCircuit And StaticCurrentSolver

Posted: 09 Jun 2024, 12:00
by kevinarden
When you say "didn't work" do you mean an error message or a wrong answer?

Re: ElmerCircuit And StaticCurrentSolver

Posted: 10 Jun 2024, 06:00
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.

Re: ElmerCircuit And StaticCurrentSolver

Posted: 11 Jun 2024, 11:13
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"

Re: ElmerCircuit And StaticCurrentSolver

Posted: 12 Jun 2024, 20:59
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