CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   SetFields for wedge (https://www.cfd-online.com/Forums/openfoam-pre-processing/157437-setfields-wedge.html)

Londo July 29, 2015 09:31

SetFields for wedge
 
Hi,

I used to have a 2-D mesh. In setFieldsDicto I have an ignition patch of the following form:

Code:

    cylinderToCell
    {
        p1      (0.0 0.0 -1); // start point on cylinder axis
        p2      (0.0 0.0  1);  // end point on cylinder axis
        radius  0.02451;
        fieldValues
        (....);
    }

Everything worked fine.

I converted it to wedge, and now I am not getting the values I specified. It seems that I don't specify the geometry correctly, but I don't understand what is wrong here.

Any help would be appreciated.

rudolf.hellmuth August 4, 2015 10:16

I guess it's a bug!
 
I think I am having the same issue. I guess it is a bug! (I am using v.2.3.0)

I am having those not planar warnings for wedge BC.

Code:

--> FOAM Warning :
    From function wedgePolyPatch::calcGeometry(PstreamBuffers&)
    in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 72
    Wedge patch 'wedge1' is not planar.
At local face at (0.0959055 -0.0010675 4.66083e-05) the normal (-1.69864e-08 0.0436195 0.999048) differs from the average normal (-3.57441e-10 0.0436193 0.999048) by 2.19752e-14
Either correct the patch or split it into planar parts

setFields is able to change the whole field, but not to set the cells inside a box with a different value.

Rudolf

Londo August 11, 2015 11:05

Problem solved
 
It wasn't setFields problem - at some point my mesh dimensions screwed up, and instead of mm it was ran in m; so, I didn't see the patch. Once I fixed the dimensions, everything worked.

rudolf.hellmuth August 11, 2015 15:24

I don't know exactly what happened, but for me the setFields didn't work for my axisymmetric mesh (with wedges BCs) when I used cylinderToCell.
I've generated my meshed on gmsh. So, setFields has worked for me when I use zoneToCell from volume regions defined in gmsh. Alternatively, I have had success defining fields with funkySetFields.


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