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

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

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

Reply
 
LinkBack Thread Tools 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: 245
Rep Power: 10
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

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
fixedGradient BC type with the channelOodles solver Bedotto OpenFOAM Running, Solving & CFD 4 April 22, 2013 06:02
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 18:56.