CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF to define the vector transport equation (https://www.cfd-online.com/Forums/fluent-udf/106528-udf-define-vector-transport-equation.html)

mvee August 31, 2012 05:47

UDF to define the vector transport equation
 
Hi

Through the UDS, scalar transport equation can be defined. I would like to define the vector transport equation. How can i define it?

regards
Mvee

Amir August 31, 2012 08:14

Hi,

You would need 3 UDSs as each component! :)

Bests,

mvee September 3, 2012 00:03

Hi Amir

Can you describe how and which UDS to use?

Mvee

Amir September 3, 2012 03:38

Quote:

Originally Posted by mvee (Post 379939)
Hi Amir

Can you describe how and which UDS to use?

Mvee

Suppose you wanna model momentum equation via UDS. You have to define 3 UDSs; u, v and w; and provide appropriate transport terms such as convection, diffusion, unsteady and source terms for each of them. A UDS has a general form of transport equation which you can modify for your purpose.

Bests,

mvee September 3, 2012 04:07

Hi Amir

Problem: Welding arc simulation
Description:
1) No. of zones: 3
2) Solid zone: electrode and workpiece (copper)
3) Fluid: argon (electrically conductive)

Current is imposed on the electrode which passes from the fluid and workpiece (which is at zero potential). Due to the current electro-magnetic field is generated which is governed by Maxwell’s equation (consists of current continuity and potential vector equation). These equations are having same form as that of our NS equations.

I have defined one UDS for voltage to solve current continuity equation. In the similar form do you mean to define UDS for vector A. Can you describe how shall I follow for the physics mentioned above? Also the output of this UDS will go as source term in momentum equation.

Thanks
Mvee

Amir September 3, 2012 05:29

Quote:

Originally Posted by mvee (Post 379956)
I have defined one UDS for voltage to solve current continuity equation. In the similar form do you mean to define UDS for vector A. Can you describe how shall I follow for the physics mentioned above? Also the output of this UDS will go as source term in momentum equation.

Hi,

Ok, you'll also need a vector transport equation. You can consider a vector transport equation as 3 scalar transport equation (one for each component) and model each of them via a UDS. Here you have a vector A, so define 3 UDS as Ax, Ay and Az as its components. So consider your vector equation and decompose it into 3 scalar equation. Finally with simple UDFs you can add each component of your added equations into each momentum components without any trouble.

Bests,

mvee September 3, 2012 06:13

Hi Amir

Thank you very much for your help, still have some doubt.
My algorithm will work in following manner -

(1) Current continuit equation: \Delta\Phi=0 /*\Phi = applied voltage and \Delta = Laplacian operator*/

(2) current density, j = -\sigma\nabla\Phi

(3) Potential vector equation: \Delta\vec{A}=\mu\vec{j}

First and third point can be applied through UDS. How to interface (required to solve point 2) between point 1 and 3? Is it required UDF?

Amir September 3, 2012 07:34

Quote:

Originally Posted by mvee (Post 379984)
(1) Current continuit equation: \Delta\Phi=0 /*\Phi = applied voltage and \Delta = Laplacian operator*/

(2) current density, j = -\sigma\nabla\Phi

(3) Potential vector equation: \Delta\vec{A}=\mu\vec{j}

First and third point can be applied through UDS. How to interface (required to solve point 2) between point 1 and 3? Is it required UDF?

Dear friend,

It depends. It doesn't need to evaluate j explicitly if you just want to obtain A! you can substitute j from equation 2 into 3 directly and remove the j variable. But if you want to obtain j as well; yes, you'll need a UDF to store the phi gradient into a UDM. It should be noted that you would also need UDFs for defining source terms of equation 3.

Bests,

mvee September 10, 2012 01:27

Hi Amir

Thank you very much for your kind co-operation. I have solved these equations.

Thank you
Mvee

mm.abdollahzadeh October 30, 2022 15:08

Quote:

Originally Posted by Amir (Post 380004)
Dear friend,

It depends. It doesn't need to evaluate j explicitly if you just want to obtain A! you can substitute j from equation 2 into 3 directly and remove the j variable. But if you want to obtain j as well; yes, you'll need a UDF to store the phi gradient into a UDM. It should be noted that you would also need UDFs for defining source terms of equation 3.

Bests,

Hi amir, 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.


All times are GMT -4. The time now is 02:36.