|
[Sponsors] |
April 11, 2020, 12:03 |
Solving Maxwell's eq using UDF
|
#1 |
New Member
gdhamale
Join Date: Dec 2015
Posts: 2
Rep Power: 0 |
Hi there,
I am learning to write a UDF for plasma torch simulation (DC arc). Pl help me to understand how to write udf to solve coupled equations (attached) for my computational domain J (current density) is known to us and defined via DEFINE_PROFILE macro (boundary condition given at the surface of a cathode) as below: #include "udf.h" double Rc 0.0002 /* Arc cut radius in meter*/ DEFINE_PROFILE(Current_den,t,i) { face_t f; double x[ND_ND],J0,b; begin_f_loop(f,t) { F_PROFILE(f,t,i)=0.; F_CENTROID(x,f,t); J0 = 5.7e8; b = 2935; if(x[1]<= Rc) F_PROFILE(f,t,i) = J0*exp(-b*x[1]); } end_f_loop(f,t) } Last edited by gdhamale; April 11, 2020 at 12:08. Reason: Not showing the attachment |
|
April 11, 2020, 14:19 |
Maxwell Equations
|
#2 |
Senior Member
|
Your query is not very clear. As far as solving of an equation is conserved, then you have to enable an equation for a scalar. If you wish to use inbuilt MHD model for your application, then equation is already being solved, though with certain assumptions.
As far as the UDF is concerned, it will return a value and apply that value to whichever variable you hook it. If you hook it for current density, then it will be taken as current density. If you hook it for potential, then it will be used as potential.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 11, 2020, 14:56 |
|
#3 |
New Member
gdhamale
Join Date: Dec 2015
Posts: 2
Rep Power: 0 |
Thank you for your response.
Yes, I need to enable the scalar equation (for vector and scalar potential – total 3 equations in 2D) which I have mentioned in the attached image. Could you pl explain me how to express these equations using DEFINE_SCALAR macro? Thanks a lot! |
|
April 11, 2020, 16:21 |
MHD Module
|
#4 |
Senior Member
|
I'd suggest you to have a look at inbuilt MHD module.
https://www.afs.enea.it/project/nept...d/main_pre.htm If you want to use your own equations, then you just need to enable scalars under User-Defined > Scalars. This is done via GUI not via a UDF. However, UDF might be required if you want to specify something special, such as, a constitutive relation or boundary condition.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
December 4, 2020, 03:25 |
|
#5 |
New Member
Aditya Shaw
Join Date: Dec 2020
Posts: 1
Rep Power: 0 |
Hello, I am doing a similar simulation in plasma and was wondering if you were able to solve the maxwell udf issue. I'd be extremely delighted if you could help me out
Thanks |
|
October 30, 2022, 16:07 |
|
#6 |
Senior Member
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15 |
If you had any success with the plasma torch model can you share a case here?
I have developed a code for that but I am facing problem with converging temperature |
|
July 11, 2023, 04:52 |
|
#7 |
New Member
niming
Join Date: Jul 2023
Posts: 5
Rep Power: 3 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suppress twoPhaseEulerFoam energy | AlmostSurelyRob | OpenFOAM Running, Solving & CFD | 33 | September 25, 2018 18:45 |
Segmentation fault when using reactingFOAM for Fluids | Tommy Floessner | OpenFOAM Running, Solving & CFD | 4 | April 22, 2018 13:30 |
HeatSource BC to the whole region in chtMultiRegionHeater | xsa | OpenFOAM Running, Solving & CFD | 3 | November 7, 2016 06:07 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |