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

Source Term with Fluxes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2020, 07:46
Default Source Term with Fluxes
  #1
Member
 
Mohinder Suresh
Join Date: Dec 2014
Posts: 32
Rep Power: 11
Mohinder Suresh is on a distinguished road
Hello Fluent users!
I need some help regarding the application of an x-component momentum source term.

I want to add the source term:
S = -1/x*C*F

to the x-momentum equation. "x" represents the x coordinate, "C" is a constant and F is the inviscid Flux in the x-direction.




In the FLUENT manual I found the example:
Code:
#include "udf.h"

#define CON 20.0

DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn)
{
  real source;

  if (C_T(cell,thread) <= 288.)
  {
    source = -CON*C_U(cell,thread);
    dS[eqn] = -CON;
  }
  else
  {
    source = dS[eqn] = 0.;
  }

  return source;
}
and I understand how it works, but how can I access the inviscid flux in FLUENT? And how would the derivate dS[eqn] look like for this case?

About any help I would be very grateful!


Many greets

Mohinder
Mohinder Suresh 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
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 16:18
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 09:07
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 15:14
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41


All times are GMT -4. The time now is 22:12.