CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Re: Boundary conditions for current carrying conductor (https://www.cfd-online.com/Forums/fluent-udf/131470-re-boundary-conditions-current-carrying-conductor.html)

yashganatra March 15, 2014 08:10

Re: Boundary conditions for current carrying conductor
 
2 Attachment(s)
Hi,
I am working to find magnetic field around a cylindrical current carrying conductor. I have used Magnetic vector potential and electric scalar potential (A-Phi) and written UDS to solve in FLUENT. However, my results are not tallying with the analytical (rather intuitive) results that magnetic field is directly proportional inside conductor and inversely outside.
I wonder if this is because of the boundary conditions I have given.
I have attached the image of BC and the UDF I have written.
1. Could anyone kindly clarify that in the in-built MHD module, mathematically what do the conducting and insulating boundary conditions mean?
2. I have given Zero specified flux at the conductor end for A? I had read that the direction of A is the same as that of current density, so is that BC correct?

Thank you,
Regards,
Yash Ganatra

chriss85 March 17, 2014 04:24

I can't really tell you anything about FLUENT-related issues, but for me the boundary condition for the magnetic vector potential that worked was the one implemented in this OpenFOAM solver ("Open boundary conditions (infinite space)"):
http://www.cfd-online.com/Forums/ope...tml#post471052

Using this boundary condition I get the expected linear dependence of the magnetic field in the conductor and the decreasing field outside of it.

The idea behind this is that the electromagnetic field also depends on the geometry outside of the simulated area (i.e. different permeabilities attracting or repel field lines). This leads to a distortion near the boundaries, if not accounted for properly.

Unfortately the thesis related to this solver is in Latvian, however it quotes a document from another magnetic field calculation tool where the used formula for the boundary is specified.

I hope this helps you somewhat, unfortunately I can't assist with the implementation of said boundary condition in FLUENT.

yashganatra March 20, 2014 03:04

Re: Queries regarding UDS for electromagnetic problem
 
5 Attachment(s)
I have used Magnetic vector potential and electric scalar potential (A-phi)
The equations are:
1. div (sigma grad(phi)) =0
2. laplacian (A) = -mu0*j
j: currenr density ,sigma: electrical conductivity
Problem: I am not getting the expected linear variation of magnetic field inside the conductor and inverse variation outside the conductor.

1. I have referred thesis where the same problem has been implemented in OpenFoam. The boundary conditions have been mentioned as grad (A) / grad (phi) =0 which translates to specified flux boundary condition in FLUENT, right?
In all these thesis, I cannot understand why no boundary conditions have been given at the interface?
2. However, in FLUENT, I need to give boundary conditions to the individual components (i.e Az and Ar) and I am not able to understand which boundary conditions to give.
3. Also at the interface I am getting two walls - one named which has adjacent cell zone as conductor and the other has an adjacent cell zone as domain.

References:
1. Plasma ArcWelding Simulation with OpenFOAM, MARGARITA SASS-TISOVSKAYA
2. Implementation in the ANSYS finite element code of the electric vector potential T-Ω,Ω formulation and its validation with the magnetic vector potential A-V,A formulation, Pietro Testoni

I have attached the code, the boundary conditions in the OpenFoam thesis, and my plot of magnetic field.

1. I suspect that I have given boundary conditions wrongly.
2. I have tried increasing conductivity of air but got no difference in result.

Could anyone please give their opinions?
Thank you,
Regards,
Yash Ganatra

{
Magfield : contour plot of magnetic field
BC_Thesis: BC taken in [1]
Domain_Thesis : Domain in [1] - similar to the domain modeled in FLUENT
Boundary Conditions_GUI : snapshot showing 2 conductor walls
CopperBar : UDS written
Conductivity air: 1e-5 S/m
Conductivity copper: 2700 S/m
}

Dzhordzhs March 20, 2014 06:21

First of all check whether relative magnetic permeability of the cylinder is 1. Although from your code seems that you are using model similar to Huang, then by default this should be fine.

Difference between my work and work of Huang.
  • She do not have separated computational regions. Her program solves div (sigma grad(phi)) =0 and laplacian (A) = - mu0*j in one region as a whole. This is a proper way to solve electromagnetic problems.
  • I had multi-region pragram that solves these two equations for separate regions and then joins them together with boundary conditions that in Testoni work specified as S12. These boundary conditions between regions are approximations - they cause errors and in general this is not proper way to solve electromagnetics.

In Testoni and my work used boundary condition abbreviations:
  • Sb and Sh - these are outer boundaries (computation domain outer boundaries). Your problem definitely is not in these boundary conditions. At the beginning you can use A=0 on outer domain boundaries.
    Sb represents boundary conditions for magnetic induction, while Sh for magnetic intensity. Check this. These are orthogonal vectors, they are applied at the same time.
  • S12 are boundaries between regions. There may be cases when you want to use different equations for different regions, then you need to connect these regions by using these boundary conditions.

yashganatra March 20, 2014 07:13

1 Attachment(s)
Hi,
Thank you very much for your reply.
1. I have solved in a way similar to Huang. I have solved those equations in all the regions.
2. I have used A=0 on the far_wall side.
3. I am not clear how to implement the zero normal gradient BC in terms of the components of A (i.e A_r and A_z). FLUENT by its GUI allows to specify either a value or a flux and since I have 2 eqns for A, I need to specify BC for A_r and A_z
4. Could you kindly clarify what you imply by "Your problem definitely is not in these boundary conditions". I have S12 which is defined as a wall according to FLUENT and I need to specify BC there.

I have attached my geometry.
Thank you
Regards,
Yash Ganatra

Dzhordzhs March 20, 2014 07:39

How in your program B=curl(A) is calculated?

yashganatra March 20, 2014 08:35

B (azimuthal) = d(Ar)/dAz - d(Az)/dAr
in axisymmetric coordinates according to FLUENT documentation, 0--> axial direction(along X axis) 1--> radial direction.
I have written user defined scalar transport eqn: 2 for A (Ar and Az) and one for electric scalar potential phi
so, Bz = C_UDSI_G(c,t,1)[0] - C_UDSI_G(c,t,0)[1]
Here 0: index for eqn solving Az 1: index for Ar
G: gradient (c,t denote cell (control volume) and t denotes the thread (collection of cells))

Thank you,
Regards,
Yash Ganatra

yashganatra March 24, 2014 09:32

Hi,

I could solve the problem. The problem was specifying conductor walls.
Do not specify wall BC.
Instead manipulate Diffusivity UDS to account for different conductivities.
Ex: if r> ro then return...
if r< r0 return

Thank you
Regards,
Yash Ganatra


All times are GMT -4. The time now is 06:47.