CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Question about define the BC class

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

LinkBack Thread Tools Display Modes
Old   August 28, 2012, 20:51
Default Question about define the BC class
New Member
Wei Liu
Join Date: Apr 2011
Location: West Lafayette, IN
Posts: 28
Rep Power: 6
mathslw is on a distinguished road

I want to define my own BC class after each iteration. Actually, I want to update my inlet velocity after each iteration. As far as I know, I can use the following format:

void Foam::updateInletVelocityFvPatchVectorField::updat eCoeffs()
if (updated())

const fvPatchField<vector>& Uf =
patch().lookupPatchField<volVectorField, vector>("U");

How can I obtain the velocity "Ufc" of the patch cell ?
How can I obtain the gradient "gradUc" of the velocity of the patch cell?

vectorField:perator= (gradUc & Ufc);
updateInletVelocityFvPatchVectorField::updateCoeff s();

Can I use the set gradUc = Uf.gradientInternalCoeffs() and Ucf = Uf.patchInternalField()?

Thanks in advance!

mathslw is offline   Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP----Surface Reaction UDF Ashi Fluent UDF and Scheme Programming 0 May 25, 2009 09:39
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 03:43
question K.L.Huang CD-adapco 1 March 29, 2000 04:57

All times are GMT -4. The time now is 16:47.