CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Different patch type specifications for velocity and temperature (https://www.cfd-online.com/Forums/openfoam-solving/60202-different-patch-type-specifications-velocity-temperature.html)

ankgupta8um May 22, 2006 14:20

Hi, Is there a way to speci
 
Hi,

Is there a way to specify a cyclic boundary condition to a pair of external surfaces for hydrodynamic quantities (i.e., velocity and pressure) and fixedValue/zeroGradient BC to the same pair of external surfaces for temperature ??
Any help would be highly appreciated.

Thanks!
Regards,
Ankur

ankgupta8um May 22, 2006 14:30

Hi, I am basically solving
 
Hi,

I am basically solving a channel flow and am using channelOodles solver. I would like to impose a cyclic boundary condition for velocity and pressure at channel inlet and outlet boundaries, and fixedvalue at inlet and zeroGradient at outlet for temperature.
Please help me as to how can I go about setting up my case.

Thanks!
Regards,
Ankur

mattijs May 23, 2006 04:09

Never tried this but can you h
 
Never tried this but can you have your polyPatch type cyclic and some b.c.s cyclic and some fixedValue or zerogradient?

Or do the fixedValue/zeroGrad b.c.s then complain about not being on a plain patch but on a cyclic patch?

eugene May 23, 2006 05:17

This is not easy to do. Cyclic
 
This is not easy to do. Cyclics are a base type and all corresponding patch fields need to be derived from that type. Thus you cannot use cyclics types in combination with patch types.

Here are some possible workarounds though:

1) Use normal inlet and outlet patches, i.e. fixedValue velocity and zeroGradient pressure at the inlet and zeroGradient velocity and fixedValue pressure at the outlet. Then have a look at the patch mapping routines in lesInterFoam from OF1.2 or earlier. You can use these mapping functions to map the outlet velocity to the inlet and the inlet pressure to the outlet. Of course accuracy will suffer somewhat and it will have problems in parallel unless you are careful.

2)Derive a new boundary condition from cyclic and override the evaluate function from coupledFvPatch using the zeroGradient condition instead of using the built-in cyclic evaluation. This might be quite tricky though as cyclics have quite a few unusual functions that you might have to override. Also, when running in parallel cyclics can become processor boundaries. This will probably play havoc with

3) (And this is a long shot) Find out why and where the code prevents the combination of cyclics and patch types and modify it to suite your needs.

ankgupta8um May 23, 2006 10:51

Thanks Eugene and Mattijs.
 
Thanks Eugene and Mattijs.
I already tried using cyclic base type in combination with patch types, and as Euegene pointed out, it didn't work.
I am focusing on the workarounds suggested by Eugene.


Thanks!
Regards,
Ankur

nimasam December 31, 2010 10:57

hi friend
now i encounter the same problem, could you over come ur problem?
i have cyclic patch for U and P , and i like to have a boundary like
dT/dx inlet = dT/dx outlet for temperature


All times are GMT -4. The time now is 02:54.