|
[Sponsors] |
October 3, 2019, 06:24 |
MOISTURE EVAPORAION code
|
#21 | |
Senior Member
|
My code is contructed on a region for MOISTURE EVAPORAION as shown below:
Quote:
Kindly look into the attached image please. Here the Equs. 6-8 define the position of plane. With the position of plane, Equs. 9 and 10 are calculated. (1) Equ. 9 makes me think that r = rho*w*(dxb/dt) , where dxb/dt is the movement of plane, which I have not introduced in above code inside commented lines (2) Moreover the moving plane (xb) has two sides, high (-) and low (-) temp sides, and depending upon it calculations are made, which I have not introduced in above code inside commented lines I feel the above equations are simple ~ but I can't able to figure out the OpenFOAM coding technique as how to approach and solve. Correct me if im wrong anywhere please. Kindly share your ideas and ask me anything if you are not clear Thank you |
||
October 3, 2019, 17:32 |
|
#22 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I'm sorry. I don't do that kind of support here Just one remark: at the first glance I've seen that you're checking for the Tsat with the == operator. This is almost never a good idea in numerical codes as it is unlikely that the temperature is EXACTLY that value when being something solved for. Use a check with a tolerance.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
October 4, 2019, 00:09 |
|
#23 | |
Senior Member
|
Thank you for your response Bernhard.
Quote:
If you don't mind, can you please elaborate this stament "Use a check with a tolerance" Thank you once again ^^ |
||
October 4, 2019, 19:37 |
|
#24 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Means that you should check for the absolute value of the difference of T in the cell and Tsat to be smaller than a threshold |T-Tsat| < eps
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
October 10, 2019, 03:42 |
|
#25 | ||
Senior Member
|
Thank you Bernhard. I have tried implementing your idea by checking with a tolerance.
The structure below is a part of my main code. It compiles well and when running case file, it leads to error at 1968.6s Quote:
Quote:
(1) if (Tb[cellI] == Tsat) --> ERROR (2) I have tried if (Tb[cellI] - Tsat == scalar(1.0)), the same error continues My instinct says, there is a error in if-else loop - not sure though. Kindly share your ideas please. |
|||
October 10, 2019, 04:11 |
|
#26 | ||
Senior Member
|
And followed by above code, my energy source code structure is:
Quote:
Quote:
Did my above error is due to the false construction of NEW structure? If any ideas, kindly do share please. Thank you for your time ^^ |
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem of SOURCE term gradient in UDS | wind | Fluent UDF and Scheme Programming | 6 | December 1, 2022 15:21 |
transient source term | strakakl | OpenFOAM | 38 | November 19, 2013 02:18 |
How to write source term into scalar Fiel | JimKnopf | OpenFOAM Programming & Development | 0 | March 23, 2011 06:59 |
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 | BlGene | OpenFOAM Meshing & Mesh Conversion | 10 | August 6, 2009 05:26 |
UDF Source Term Units? | Brian | FLUENT | 1 | October 24, 2005 10:15 |