CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   jumpCyclic (https://www.cfd-online.com/Forums/openfoam/90650-jumpcyclic.html)

doubtsincfd July 17, 2011 12:06

jumpCyclic
 
Is there any tutorial for jumpCyclic boundary condition?

nimasam July 18, 2011 02:18

please dont create the same topic several times! and usually before make a new thread you should search in forum at first, you will find many new thread about it!
you can search about "jumpCyclic" and "fan" boundary condition, you will find examples and threads about it

doubtsincfd July 18, 2011 02:46

I did read the previous posts. Fan BC is available for pressure. I want to implement jumpCyclic BC for variable "T" in laplacianFoam. No previous post is telling clearly about how to implement this BC. Which tutorial has this boundary condition implemented is also not mentioned. Last post on jumpCyclic (not fan BC) was 2 years back.

nimasam July 18, 2011 03:58

i guess
you can use the same approach for temperature ;)
fan BC supports scalar jump, you just need to define ur temperature jump which is difference between in (Tinlet - Toutlet) as value of f in fan BC

doubtsincfd July 18, 2011 14:02

I tried for T, but it is not working. It required value of phi. I even edited the fanFvPatchFields.C and removed the phi part (the jump is calculated as maximum of specified and 0.5U*U, U is calculated using phi). But I am still getting the error:

--> FOAM FATAL ERROR:

request for surfaceScalarField phi from objectRegistry region0 failed
available objects of type surfaceScalarField are

4
(
DT
differenceFactors_
weightingFactors
(DT*magSf)
)


From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/opencfd/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 139.

FOAM aborting

nimasam July 18, 2011 14:12

use a boundary like this
patchName
{
type fan;
patchType cyclic;
f List<scalar> 1 (2); // put ur value difference here
value uniform 0;
}

doubtsincfd July 18, 2011 17:28

Its working. I was using the boundary condition for fan as:

type fan;
patchType cyclic;
f List<scalar> 2 (10.0 -1.0);
value uniform 0;

But I have no idea what that -1.0 stands for. I am not good at OF programming. But the BC you have suggested works! Thank you so much!

doubtsincfd July 18, 2011 17:50

One last question.

Is it possible to implement non uniform pressure jump, say as a list of values for the cell centers or node points on the patch?

Thank you.

nimasam July 18, 2011 21:24

its a polynomial coefficient
f= 10 - 1*U + 0*U^2 + ...
as laplacianFoam doesnot have any U variable, you can not use other coefficient except the first one.

doubtsincfd July 18, 2011 22:10

What I want to implement is , lets say I have 100 nodes on my patch. I want to assign different jump values to each node. Right now, whatever value of jump I give, it remains constant for all the points on the patch. Something similar to timevaryingmappedfixedvalue

nimasam July 19, 2011 15:06

look into fanFvPatchFields.C line 50 :
jump_ = f_[0];

jump_ define the value of jump for each node

1) maybe you need to define "f" as field type or read jump_ value directly from ioDictionary , you should look deeper but its possible

Yeru June 3, 2014 11:48

Error mapping p
 
Dear all,
thanks for the thread so far. I had the same aim as doubtsincfd and also the same problem:

Here's what I changed according to your advice:
-defined all patches as master/slave pairs in blockMeshDict
Code:

    cyclic innerRect0
    (
        (0    1    2    3)    //0, front
        (17    20    19    18)    //12, back
    )

-set all patches to type cyclic in 0/U-file
Code:

    innerRect0
    {
        type            cyclic;
    }

-set all patches to type fan in 0/p-file
Code:

    innerRect0
    {
        type            fan;
        patchType      cyclic;
        f              List<scalar> 2(10 -1);
    }

-had to run foamUpgradeCyclics

I can even map the mesh in paraFoam without mapping the field for p.
As soon as I want to map it, here's what I get:

Code:

--> FOAM FATAL ERROR:

    request for surfaceScalarField phi from objectRegistry region0 failed
    available objects of type surfaceScalarField are
1(weights)

    From function objectRegistry::lookupObject<Type>(const word&) const
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 136.

FOAM aborting

Any idea how to solve this?
P.S. I'm running OF 2.2.0


All times are GMT -4. The time now is 10:05.