How to specify current direction for a 3D rod that with turns

Numerical methods and mathematical models of Elmer
Post Reply
srinathshiv
Posts: 12
Joined: 11 Sep 2018, 01:05
Antispam: Yes

How to specify current direction for a 3D rod that with turns

Post by srinathshiv » 02 Nov 2018, 05:05

For MGDynamics Solver under body force section, there are three current density components in x,y and z.
Current Density 1, Current Density 2 and Current Density 3

For current in z direction for a straight rod
Current Density 1 = 0
Current Density 2 = 0
Current Density 3 = 1e3
untitled.geo
(134 Bytes) Downloaded 10 times
How to specify current direction for the above geometry. Like it starts flowing in y direction, then flows in x direction followed by y direction again in opposite direction.

Thanks.

mzenker
Posts: 1787
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: How to specify current direction for a 3D rod that with turns

Post by mzenker » 02 Nov 2018, 11:52

Hi,

you can make the current variable in time, like

Code: Select all

Current density 1 = Variable Time
Real
0 1
1 0
2 1
3 0
End
for the x component being 1 at t = 0 s and t = 2 s.
See Solver manual, Section 2.3 "Keyword syntax", Paragraph "Defining parameters depending on field variables" for more information.

HTH,
Matthias

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

Re: How to specify current direction for a 3D rod that with turns

Post by raback » 03 Nov 2018, 00:48

Hi

For current density you can

1) Use StatCurrentSolver or CoilSolver to precompute a current density field, or
2) Use MATC, table (example of Matthias), UDF to give it as a function of position. For circular coils analytical functions involving SIN and COS are typically used...

-Peter

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

Re: How to specify current direction for a 3D rod that with turns

Post by annier » 04 Nov 2018, 21:38

Hi srinathshiv,
And to write MATC expression for trigonometric function, an example is provided as following:

Code: Select all

Current density 1 = Variable  time
  Real MATC "1+sin(0.2*tx)" 
which,calculates and returns j_1= 1+sin(0.2t).

For more details the MATC guide can be referred to:
http://www.nic.funet.fi/pub/sci/physics ... Manual.pdf


Yours Sincerely,
Anil Kunwar

srinathshiv
Posts: 12
Joined: 11 Sep 2018, 01:05
Antispam: Yes

Re: How to specify current direction for a 3D rod that with turns

Post by srinathshiv » 06 Nov 2018, 02:28

Hi Guys,

Thanks for your reply. I still couldn't change current density with respect to time.
I also tried with co-ordinate scaling 1.


[1] Using Body Force:

Code: Select all

Body Force 1
  Name="current density"
  Current Density 1 = Variable time
    Real MATC "1+sin(0.2*tx)"  
! Current Density = 1e8 
  Current Density 2 = 0 
  Current Density 3 = 0 
End
My current density is still set in x-direction and is not sensitive to time.

[2]Using Boundary:

Code: Select all

Boundary Condition 3
  Name = "Metal End"
  Target Boundaries(1) = 3 
 
  Coil End = Logical True
  
  AV {e} 1 = Real 0.0 
  AV {e} 2 = Real 0.0 
  
  AV = Real 0.9e-3
End
When I set AV variable on the end surface, I can see the current density changing through the geometry as expected. But the magnetic field is messed up and I couldn't see them circling around the current.
Attachments
boundary_currentDesnity.png
(182.59 KiB) Not downloaded yet
bodyForce_currentDensity.png
(170.03 KiB) Not downloaded yet
bodyForce.sif
(3.42 KiB) Downloaded 7 times

mzenker
Posts: 1787
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: How to specify current direction for a 3D rod that with turns

Post by mzenker » 06 Nov 2018, 11:34

Hi,

in your sif file you do a steady state simulation. In that case, the time has no meaning...

HTH,
Matthias

srinathshiv
Posts: 12
Joined: 11 Sep 2018, 01:05
Antispam: Yes

Re: How to specify current direction for a 3D rod with turns

Post by srinathshiv » 09 Nov 2018, 00:03

Hi,

Thanks everyone. I can change the current, but when I set the current to zero immediately, it's still flowing based on its previous value.

When I set the boundary AV variables, the current flow is exactly what I want, but the magnetic field is felt only on the boundaries. I'll attach the current flow for boundary stimulation which is my requirement.
[1] Is it the nature of boundary stimulation or is it possible to get the magnetic field on body as well ?
Also how does elmer does the current flow so elegantly, because I have to implement the current flow in such a way.

The problem with body force is that, I couldn't model the current flow as I want. I'll attach an image (octagon.png) which has my expected current flow model. I know elmer stores co-ordinates and time variables, but is it possible to get the co-ordinates at previous timestep, so that I can compare current co-ordinates and previous co-ordinates.
[2] Can someone explain is it possible to model current in such a way using body force?

octagon_boundary.tar contains sif, geometry and a screenshot of current flow for boundary stimulation.
octagon.png contains my model with expected current flow.

I'm also willing to write a fortran function to model the current flow.

Thanks.
Attachments
octagon_boundary.tar
(610 KiB) Downloaded 5 times
octagon_boundary.tar
(610 KiB) Downloaded 7 times
octagon.png
(25.95 KiB) Not downloaded yet

Post Reply