|
[Sponsors] |
Non interger scalar field power - Chemistry law |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 26, 2014, 15:17 |
Non interger scalar field power - Chemistry law
|
#1 | |
New Member
Join Date: Apr 2013
Posts: 20
Rep Power: 13 |
Hi Foamers,
I would like to code a chemistry problem. A field named C is consumed over time following random chemistry law: The problem is that the exponent is not an integer. In the case where the chemistry is: I use the following code: Quote:
Would it be possible to do the same with the "0.41 exponent" ? Thanks, Nathanael. |
||
June 29, 2014, 04:39 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
nope its not possible, you should make it linear forexample some thing like this:
Code:
solve ( fvm::ddt(C) == fvm::Sp(k/pow(C,0.51), C) );
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
June 29, 2014, 11:56 |
|
#3 |
New Member
Join Date: Apr 2013
Posts: 20
Rep Power: 13 |
Hi nimasam,
Thank you for your answer. I was affraid that it would not be possible. The problem with the suggested code is that it crashes if C = 0 somewhere in the scalarfield. Thanks for your help, Nathanaël. |
|
June 29, 2014, 14:12 |
|
#4 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
you can add a very small number forexample:
Quote:
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
||
Tags |
chemistry |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
One-Seventh power law in turbulent pipe flows | selvam2487 | CFX | 3 | September 9, 2013 18:46 |
UDF power law | dimsum | Fluent UDF and Scheme Programming | 0 | June 4, 2013 03:26 |
Star CCM+ issue (VOF and Non newtonian power law) | Sam | Siemens | 3 | January 23, 2009 08:39 |
from a vecor field to get a gradient of scalar | dusky.he | Main CFD Forum | 4 | March 30, 2007 10:08 |