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

how can i modify boundaryPatch value at runtime

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 28, 2010, 09:16
Default how can i modify boundaryPatch value at runtime
  #1
New Member
 
Yu-ching Hish
Join Date: Apr 2010
Posts: 4
Rep Power: 7
nt31921a is on a distinguished road
i study icoFoam source code.

i want to modify U boundaryPatch value.

i set fixed value at inlet patch.

inlet
{
type fixedValue;
value uniform (0 1 0);
}

then i modify the source code.

/*** source code ****/

label patchID = mesh.boundaryMesh().findPatchID("inlet");
U.boundaryField()[patchID] = U.boundaryField()[patchID]*2;
runTime.write();

/************************/
but it does not work. the boundaryPatch value still is uniform(0 1 0);

please help me to solve the problem. thanks.
nt31921a is offline   Reply With Quote

Old   October 28, 2010, 09:45
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Hi,

can you try == instead of =?

Best Kathrin
kathrin_kissling is offline   Reply With Quote

Old   October 28, 2010, 21:10
Default
  #3
New Member
 
Yu-ching Hish
Join Date: Apr 2010
Posts: 4
Rep Power: 7
nt31921a is on a distinguished road
thanks a lot ! Kathrin

it work.

thanks for your help!
nt31921a 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
Modify mesh runtime Daniele111 OpenFOAM Meshing & Mesh Conversion 8 December 19, 2010 16:43
runTime deji OpenFOAM 1 October 16, 2010 13:06
Modify my mesh runtime Daniele111 OpenFOAM Running, Solving & CFD 0 October 9, 2010 07:23
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
fortran runtime error while calculating Anna (aka new-user) CD-adapco 2 December 2, 2004 12:35


All times are GMT -4. The time now is 04:53.