Page 1 of 1
How to specify current direction for a 3D rod that with turns
Posted: 02 Nov 2018, 05:05
by srinathshiv
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
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.
Re: How to specify current direction for a 3D rod that with turns
Posted: 02 Nov 2018, 11:52
by mzenker
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
Re: How to specify current direction for a 3D rod that with turns
Posted: 03 Nov 2018, 00:48
by raback
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
Re: How to specify current direction for a 3D rod that with turns
Posted: 04 Nov 2018, 21:38
by annier
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
Re: How to specify current direction for a 3D rod that with turns
Posted: 06 Nov 2018, 02:28
by srinathshiv
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.
Re: How to specify current direction for a 3D rod that with turns
Posted: 06 Nov 2018, 11:34
by mzenker
Hi,
in your sif file you do a steady state simulation. In that case, the time has no meaning...
HTH,
Matthias
Re: How to specify current direction for a 3D rod with turns
Posted: 09 Nov 2018, 00:03
by srinathshiv
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.