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

Question about define the BC class

Register Blogs Community New Posts Updated Threads Search

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

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())
{
return;
}

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!

Wei
mathslw 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
HELP----Surface Reaction UDF Ashi Fluent UDF and Scheme Programming 1 May 19, 2020 21:13
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20: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 Siemens 1 March 29, 2000 04:57


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