|
[Sponsors] |
Issue on setting time-sensitive Initialization in CFX |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 4, 2018, 05:47 |
Issue on setting time-sensitive Initialization in CFX
|
#1 |
New Member
Join Date: Jun 2018
Posts: 3
Rep Power: 8 |
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. |
|
June 4, 2018, 13:02 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,743
Rep Power: 66 |
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. |
|
June 5, 2018, 05:11 |
|
#3 | |
New Member
Join Date: Jun 2018
Posts: 3
Rep Power: 8 |
Quote:
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. |
||
June 6, 2018, 09:07 |
|
#4 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,743
Rep Power: 66 |
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? |
|
June 8, 2018, 05:13 |
|
#5 | |
New Member
Join Date: Jun 2018
Posts: 3
Rep Power: 8 |
Quote:
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). |
||
|
|
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 |