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

"=" or "==" when I modify BC (fixedGradient) during run ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2010, 09:12
Default "=" or "==" when I modify BC (fixedGradient) during run ?
  #1
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi!

I wonder what is the correct code form to modify the BC during runs.

I know that for a fixedValue BC the "==" sign is required to overwrite the orginal BC. For example:

Code:
phiS.boundaryField()[patchID]== phib.boundaryField()[patchID];
Now, if I want to modify a fixedGradient, it seems to me that "==" doesn't overwrite the orginal BC but "=" does. My piece of code is the following:

Code:
    fixedGradientFvPatchScalarField& gradpPatch=refCast<fixedGradientFvPatchScalarField>(p.boundaryField()[patchID]); 
    scalarField& gradpField =  gradpPatch.gradient();
    gradpField = fluxP;
Do you have an explanation ?

Best regards,
Cyp
Cyp 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
fixedGradient BC type with the channelOodles solver Bedotto OpenFOAM Running, Solving & CFD 5 April 15, 2019 10:49
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Cycling a transient run Chetan Mistry Phoenics 0 March 3, 2004 10:50


All times are GMT -4. The time now is 22:00.