CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   How to use fixedValue for cyclic Patch (http://www.cfd-online.com/Forums/openfoam/104801-how-use-fixedvalue-cyclic-patch.html)

zxj160 July 16, 2012 10:47

How to use fixedValue for cyclic Patch
 
Dear Foamers,

Does anyone has the experience to create a new BC that can use fixedValue for cyclic patch? I find cyclic patches can not accept any other types of BCs. But I want to set fixedValue for the cyclic inlet.

Many thanks,
Jian

ngj July 16, 2012 11:14

Hi Jian

You have to elaborate a lot more on what you are trying to accomplish, since enforcing a value on the cyclic patch sounds weird to me, however, it should be possible to wrap something up.

Kind regards,

Niels

zxj160 July 16, 2012 11:30

Quote:

Originally Posted by ngj (Post 371668)
Hi Jian

You have to elaborate a lot more on what you are trying to accomplish, since enforcing a value on the cyclic patch sounds weird to me, however, it should be possible to wrap something up.

Kind regards,

Niels

Dear Niels,

Thanks. I want to set fixedValue and zeroGradient for cyclic inlet and outlet for a passive scalar. Since I define inlet and outlet as cyclic patches in polyMesh, I can not set other types of BC for cyclic inlet/outlet. I am thinking about how to create a new BC which can set other types of BC (e.g. fixedValue and zeroGradient) for cyclic patches.

My best regards,
Jian

ngj July 16, 2012 13:06

Hi Jian,

I have given it a thought, and without actual knowing what is inside the code, the jumpCyclic condition could potentially work for you.

Nevertheless, you should be really careful about this, because you are going to consider very carefully how the matrix coefficients should look like in your case, since the cyclicity is suddenly an unwanted feature for some of your solution variables, which you be reflected in both the left hand side and right hand side of your matrix system.

Otherwise, you could generate two identical meshes, continuously map the face fluxes from momentum mesh -> passive scalar mesh and have separate boundary types for the second mesh. It is an extremely crude solution and it will consume a lot more memory, however, if that is not a concern of yours, then you should be alright.

Kind regards,

Niels

zxj160 July 17, 2012 09:38

Quote:

Originally Posted by ngj (Post 371694)
Hi Jian,

I have given it a thought, and without actual knowing what is inside the code, the jumpCyclic condition could potentially work for you.

Nevertheless, you should be really careful about this, because you are going to consider very carefully how the matrix coefficients should look like in your case, since the cyclicity is suddenly an unwanted feature for some of your solution variables, which you be reflected in both the left hand side and right hand side of your matrix system.

Otherwise, you could generate two identical meshes, continuously map the face fluxes from momentum mesh -> passive scalar mesh and have separate boundary types for the second mesh. It is an extremely crude solution and it will consume a lot more memory, however, if that is not a concern of yours, then you should be alright.

Kind regards,

Niels

Dear Niels,

Many thanks for your suggestion. I am still trying to create a new fixedValue suitable for cyclic patches but without success. Is there any tutorial about jumpcyclic BC (or the tutorials using jumpcyclic BC)?

Additionally, I am thinking about how to select the first layer near the cyclic patches and assign value to them artificially. Let the cyclic BC goes, but later change the values near the boundary. Do you have this kind of experience? Or could you give any idea for it?

My best regards,
Jian

ngj July 17, 2012 09:47

Hi Jian,

Depending on what you are trying to accomplish, then you could also do a directMapped boundary on the inlet for the hydrodynamics (skipping the state of being in cyclic), because that will within a few time steps give a fully developed inlet flow field.

Kind regards,

Niels

zxj160 July 17, 2012 10:08

Quote:

Originally Posted by ngj (Post 371904)
Hi Jian,

Depending on what you are trying to accomplish, then you could also do a directMapped boundary on the inlet for the hydrodynamics (skipping the state of being in cyclic), because that will within a few time steps give a fully developed inlet flow field.

Kind regards,

Niels

Dear Niels,

Thanks. I have tried the directMapped BC. But in my case, the pressure drop is through the domain to drive the flow. I use zeroGradient on the outlet and mapped outlet to inlet for pressure. I find the results of pressure increasing so rapidly with running time (from the order of 0.001 to 100). And it is different with the results for cyclic case without passive scalar.

What's the differences between the cyclic and directMapped BC? If a variable is cyclic, when I use directMapped BC, then what kinds of BC should I use for the outlet in order to be similar to cyclic (especially for pressure)?

Best regards,
Jian

ngj July 17, 2012 13:48

Well, I have typically used directMapped for velocity at the inlet with a zeroGradient on the pressure on the inlet, so I am not quite sure if I can give you any useful advice.

So, I will return to the original advice and look into what is happening in constrained/jumpCyclic and the constructable class derived/fan. This could shed some light onto what is needed.

Kind regards,

Niels


All times are GMT -4. The time now is 19:41.