CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

simple doubt grad function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 14, 2012, 12:53
Default simple doubt grad function
  #1
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Foamers,
my doubt is very simple. I am writing derived boundary condition for a scalar T. My project is related to flow of suspensions through channels. In my case for a scalar T at upper and bottom boundaries i need to apply zero surface normal flux boundary condition. When i applied this zero flux in my governing equation i got an expression for the dT/dy.

For scalarField T the governing equation is
solve
(
fvm::div(phi, T)
+ fvm::laplacian(0.62*1.82*pow(a,2)*g*pow(T,2)*pow(0 .68-T,-1), T)
+ fvm::laplacian(0.41*pow(a,2)*g*T, T)
==
- fvc::laplacian(0.41*pow(a,2)*T*T, g)
);

where g=local Strain rate
=mag(symm(fvc::grad(U)))

After applying zero surface normal flux, i got
dT/dy=pow(T, 2)*gm/(T*mag(symm(fvc::grad(U))*(1+T*2.75*pow(0.68-T, -1)))

To write this i have chosen tractionDisplacement boundary in solidDisplacementFoam. Based on that i written my code. Every thing is ok but in my derived boundary condition i used grad(U). When i compiled this derived BC the error like "no matching function for call to ‘grad(const Foam::vectorField&)" is coming.

Which header file i need to include please suggest me. Or any other easy way to write this BC.

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   September 28, 2012, 14:25
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
I believe the fvc::grad operator only works on geometricFields. If you're operating on a boundary you might have to manually calculate your zeroGradient condition which would be a function of the patch internal values and the deltaX from the patch face to the internal cell center. I'll see if I can dig up another BC that does something similar. Posting your BC code where the compiler threw the bug would also be more helpful than posting the code that compiled ok.
kmooney is offline   Reply With Quote

Old   September 28, 2012, 14:28
Default
  #3
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
Wouldn't the 'slip' boundary condition give you the zero normal flux condition you're looking for?

If you you don't need to write any new code.
kmooney is offline   Reply With Quote

Old   September 28, 2012, 14:39
Default
  #4
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Kmoony,
Thanks for reply. I want to know what slip BC is able to do. Please suggest me any tutorial useful to understand the slip BC.

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   September 28, 2012, 14:49
Default
  #5
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
I believe, physically, slip means there is no shear stress at the wall. It creates a no penentration, zero-tangential gradient condition. Just google around, you'll be able to figure it out in detail.
kmooney is offline   Reply With Quote

Old   September 28, 2012, 15:04
Default
  #6
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi kmoony,
Thanks for your advice i will go according to your suggestion.

I have one more doubt, not relevant to the present title of the thread. I am doing my PG project on flow of suspended particles through wavy channel (sinusoidal wave), of infinite length. First i created one full cycle, i need to extend this geometry (one full cycle) into infinite number depending on length of the channel. I studied periodic BC is suitable for it. Please give me some information about periodic BC, what actually it do.

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   September 28, 2012, 15:14
Default
  #7
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
I'm not very experienced with period BC's in foam. Sorry I can't help.
kmooney 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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
[OpenFOAM] LibvtkFoamso fred ParaView 2 November 18, 2005 19:01
Please help about the VTKFoam liugx212 OpenFOAM Running, Solving & CFD 0 November 18, 2005 18:27


All times are GMT -4. The time now is 18:49.