CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > 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 Search this Thread Display Modes
Old   October 28, 2010, 10:16
Default how can i modify boundaryPatch value at runtime
  #1
New Member
 
Yu-ching Hish
Join Date: Apr 2010
Posts: 4
Rep Power: 15
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, 10:45
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 17
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, 22:10
Default
  #3
New Member
 
Yu-ching Hish
Join Date: Apr 2010
Posts: 4
Rep Power: 15
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 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
runTime deji OpenFOAM 2 January 17, 2019 10:14
[Other] Modify mesh runtime Daniele111 OpenFOAM Meshing & Mesh Conversion 8 December 19, 2010 16:43
Modify my mesh runtime Daniele111 OpenFOAM Running, Solving & CFD 0 October 9, 2010 08: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) Siemens 2 December 2, 2004 12:35


All times are GMT -4. The time now is 07:52.