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

[swak4Foam] groovyBC not working

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2016, 12:08
Default groovyBC not working
  #1
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 12
pakanatiakash is on a distinguished road
Hi All

I am using Openfoam 2.4.0 and installed swak4foam to use groovyBC. I am working on solidification problem and I need to apply a boundary condition on one of the walls for heat extraction. The expression is given by q = h*(T-Tinf), with h and Tinf as fixed values. T is the temperature of the domain at each step. I have the corresponding groovyBC code -

rightWall
{

type groovyBC;
value uniform 285.489;
valueExpression "flux";
variables "h=400.0;Tinf=25;flux=h*(Tinf-T);";
}

The initial temperature of the domain is 285.489 and thats the value I gave in the code above. If I understood it right, the would be the temperature for the first time step.

Coming to my problem, the flux is not being applied and when I visualize the results, the temperature of the wall stays 285.489. I am not quite sure what is going wrong. If I change the value of 285.489, the wall temperature is changing accordingly which leads me to conclude that the next two lines are not being read. Any idea what might be wrong?
pakanatiakash is offline   Reply With Quote

Old   January 13, 2016, 06:01
Smile
  #2
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
Hi Akash,

Your mistakes:

1.for apply heat flux you must add below code to groovyBc:

gradientExpression "flux";

2.you must add this code for applying gradient boundary condition.

fractionExpression "0";

Last edited by rapierrz; January 13, 2016 at 09:09.
rapierrz is offline   Reply With Quote

Old   January 13, 2016, 08:29
Default
  #3
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 12
pakanatiakash is on a distinguished road
Hullo

Thank you for the response. I corrected the errors and the issues still exist. A little bit of probing has made me realise that I am solving the Heqn instead of Teqn. Do you think that might be a problem as I am not solving for temperature explicitly?

Cheers
Akash
pakanatiakash is offline   Reply With Quote

Old   January 13, 2016, 09:20
Default
  #4
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
First,Excuse me for my mistake on call your name in my last post.


My suggestion is that check that your groovyBc installed correctly or not.

Check that in initial times that case is running,error of groovyBc occur or not.

Then check that if you put valueExpression "0" and for example :

gradientExpression "10000"; it's OK or not.

Best regards
rapierrz is offline   Reply With Quote

Old   January 13, 2016, 09:21
Default
  #5
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hi Akash!

I think the problem comes from your variable specification. I think the variables should be defined within brackets and quotating one after another. For instance,
Code:
...
variables ("h=400.0;"
           "Tinf=25;"
           "flux=h*(Tinf-T);"
           );
...
Hope it helps.

Best regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   January 13, 2016, 12:25
Default
  #6
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 12
pakanatiakash is on a distinguished road
thanks for the information. The problem I have is I am solving for H and I added an additional equation to solve for T. This fixed my problem!

Cheers
Akash
pakanatiakash 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
[swak4Foam] groovyBC issue - k and epsilon sagnikmazumdar OpenFOAM Community Contributions 24 March 1, 2015 08:16
[swak4Foam] switch between existing BCs with groovyBC?! michielm OpenFOAM Community Contributions 3 September 4, 2013 09:01
[swak4Foam] parabolic velocity profile with fluctuations (groovyBC?) newOFuser OpenFOAM Community Contributions 17 July 15, 2013 18:27
DPM parallel is not working but serial is working johnwinter FLUENT 1 March 27, 2012 03:01
[swak4Foam] groovyBC, multiple domains newOFuser OpenFOAM Community Contributions 5 August 26, 2011 11:51


All times are GMT -4. The time now is 21:48.