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

Uds source term

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2020, 09:18
Smile Uds source term
  #1
New Member
 
amine
Join Date: Dec 2020
Posts: 7
Rep Power: 6
djendara is on a distinguished road
HI , I HAVE A GREAT PROBLEM WHEN I HOOK AN SOURCE TERM ,I FIND DIFFERENT RESULTS SPECIALLY WHEN I RUN TWO CALCULATION HAVE SAME STRICTURE EXP : POISSON EQUATION USING "UDS" VS HEAT EQUATION USING ENERGY EQUATION IN FLUENT USING SIMPLE ALGORITHM I FOUND THE FOLLOWING RESULTS :

1 /WHEN I RUN EQUATION WITH INTERPRETED SOURCE TERM FOR ENERGY GIVE REASONABLE RESULT

2 /WHEN I RUN EQUATION WITH INTERPRETED SOURCE TERM FOR ENERGY GIVE HUGE VALUES

THE UDF ARE :

DEFINE_SOURCE(ENERGY_SOURCE, c, thread, dS, eqn)

{

Domain *d = Get_Domain(1);

int fluid_ID = **;

Thread *t_fluid = Lookup_Thread (d,fluid_ID);

Source = C_T(c,t_fluid);

dS[eqn]=1;

return Source;

}

DEFINE_SOURCE(POISSON_SOURCE, c, thread, dS, eqn)

{

Domain *d = Get_Domain(1);

int fluid_ID = **;

Thread *t_fluid = Lookup_Thread (d,fluid_ID);

Source = C_UDSI(c,t_fluid,0);

dS[eqn]=1;

return Source;

}

WHY COMPUTING HEAT EQUATION BY UDS GIVE HUGE VALUES WHEN USING UDF SOURCE TERM
PLEASE HELP !
djendara is offline   Reply With Quote

Old   December 13, 2020, 09:50
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
YOU GET DIFFERENT RESULTS BECAUSE YOU PUT DIFFERENT THINGS IN. THERE IS NO REASON TO EXPECT THAT THE TWO UDFS GIVE THE SAME RESULT, WHY ARE YOU THINKING THAT?

Also, why are we screaming?
pakk is offline   Reply With Quote

Old   December 13, 2020, 12:22
Default
  #3
New Member
 
amine
Join Date: Dec 2020
Posts: 7
Rep Power: 6
djendara is on a distinguished road
Hi, i put same characteristic for the diffusive steady stat equation
1/same diffusivity coefficient
2/same boundary condition
3/same solver (simple algorithm ,second order)
the same source term that are is motioned
but only difference is energy vs uds
i have use cv=1 and rh0=1 and i deactivate relation between viscosity and energy equation to conserve the same stecture like uds
djendara is offline   Reply With Quote

Old   December 13, 2020, 13:37
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
If you don't add sources, is UDS0 completely identical to temperature? In the results, I mean?
pakk is offline   Reply With Quote

Old   December 13, 2020, 19:00
Default
  #5
New Member
 
amine
Join Date: Dec 2020
Posts: 7
Rep Power: 6
djendara is on a distinguished road
YES Mr PAKK WE ARE KNOWING THAT THE UDS IS IDENTICAL TO ENERGY EQUATION AFTER SOME MODIFICATION I CONFESS THAT , THE PROBLEM HERE IS WHEN WE INTERPRET THE TEMPERATURE LIKE AN SOURCE IN IN ENERGY EQUATION IT'S OK BUT IN THE TURN IF WE SET UDS_0 SOURCE IN UDS EQUATION IT GIVE IN THE HUGE VALUE
EXAMPLE YOU CAN SET SOURCE TERM = 1 IN UDS_0 IT WILL BE 300 IN THE RESULT
I USE ANSYS FLUENT 2020 R2 ACADEMIC
djendara is offline   Reply With Quote

Old   December 13, 2020, 21:21
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
I DIDN'T ASK IF YOU KNOW THAT THEY ARE EQUAL. I ASKED IF YOU SAW THAT THEY WERE EQUAL IN THE RESULTS. PLEASE SHOW PICTURES OF THE UDS0 AND TEMP WITHOUT SOURCE TERMS.

AND WHAT DOES IT MEAN THAT 1 WILL BE 300 IN THE RESULTS? THAT SOUNDS WRONG, 1 SHOULD BE 1.

Why do you scream like that? It's not so polite..
pakk is offline   Reply With Quote

Old   December 14, 2020, 01:45
Default
  #7
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you may put just a value instead of any macro here:
Source = C_UDSI(c,t_fluid,0);
for instance
Source = 300;

and it should be equivalent to
Source = C_T(c,t_fluid,0);
in case temperature is 300

if you have different result, it means, your Scalar field is defined wrong in way
djendara likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   December 21, 2020, 13:09
Default
  #8
New Member
 
amine
Join Date: Dec 2020
Posts: 7
Rep Power: 6
djendara is on a distinguished road
OK I , ESTIMATE THE SOLUTION OF THE PROBLEM SINCE THE THE STEADY EQUATION DEPEND OF TWO PARAMETER IN WHICH ARE THE DIFFUSIVITY RATIO AND SCALAR SOURCE TERM OR IN BETTER THE RATIO SCALAR SOURCE AND DIFFUSIVITY COEFFICIENT R=Sf/Df
BUT INSPITE OF THIS I DONT KNOW IF I MAKE MULTIPLICATION OF SOURCE TERM WITH CELL VOLUME OR NOT IN MY UDF
djendara is offline   Reply With Quote

Reply

Tags
uds source term


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
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 04:43


All times are GMT -4. The time now is 07:39.