CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   how can i modify boundaryPatch value at runtime (http://www.cfd-online.com/Forums/openfoam-programming-development/81491-how-can-i-modify-boundarypatch-value-runtime.html)

nt31921a October 28, 2010 09:16

how can i modify boundaryPatch value at runtime
 
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.

kathrin_kissling October 28, 2010 09:45

Hi,

can you try == instead of =?

Best Kathrin

nt31921a October 28, 2010 21:10

thanks a lot ! Kathrin

it work.

thanks for your help!


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