I would like to do a simulation of a static Magnetic Field which is generated by a static current density J. So I create a Magnetodynamic Equation (MgHarm) with the following body force:
Code: Select all
Body Force 1
Name = "Current Density"
Current Density 2 = 0
Current Density Im 1 = 0
Current Density 1 = 0
Current Density Im 3 = 0
Current Density Im 2 = 0
Current Density 3 = 0
End
Could I use an expression similar to this one (C-Syntax) in order to define the x-Component of the Current Density?
Code: Select all
Current Density 1 = (abs(z)<h0&&sqrt(x*x+y*y)<rho_outer&&sqrt(x*x+y*y)>rho_inner)?(1/sqrt(x*x+y*y)*(-y)*J0):0
Current Density Im 1 = 0