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

Issue on setting time-sensitive Initialization in CFX

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 4, 2018, 05:47
Default Issue on setting time-sensitive Initialization in CFX
  #1
New Member
 
Join Date: Jun 2018
Posts: 3
Rep Power: 8
JWYeoh is on a distinguished road
Hi,

I am running a bioreactor multi-component single phase simulation to study the concentration gradient distribution of various components such as nutrients etc.
Those components are solved by species transport equations. The simulation time starts at t=0 until t=10 h. The substrate is added at t = 5 h. The source term described under Expression includes how the substrate is being converted into product. When setting the Initialization of the Mass fraction for the substrate, I have tried to use the 'if' function such as (if t == 5 [h], 1E-3, 0) or (if t>= 5 [h], 1E-3, 0). The results (transient data) from both settings turned out to be a flat line at zero while other components with a constant value initialization were solved properly.

How should I approach this issue?

Thank you.
JWYeoh is offline   Reply With Quote

Old   June 4, 2018, 13:02
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,743
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Why do you use any if statements based on time in the initialization? Initialization happens only once and at t=0, and your initial mass fraction for the substrate is 0 everywhere.


You should be having a time-dependent source term, which is not initialization.
LuckyTran is offline   Reply With Quote

Old   June 5, 2018, 05:11
Default
  #3
New Member
 
Join Date: Jun 2018
Posts: 3
Rep Power: 8
JWYeoh is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Why do you use any if statements based on time in the initialization? Initialization happens only once and at t=0, and your initial mass fraction for the substrate is 0 everywhere.


You should be having a time-dependent source term, which is not initialization.
Thank you for your prompt response.

I do have a source term under expression to describe how the substrate will change overtime, which is expressed as something like this:
Substrate = -Kmax*(Substrate.mf/(Substrate.mf+ Ksub)),

I would expect this source term function to act like a differential equation.

The initial mass fraction of substrate at t=0 would be zero and the substrate of mass fraction (1E-3) is only being added into medium at t=5 [h] to kick start the conversion process into product. So I suppose the substrate.mf should be set to 1E-3 at t=5 [h].

I wonder if there is way to assign some values to substrate.mf directly under expression?

But yes, I will try to figure out a way to use time-dependent source term. Thank you for your suggestions.
JWYeoh is offline   Reply With Quote

Old   June 6, 2018, 09:07
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,743
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Seems to be a language barrier. Ok now I see what you are trying to do. You want to set substrate.mf to a different value at a certain time not create an added source of the substrate.


The trick is to run the case until t=5. Then rerun the case starting at t=5 but using the correct initial value for the substrate. Is that what you are already doing?
LuckyTran is offline   Reply With Quote

Old   June 8, 2018, 05:13
Default
  #5
New Member
 
Join Date: Jun 2018
Posts: 3
Rep Power: 8
JWYeoh is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Seems to be a language barrier. Ok now I see what you are trying to do. You want to set substrate.mf to a different value at a certain time not create an added source of the substrate.


The trick is to run the case until t=5. Then rerun the case starting at t=5 but using the correct initial value for the substrate. Is that what you are already doing?
I have tried the time-dependent source term by adding in an additional equation so that it can reach my desired concentration (1e-3) at t=5. The case is working.

Thank you so much for your advice.

I have also run the suggested newest trick with the substrate initialization as 0 in the first case, and 1E-3 as second case using setting "continuous from previous case" .res file, but I still got a straight line at 0 for the substrate mass fraction, whereas other components are solved properly (the mass fraction results continued from case 1 results).
JWYeoh 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
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 22:29
How to export time series of variables for one point? mary mor OpenFOAM Post-Processing 8 July 19, 2017 10:54
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40


All times are GMT -4. The time now is 02:14.