CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Wall heat transfer using groovyBC (XiFoam solver)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By usergk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2011, 11:03
Default Wall heat transfer using groovyBC (XiFoam solver)
  #1
Member
 
Join Date: Nov 2010
Posts: 54
Rep Power: 16
usergk is on a distinguished road
Hello,

I am trying to implement wall heat transfer boundary condition in XiFoam solver using groovyBC.

I implemented the following in the 0/T file. The boundary field is also defined below.

************************************************** **

dimensions [ 0 0 0 1 0 0 0 ];

internalField uniform 293;

boundaryField
{
inlet
{
type fixedValue;
value uniform 293;
}
outlet
{
type inletOutlet;
inletValue uniform 293;
value uniform 293;
}
upperWall
{
type groovyBC;
value uniform 293;
gradientExpression "gradT";
fractionExpression "0";
variables "htot=100.0;Tinf=298.15;Cp=1000;k=alphaEff*rho*Cp; gradT=htot*(Tinf-T)/k;";
}
lowerWall
{
type groovyBC;
value uniform 293;
gradientExpression "gradT";
fractionExpression "0";
variables "htot=100.0;Tinf=298.15;Cp=1000;k=alphaEff*rho*Cp; gradT=htot*(Tinf-T)/k;";
}
frontAndBack
{
type groovyBC;
value uniform 293;
gradientExpression "gradT";
fractionExpression "0";
variables "htot=100.0;Tinf=298.15;Cp=1000;k=alphaEff*rho*Cp; gradT=htot*(Tinf-T)/k;";
}

}

************************************************** **

(
inlet
{
type patch;
nFaces 600;
startFace 715675;
}
outlet
{
type patch;
nFaces 1140;
startFace 716275;
}
upperWall
{
type wall;
nFaces 4460;
startFace 717415;
}
lowerWall
{
type wall;
nFaces 5000;
startFace 721875;
}
frontAndBack
{
type wall; //cyclic;
nFaces 24450;
startFace 726875;
}
)

************************************************** **

However, I get the following error on running the case, after the first time step:

Time = 1.19999e-08

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 4.5435e-09, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 5.34057e-09, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 5.63e-09, No Iterations 1
Max St-Courant Number = 7.86393e-07
Igniting cell 43926 state : 1 1 0.135 2.12673e-13
Igniting cell 40685 state : 1 1 0.135 1.47286e-13
Igniting cell 40686 state : 1 1 0.135 1.65015e-13
Igniting cell 40687 state : 1 1 0.135 2.17713e-13
Igniting cell 40866 state : 1 1 0.135 1.40006e-13
Igniting cell 43925 state : 1 1 0.135 4.56461e-13
Igniting cell 43927 state : 1 1 0.135 2.50109e-13
Igniting cell 44106 state : 1 1 0.135 1.30268e-13
DILUPBiCG: Solving for b, Initial residual = 1, Final residual = 4.10752e-10, No Iterations 1
min(b) = 0.999976
DILUPBiCG: Solving for Su, Initial residual = 0.999994, Final residual = 1.49261e-08, No Iterations 14
DILUPBiCG: Solving for Xi, Initial residual = 1, Final residual = 2.80249e-07, No Iterations 16
max(Xi) = 1
max(XiEq) = 1.001
Combustion progress = 6.3418e-08%


--> FOAM FATAL ERROR:
attempt to use janafThermo<equationOfState> out of temperature range 100 -> 5000; T = 0

From function janafThermo<equationOfState>::checkT(const scalar T) const
in file /home/gk/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting (FOAM_ABORT set)

---------------------------------------------------

Could someone share where I may be going wrong? I'd appreciate it very much.

Another question I had is how can I access values used inside a solver (eg Cp) within the BC definition?

Thanks,
gk
Kummi likes this.
usergk is offline   Reply With Quote

Old   February 4, 2011, 13:13
Default
  #2
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Hi,

Please note that Temperture T is not solved for - it is the energy eguation that is solved. I.e. the BC needs to be imposed on the enthalpy eq.

rgds
Bjorn
bhh is offline   Reply With Quote

Old   February 4, 2011, 13:21
Default
  #3
Member
 
Join Date: Nov 2010
Posts: 54
Rep Power: 16
usergk is on a distinguished road
Hello Bjorn

Thanks for your reply.

I tried to implement it this way:

{
type groovyBC;
value uniform 293;
variables "htot=100.0;Tinf=298.15;cp=1000;ktot=alphaEff*rho* cp;";
valueExpression "Tinf";
fractionExpression "1.0/(1.0 + ktot/(mag(Tinf-T)*htot))";
}

and it seemed to avoid the janafThermo error.

However, I am new to using this software, and don't quite understand what you mean by "BC needs to be imposed on the enthalpy eq".

Could you please provide some directions?

Also, how can I access the T and cp values in the BC from within the solver code?

Thanks a lot,
gk
usergk is offline   Reply With Quote

Old   February 4, 2011, 13:29
Default
  #4
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Hi,

T is deduced from enthalpy not solved by a pdf. The good thing is that the enthalpy eq has built-in BC for wall heat transfer coeff and T_inf. Check the BC e.g. BuoyantFoam tutorials

Bjorn
bhh is offline   Reply With Quote

Old   February 4, 2011, 14:10
Default
  #5
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Hi again;

Here is an example on how to set BC in 0/T:

sideWall
{
type wallHeatTransfer;
alphaWall 20;
Tinf 280.;
value 300.;
}
rgds
Bjorn
bhh is offline   Reply With Quote

Old   February 4, 2011, 14:21
Default
  #6
Member
 
Join Date: Nov 2010
Posts: 54
Rep Power: 16
usergk is on a distinguished road
Thank you very much, Bjorn!
usergk is offline   Reply With Quote

Old   February 4, 2011, 14:23
Default
  #7
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Did the proposal work for your case?
Bjorn
bhh is offline   Reply With Quote

Old   February 4, 2011, 14:36
Default
  #8
Member
 
Join Date: Nov 2010
Posts: 54
Rep Power: 16
usergk is on a distinguished road
Hi Bjorn,

Yes, the simulations ran properly using:

{
type wallHeatTransfer;
alphaWall uniform 20;
Tinf uniform 298;
value uniform 293;
}


The reason I had chosen groovyBc was because I wanted to implement:
q = - k_f * d(T)/dn = h_ext * (T_ext - T_w)

I'll run the case with the BC you mentioned and try to validate the results.

I am still not sure how to implement the groovyBC though. The simulations do run with the groovyBC I specified, but as you mentioned, the T specified is not being solved for (?), so I am not sure the results will be accurate.

{
type groovyBC;
value uniform 293;
variables "htot=100.0;Tinf=298.15;cp=1000;ktot=alphaEff* rho* cp;";
valueExpression "Tinf";
fractionExpression "1.0/(1.0 + ktot/(mag(Tinf-T)*htot))";
}


Thanks a lot,
gk
usergk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
Looking for a solver (Mach 0.4, Turbulent, Heat Transfer, Second Order) fredo490 OpenFOAM Running, Solving & CFD 3 March 27, 2013 05:07
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
Heat transfer BC at wall- why need wall thickness? Julie FLUENT 7 February 3, 2012 22:41
Convective / Conductive Heat Transfer in Hypersonic flows enigma Main CFD Forum 2 November 1, 2009 23:53


All times are GMT -4. The time now is 12:33.