Register Blogs Members List Search Today's Posts Mark Forums Read

 September 14, 2012, 12:53 simple doubt grad function #1 Member   M Mallikarjuna Reddy Join Date: Jul 2012 Posts: 91 Rep Power: 6 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

 September 28, 2012, 14:25 #2 Senior Member     Kyle Mooney Join Date: Jul 2009 Location: Amherst, MA USA - San Diego, CA USA Posts: 320 Rep Power: 10 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.

 September 28, 2012, 14:28 #3 Senior Member     Kyle Mooney Join Date: Jul 2009 Location: Amherst, MA USA - San Diego, CA USA Posts: 320 Rep Power: 10 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.

 September 28, 2012, 14:39 #4 Member   M Mallikarjuna Reddy Join Date: Jul 2012 Posts: 91 Rep Power: 6 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

 September 28, 2012, 14:49 #5 Senior Member     Kyle Mooney Join Date: Jul 2009 Location: Amherst, MA USA - San Diego, CA USA Posts: 320 Rep Power: 10 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.

 September 28, 2012, 15:04 #6 Member   M Mallikarjuna Reddy Join Date: Jul 2012 Posts: 91 Rep Power: 6 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

 September 28, 2012, 15:14 #7 Senior Member     Kyle Mooney Join Date: Jul 2009 Location: Amherst, MA USA - San Diego, CA USA Posts: 320 Rep Power: 10 I'm not very experienced with period BC's in foam. Sorry I can't help.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post anand_30 OpenFOAM Meshing & Mesh Conversion 12 December 12, 2011 05:16 AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06 ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50 fred OpenFOAM Paraview & paraFoam 2 November 18, 2005 20:01 liugx212 OpenFOAM Running, Solving & CFD 0 November 18, 2005 19:27

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