CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   MHD Boundary Condition (https://www.cfd-online.com/Forums/fluent/93774-mhd-boundary-condition.html)

amir.mofakham October 26, 2011 08:38

MHD Boundary Condition
 
Hi every one.
I want to define a boundary condition of a MHD problem by use of UDF. In the section UDS of the boundary I select the specified flux for the boundary and then in user-Define Scalar Boundary Value I select the udf which was interpreted. When I start the iteration following error is appeared!

Error: phi_boundary: Invalid electric potential field boundary
Error Object: ()

In the UDF as u see I write a simple commend:

#include "udf.h"
DEFINE_PROFILE(Electrical_Potential,t,i)
{

face_t f;
begin_f_loop(f,t)
{
F_UDSI(f,t,0)=10;
}
end_f_loop(f,t)


}
Thanks in advance.

Amir October 26, 2011 12:07

Hi,

Did you initialize your UDS (or you can patch it)?

amir.mofakham October 26, 2011 12:35

Hi Amir,
I initialize the uds form panel Solve\Initialize\initialize and I do not path it.

Amir October 26, 2011 12:47

Quote:

Originally Posted by amir.mofakham (Post 329580)
Hi Amir,
I initialize the uds form panel Solve\Initialize\initialize and I do not path it.

use this:

#include "udf.h"
DEFINE_PROFILE(Electrical_Potential,t,i)
{

face_t f;
begin_f_loop(f,t)
{
F_PROFILE(f,t,i)=10;
}
end_f_loop(f,t)


}
Bests,

amir.mofakham October 26, 2011 13:46

Unfortunately it didn't work!
The message was appeared too!
Error: phi_boundary: Invalid electric potential field boundary
Error Object: ()


All times are GMT -4. The time now is 19:16.