CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)

 Li San April 17, 2001 07:30

I plan to simulate the natural convection of aqueous solutions of sodium chloride in a cubic cell under a uniform magnetic field. Would you please give a hand to tell me how to do it using fluent? Thanks in advance.

 Rüdiger Schwarze April 19, 2001 06:45

You have two possibilities: Either You can calulate the Lorentz force directly in a user-definied subroutine or You teat the lorentz force as a user-defined scalar.

 Li San April 19, 2001 07:11

Dear Rüdiger Schwarze, Thank you very much. I am a new comer. I think I should use user-defined subroutine. But I have no such kind of experiment. Could you give me a hand? How about send me a sample? Thanks in advance. Li

 Rüdiger Schwarze April 19, 2001 09:58

Lorentz force density in x:

DEFINE_SOURCE(x_imp, cell, thread, dS, eqn) {

/* variables */

float jz, by, source; float x[ND_ND];

/* coordinates of cell center */

xk = x[0];

yk = x[1];

jz = f(xk,yk); /* eddy current density, deduced from analytical formula */

by = f(xk,yk); /* magnetic flux density, deduced from analytical formula */

source = -jz*by;

dS[eqn] = 0.0;

 Li San April 19, 2001 20:18