Fixed value using the gradient expression in Groovy BC
Dear swak4Foamers,
I am using a new thread for this,since I have put a question earlier in a wrong place.:mad: 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::printStack(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 |
Quote:
(Use the "Preview Post"-button if you're unsure) Quote:
|
1 Attachment(s)
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 |
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. |
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 Thank you very much for your concern. Quote:
Anyway please correct me if I am wrong somewhere. Appreciate your assistance highly. Thamali |
All times are GMT -4. The time now is 12:58. |