/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object setExprFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // expressions ( T { field T; dimensions [0 0 0 1 0 0 0]; constants { centre (0.21 0 0.01); } variables ( "radius = 0.1" ); condition #{ // Within the radius (mag(pos() - $[(vector)constants.centre]) < radius) // but only +ve y! && pos((pos() - $[(vector)constants.centre]).y()) > 0 #}; expression #{ 300 + 200 * (1 - mag(pos() - $[(vector)constants.centre]) / radius) #}; } ); // ************************************************************************* //