CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Importing 3D data as CEL into ANSYS CFX 11.0 (http://www.cfd-online.com/Forums/cfx/24644-importing-3d-data-cel-into-ansys-cfx-11-0-a.html)

Dave W. October 10, 2007 17:22

Importing 3D data as CEL into ANSYS CFX 11.0
 
Hi,

I am doing a 2 fluid homogeneous multiphase density difference buoyancy model. I'm particularly interested in the change in the interface of these 2 fluids when an external body force (electromagnetic force) acts on the bottom fluid (liquid metal). The model is 3D steady state.

I want to import some external 3D data (the electromagnetic body force, calculated from some other modelling programme, say in .csv or .txt format) into my CFX model as a CEL function or expression that I can use as a body momentum force? The body force data I want to import will have separate x, y and z component forces and be distributed along different elements in the 3D subdomain.

I know that you can import 2D data for a boundary condition profile (using Tools>Initialise Profile Data), but can you do something similar in 3D? The functions interpolation in CFX-Pre looks like something similar to what I'd want to use, except that it is manual and I have a 3D profile of data to import.

Any suggestions very welcome.

Cheers, Dave.

opaque October 10, 2007 18:06

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
Dear Dave,

Yes, that can be done.

However, it this a AC or DC electromagnetic problem?

For DC problems, there is a built-in module within CFX that will solver the electric potential equation along with the magnetic vector potential. It will also compute the Lorentz Force and include it in the momentum equation. In addition, it does the proper linearization for robustness and convergence.

Hope it helps,

Opaque


Dave W. October 10, 2007 18:48

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
Hi Opaque,

It is a DC problem, however I do not wish to resolve for Lorentz forces as I already have a solution for that from another electromagnetic FEM model (at the moment I am not looking at coupling the electromagnetics with the fluid flow).

Is there a way for me to input my existing static Lorentz force solution into the momentum equation in CFX? Some FORTRAN or CEL routine? There isn't much in CFX Help.

Cheers, Dave.


Glenn Horrocks October 10, 2007 18:48

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
Hi,

For a 3D interpolation function use the "Cloud of points" function.

Regards, Glenn Horrocks

Opaque October 10, 2007 21:28

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
Dear Dave,

That is rather odd. How could you compute the Lorentz force w/o the information for the velocity field? It is a 2-way interaction. Do you mean Lorentz force as in

F_Lorentz = J x B

= (sigma * E + sigma * Velocity x B) x B

You also said "static Lorentz force". Do you mean the above, or

F = q * E ?

In any case, you have the option of :

1 - Specifying the magnetic induction field (B) explicitly, plus solving the electric field.

2 - Solving for both electric and magnetic field

3 - Create a subdomain, and add a Momentum Source. Select Cartesian Components and input the components of your "Lorentz force". Remember to linearize the source respect to the velocity field. You only do this, if you are not using (1) or (2).

You can create a .csv file following the format used by CFX-Post, and create a Profile in CFX-Pre. Then, use the proper CEL expressions in the Subdomain panel.

Hope this helps, Opaque.

Dave W. October 10, 2007 21:58

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
Thanks Opaque,

I think I'm more for Option 3 - I've already previously solved for both electric and magnetic field, but you're right, there is an magnetic field component that is induced by fluid velocity, but I'm choosing for the moment to ignore that part :p

By the way, what did you mean by linearising the source w.r.t. velocity field?

Cheers, Dave.


Opaque October 10, 2007 22:20

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
Dear Dave,

What type of application are you using MHD for? aluminum reduction cells. I am just surprised you can get away with neglecting the "sigma * u x B" term.

Have you estimated the Hartmann/Chandrasekhar number for your application? That will give you a hint of the ratio between Lorentz forces to viscous forces.

If you include the term sigma * u x B, the solver needs to know how your momentum source (body force) depends on velocity. Your linearization coefficient is the derivative of the body force respect to velocity.

Opaque

Dave W. October 10, 2007 22:33

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
Yes aluminium reduction.

Its a test case on just using the software, so I'm not too worried about the viscous/velocity forces.

Dave

Prad October 19, 2007 07:43

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
hi, I am working on a similar thing. As for as I know, the data can be called in as a subroutine from the Fortron lib. But one may require a Fortron compiler. However I would like to know how a data file can be imported to CFX pre to define a force? every time I call the data(.csv format), it gives me a msg saying that it requires a name in the first command line.

opaque October 19, 2007 08:18

Re: Importing 3D data as CEL into ANSYS CFX 11.0
 
Dear Prad,

The .csv file has an explicit format described in the documentation. Otherwise, it will not work.

You can export a boundary condition profile from CFX-Post, and look at the format there as well.

Opaque



All times are GMT -4. The time now is 18:32.