Point source for StatCurrentSolve

Numerical methods and mathematical models of Elmer
mrceresa
Posts: 18
Joined: 11 Jan 2013, 21:18
Antispam: Yes

Point source for StatCurrentSolve

Post by mrceresa »

Hi all!
I was wondering, is it possible to define a point source for the current solver analogously to the stress and heat one?

We tried:

Code: Select all

Boundary Condition 2
  Target Coordinates(1,3) = -2 -2 -1 
  Name = "Source"
  Current Density = 1e-3
End
But it seems that it doesn't work

Thanks,

Mario
mrceresa
Posts: 18
Joined: 11 Jan 2013, 21:18
Antispam: Yes

Re: Point source for StatCurrentSolve

Post by mrceresa »

I found that using:

Code: Select all

Potential Load = Real 1e-3
works. But we really want to control in current.
Is something like:

Code: Select all

Current Density Load = Real 1e-3
Possible?

Thanks and regards,

Mario
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Point source for StatCurrentSolve

Post by annier »

Hi Mario,
Here is a piece of code referred from the StatCurrentSolve.f90

Code: Select all

bf_id = ListGetInteger( Model % Bodies(CurrentElement % BodyId) % &
             Values, 'Body Force', gotIt, minv=1, maxv=Model % NumberOfBodyForces )

         Load  = 0.0d0
         IF ( gotIt ) THEN
           Load(1:n) = ListGetReal( Model % BodyForces(bf_id) % Values, &
               'Current Source',n,NodeIndexes, Gotit )
         END IF
From this code, it can be inferred that , it is possible to define the following:

Code: Select all

Body Force 1
...
Current Source = Real 12.34
...
End
Also, Body Force should be defined in Equation section

Code: Select all

Equation 1
...
Body Force =1
...
End
The potential load (variable as point source) is defined at the boundaries

Code: Select all

Boundary Condition 1
...
Potential load=Real 45.68
..
End
whereas current source is defined as a body force. The "potential" infront of the "load" is the name of the "variable" in the solver.

The discussion made in the following thread is a good reference on point source.


Yours
Anil Kunwar
Last edited by annier on 30 Jan 2015, 17:17, edited 1 time in total.
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Point source for StatCurrentSolve

Post by mzenker »

Hi,

depending on your geometry, you could also use current control to get a fixed current. See Models Manual, "Static Current Conduction" -> "Power and current control".

HTH,

Matthias
mrceresa
Posts: 18
Joined: 11 Jan 2013, 21:18
Antispam: Yes

Re: Point source for StatCurrentSolve

Post by mrceresa »

Hi all again and thank you for your quick replies,

I've been trying what you mention but still doesn't work. Annier, I think I cannot apply the "Body Force" method (I tried) because I don't have any body to apply the force on, as I am trying to obtain a point source of current. On the other hand, I wasn't able to apply the information in the bibliography given by mzenker.

If possible, I think that the key is to find the keyword analogous to "Potential Load" that allows to control the current, for instance something like "Current Load" or "Current Density Load".

Perhaps, having a current point source doesn't make sense because an area is needed to apply a current and elmer doesn't include it into its solver, but I hope it is possible.

Please, any other ideas or suggestions? :cry:

Thank you in advance
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Point source for StatCurrentSolve

Post by mzenker »

Hi,

you could approximate your point source by a small sphere, set its surface to any potential as boundary condition, and then use "Current Control" in the solver section to set your constant current. Elmer will then adjust the potential so that the total current is as set in "Current Control". You will also need a second surface with zero potential, of course.

HTH,

Matthias
Franz Pichler
Posts: 196
Joined: 29 Sep 2011, 12:25
Antispam: Yes

Re: Point source for StatCurrentSolve

Post by Franz Pichler »

Aren't the potential load and the current density the same thing?
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Point source for StatCurrentSolve

Post by mzenker »

Hi,
Aren't the potential load and the current density the same thing?
No, they aren't. A potential is not a current density - or did I misunderstand what you want to say?

After quickly browsing around in the code, I think that I have understood that the load feature is in fact another way to set a boundary condition or body force on a nodal or coordinate basis (see the subroutine SetNodalLoads in SolverUtils.src).
As far as I understand, the OP wants to define a current point source, which would mean that the current comes out of a point radially in all directions. I doubt that a nodal load can be used for that, because I don't see how the current direction would be defined at that node - it would not be unique. So I would go for the approximation I proposed in my last post.

HTH,

Matthias
mrceresa
Posts: 18
Joined: 11 Jan 2013, 21:18
Antispam: Yes

Re: Point source for StatCurrentSolve

Post by mrceresa »

Thank you mzenker,

Creating a little sphere is my plan B but I was just trying to avoid introducing new meshed element and get things easier by just creating a point source. If I finally don't get a solution I'll be forced to mesh little spheres in the desired places.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Point source for StatCurrentSolve

Post by raback »

Hi

"Varname Load" is a nodal value that is directly inserted to the r.h.s. of a linear system Ax=b. In effect it is the nodal weight times the distributed source term. The unit is N (not Pa), C (not C/m^2) etc.

By the logic the following should work:

Code: Select all

Boundary Condition 2
  Target Coordinates(1,3) = -2 -2 -1 
  Name = "Source"
  Potential Load = 1e-3
End
I just don't remember if this combination has been implemented...

-Peter
Post Reply