|
[Sponsors] |
August 28, 2012, 20:51 |
Question about define the BC class
|
#1 |
New Member
Wei Liu
Join Date: Apr 2011
Location: West Lafayette, IN
Posts: 29
Rep Power: 15 |
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 |
|
|
|
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 |