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

DEFINE_SOURCE - implicit

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2022, 05:09
Default DEFINE_SOURCE - implicit
  #1
Member
 
Chris
Join Date: Dec 2020
Posts: 45
Rep Power: 6
Pyrokrates is on a distinguished road
Hey,


short (and maybe simple) question. I wold like to use scalar transport equation with an source term which is a function of my scalar itself meaning:


HTML Code:
dC/dt + v * grad(C) = - alpha * C
So if I understand the manual correctly my source which I return would be:
HTML Code:
 source = - alpha * C
while my implicit part would be as follows:
HTML Code:
ds[eqn] = - alpha
Problem here for me is, that the explicit source part is stil a function of my scalar value, which is zero in every cell at the beginning and only defined at inlet boundary faces. Another problem for me is, when calling DEFINE_SOURCE, I need to set a value for C but from my understanding, for solving the equation implicit, I donīt need to set C because it should be the C from next time step and not the old one.


Thanks for any help in advance


Chris
Pyrokrates is offline   Reply With Quote

Old   April 6, 2022, 05:18
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
from my understanding there are two options for you:
1. use DEFINE_INIT function to set your scalar values (C = 0, as you told)
2. initialize steady state simulation, patch your scalar = 0, everywhere. On BC you put some value explicitly anyway. Calculate -> so you will get some scalar distribution.
Switch to transient, continue simulation
__________________
best regards


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

Old   April 6, 2022, 05:31
Default
  #3
Member
 
Chris
Join Date: Dec 2020
Posts: 45
Rep Power: 6
Pyrokrates is on a distinguished road
Hi and thank you for the quick answer.


Sorry but I donīt understand, whatīs the advantage of 1. for my code...
If Iīm using UDS, it should be initialize with zero everywhere... And under boundary conditions in fluent, I can define the value at the inlet... But my problem is that if I give a value of my cells to the source it is the one from previous step and not explicit? Isnīt a fully implicit source term possible?


I have also done some simulations using OpenFOAM and there I can just define if fully implicit.


Thanks in advance


Chris
Pyrokrates is offline   Reply With Quote

Reply

Tags
define_source, implicit explicit


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
Implicit vs Explicit Method Matteo991 Main CFD Forum 15 June 19, 2020 07:17
implicit solving of WaveEquations knutolafson OpenFOAM Programming & Development 6 August 24, 2019 06:07
Implicit and Explicit finite difference discretization of steady state heat conductio granzer Main CFD Forum 14 May 3, 2019 16:24
VOF Implicit formulation divergence issue hamed.majeed FLUENT 0 February 18, 2018 15:01
Can anybody give a introduction of the term "point implicit" and 'line implicit' ? Tommy Chen Main CFD Forum 2 August 3, 2015 04:30


All times are GMT -4. The time now is 16:21.