CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

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

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

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

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:

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:

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

Best regards,
Cyp is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 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 11:09.