|
[Sponsors] |
[swak4Foam] Fixed value using the gradient expression in Groovy BC |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 6, 2014, 00:52 |
Fixed value using the gradient expression in Groovy BC
|
#1 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
Dear swak4Foamers,
I am using a new thread for this,since I have put a question earlier in a wrong place. I am using a Boundary condition to find out "Tempreature" of a patch.The value is a fixed value. The gradient expression is used for calculation of temperature. Earlier I had some problems in making expressions,but now they semms to be ok... My groovyBC expression is as follows [boundaryField{ interFace { type groovyBC; #include "commonVariables" gradientExpression "yGRAD" ; fractionExpression "1"; value uniform 400; }][/CODE] commonVariables [variables "sig=5.67e-8;emiss=0.9;Tenv=773;Yvolat=(YCOs+YCO2s+YH2s+YCH4s +YCxHyOzs);epsilon=0.5+0.5*((0.7207-Yvolat)+(0.1457-Ychar)+(0.0426-Yash));yGRAD=sig*emiss*(pow(Tenv,4)-pow(ts,4))/((1-epsilon)*mag(effectiveThermalConductivityS)*mag(Sf ()));";][/CODE] Now,my solver is a steady state one and it stops at a certain point in Time=2,when try to calculate the following(according to me); [volScalarField cp =((D*log(ts/AA)-E)+cpSstd)/2;][/CODE](only place which used "log") The error is as follows [Time = 2 #0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 log in "/lib/x86_64-linux-gnu/libm.so.6" #4 Foam::log(Foam::Field<double>&, Foam::UList<double> const&) at ??:? #5 at ??:? #6 at ??:? #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 at ??:? Floating point exception (core dumped) ] My problem is in "log(ts/AA)" is not (-)ve or zero,so,what my problem can be....??? Please help. Thanks. Thamali Last edited by Thamali; February 6, 2014 at 00:58. Reason: highlight error |
|
February 6, 2014, 05:27 |
|
#2 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
(Use the "Preview Post"-button if you're unsure) Quote:
__________________
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 |
|||
February 6, 2014, 06:53 |
|
#3 | |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
Quote:
ts -is a "volScalarField ",temperature in Kelvin AA- dimensionedScalar 1K(Kelvin) I am attaching how my "ts" field at time=1, for your reference.According to that,line 10138, " value uniform 0;" Is this the problem?? Do you have any idea why it became "0" as I have put 400 already.(I changed Tenv =973,earlier it was 773) [interFace { type groovyBC; #include "commonVariables" gradientExpression "yGRAD" ; value uniform 400; fractionExpression "1"; }][/CODE] [variables "sig=5.67e-8;emiss=0.9;Tenv=973;Yvolat=(YCOs+YCO2s+YH2s+YCH4s +YCxHyOzs);epsilon=0.5+0.5*((0.7207-Yvolat)+(0.1457-Ychar)+(0.0426-Yash));yGRAD=sig*emiss*(pow(Tenv,4)-pow(ts,4))/((1-epsilon)*mag(effectiveThermalConductivityS)*mag(Sf ()));";][/CODE] Eager for a reply. Thanks. Thamali |
||
February 13, 2014, 18:26 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I have a real hard time understanding your problem and the formatting doesn't help. If your post looks strange (the way this one does) use the "Edit"-button and try to correct the problem. And reread the post and ask yourself "would someone else understand what my problem is by reading this?" Concerning your question "uniform 0" is a problem if you calculate the log from it. WHY it became 0: I don't know. .... one moment. The "interface"-section you give IS the ts? Then it is clear. Your fraction is 1. Which means "this is a Dirichlet"-condition. There is no valueExpression. Thus 0 is used as the value.
__________________
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 |
||
February 28, 2014, 04:37 |
|
#5 | |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
Hi,
Thousand apologies for replying this much late. I was involving in some other works,and although I saw the reply I was thinking of take time and make a clear one this time. I managed to solve the problem by referring some threads like, http://www.cfd-online.com/Forums/ope...-gradient.html I changed my BC as follows, So,I added Code:
refValue uniform 400; Code:
interFace { type groovyBC; #include "commonVariables" gradientExpression "yGRAD" ; value uniform 400; //valueExpression 400; refValue uniform 400; fractionExpression "0"; } Thank you very much for your concern. Quote:
Anyway please correct me if I am wrong somewhere. Appreciate your assistance highly. Thamali |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convergence problem with tetrahedral grids | Tarak | OpenFOAM Running, Solving & CFD | 22 | June 25, 2018 19:09 |
How to manage the pressure term in fixed mass flow rate based channel flow simulation | sjwon1991 | Main CFD Forum | 5 | July 10, 2017 07:21 |
CEL expression in CFX pre | Jane92 | Main CFD Forum | 1 | June 3, 2016 02:48 |
How to get Pressure Gradient and Density Gradient as Output Variables? | badboyz31 | CFX | 2 | June 26, 2015 03:09 |
Temperature gradient for the internal Field. | Philipp Dietrich | OpenFOAM Programming & Development | 0 | July 2, 2014 03:15 |