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

Computing the divergence of a vector

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2024, 06:18
Default Computing the divergence of a vector
  #1
New Member
 
Join Date: Mar 2024
Posts: 9
Rep Power: 2
voidcrow is on a distinguished road
I'd like to compute the divergence of a vector for use in a source term. Suppose that it takes the form:
\nabla \cdot \vec{j} = \nabla \cdot \left( k \nabla \alpha \right)
where k is some constant and \alpha is a user-defined scalar (so I have access to its gradient via C_UDSI_G).

I know it is possible to get the divergence by specifying each component of \vec{j} as its own user-defined scalar, using C_UDSI_G to get the correct components \partial j_x/\partial x, \partial j_y/\partial y, \partial j_z/\partial z and then summing them.
Surely there must be a better way to do this than specifying three additional user-defined scalars for this purpose alone?
voidcrow 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
Computing the heat flux vector in OpenFoam nikovasi OpenFOAM Programming & Development 1 July 9, 2022 20:22
Divergence Problem Conjugated Heat Transfer Christoph.Ha FLUENT 27 December 5, 2017 11:46
Two Phase Flow In Vertical Pipe stonepreston FLUENT 2 October 31, 2017 09:35
Problem with Velocity Poisson Equation and Vector Potential Poisson Equation mykkujinu2201 Main CFD Forum 1 August 12, 2017 14:15
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 12:34


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