|
[Sponsors] |
August 18, 2003, 23:49 |
discuss user subroutine in CFX
|
#1 |
Guest
Posts: n/a
|
Hello everyone,
Could anybody explain how to implement user subroutine in CFX please? I am going to use¡¡Fortran subroutines in CFX4.4, but what is about CFX5.5? I am simulating the flow in a duct, which need to add electrical and magnetic effects as user subroutine to implemented in CFX. Firstly the Lorentz force as a momentum source need to be added. In addition to this force, the scalar electrical potential and relative electrical boundary conditions must be added. But I can¡¯t know how to arrange them. Could you tell me some your experiences about it? Any help greatly appreciated. I am looking forward to hear the kindly help soon. Thank you in advance. Anicorl |
|
August 19, 2003, 09:02 |
Re: discuss user subroutine in CFX
|
#2 |
Guest
Posts: n/a
|
Hi, I am also doing soemthing on MHD with CFX5.5.1. I know how to add Lorentz force item to the N-S equation without using subroutine. But it's hard for the CFX to converge to obtain a good result!
Now I also want to use Subroutine to achieve it, but it seems that it's difficult. Maybe we can discuss it together. Miko |
|
August 19, 2003, 17:58 |
Re: discuss user subroutine in CFX
|
#3 |
Guest
Posts: n/a
|
Contact Mr. Bartsch from CFX Berlin. I think he can help you on this topic.
Pascale |
|
August 19, 2003, 19:24 |
Re: discuss user subroutine in CFX
|
#4 |
Guest
Posts: n/a
|
Hi Anicorl,
You can probably do this using the cel in CFX5. Then you don't need fortran at all. Glenn |
|
August 20, 2003, 04:02 |
Re: discuss user subroutine in CFX
|
#5 |
Guest
Posts: n/a
|
Hi, Miko,
Lorentz force dependent to not only the flow velocity but also the electrical potential is rather complicated. Moreover, the electrical boundary conditions need be considered. So it is necessary to use subroutine to achieve it. Lorentz force can be added as a source item to the momentum equation in CFX with using subroutine. The diffusion transport equation of electrical current can be derived as the temperature equation, and the electrical boundary conditions maybe be added to the equation to solve it. But I cannot confirm whether the original codes of CFX need to be rewritten. To this idea, what should you do? By the way, can you confirm these subroutines about electrical and magnetic problem can be added in CFX5.5? I look forwards to discuss it together. Anicorl |
|
August 20, 2003, 09:49 |
Re: discuss user subroutine in CFX
|
#6 |
Guest
Posts: n/a
|
Hi Anicorl!
You are right. But in my case, I needn't consider the electrical effect, for the external magnetic field is the only factor which influences the behaviour of the duct flow in MHD issues. I think you can achieve it stey by stey--that is, firstly consider Lorentz force, then electrical force. In CFX5.5.1, besides subroutine, we can use ccl to add Lorentz force to the N-S equation. In CFX4.4, subroutine is the only way to achieve so. I have asked local CFX office, they said that it's quite different between CFX4 and CFX5 in subroutine, and it's a common problem for CFX5.5 not to converge when we use ccl to add Lorentz force to the euqation. However, I think CFX can deal with such probelms, for I saw some CFX articles published online concerned duct flow, and the result is good. You can email to me directly at this mail box, and I also look forwards to discussing with me on this issue. Best regards! Miko |
|
August 25, 2003, 18:01 |
Re: discuss user subroutine in CFX
|
#7 |
Guest
Posts: n/a
|
Hi Miko,
You should contact your CFX support rep for help. Work has been done specifically for MHD which they may be able to supply you with. On another note, if your momentum source term is non-linear, you will likely have convergence problems. To help convergence, include a momentum source linearization (in Pre, right under the momentum source boxes) equal to first derivative of your momentum source wrt speed. If the source term is different in all three directions, use the largest value for the linearization. Regards, Robin |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SUBROUTINE INPSOL in cfx 4.4 | amanda-pei | CFX | 0 | May 13, 2010 07:54 |
user subroutine error | CFDUSER | CFX | 2 | December 9, 2006 07:31 |
CFX 10 User Routine NOT in Fortran | Andre | CFX | 14 | August 9, 2006 00:03 |
user subroutine of inlet boundary | raymond | Siemens | 4 | December 6, 2001 06:44 |
CFX User Subroutine Archive | David Creech | Main CFD Forum | 0 | March 17, 1999 13:41 |