CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF to define the vector transport equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2012, 05:47
Default UDF to define the vector transport equation
  #1
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 16
mvee is on a distinguished road
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
mvee is offline   Reply With Quote

Old   August 31, 2012, 08:14
Default
  #2
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Hi,

You would need 3 UDSs as each component!

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   September 3, 2012, 00:03
Default
  #3
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 16
mvee is on a distinguished road
Hi Amir

Can you describe how and which UDS to use?

Mvee
mvee is offline   Reply With Quote

Old   September 3, 2012, 03:38
Default
  #4
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by mvee View Post
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,
__________________
Amir
Amir is offline   Reply With Quote

Old   September 3, 2012, 04:07
Default
  #5
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 16
mvee is on a distinguished road
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
mvee is offline   Reply With Quote

Old   September 3, 2012, 05:29
Default
  #6
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by mvee View Post
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,
__________________
Amir
Amir is offline   Reply With Quote

Old   September 3, 2012, 06:13
Default
  #7
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 16
mvee is on a distinguished road
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?
mvee is offline   Reply With Quote

Old   September 3, 2012, 07:34
Default
  #8
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by mvee View Post
(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,
__________________
Amir
Amir is offline   Reply With Quote

Old   September 10, 2012, 01:27
Default
  #9
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 16
mvee is on a distinguished road
Hi Amir

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

Thank you
Mvee
mvee is offline   Reply With Quote

Old   October 30, 2022, 15:08
Smile
  #10
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Quote:
Originally Posted by Amir View Post
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.
mm.abdollahzadeh is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write equation into UDF? Jane Fluent UDF and Scheme Programming 10 August 30, 2023 04:53
Swtich on or of the resolution of an equation in UDF pifou74 FLUENT 0 September 29, 2009 16:02
UDF: exporting a variable between two DEFINE function Carlo FLUENT 3 August 19, 2009 12:21
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
UDF to add two governing equation?? T.K. Yang FLUENT 0 May 9, 2006 02:54


All times are GMT -4. The time now is 09:40.