CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

periodic set up - cyclicAMI

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2020, 06:29
Default periodic set up - cyclicAMI
  #1
New Member
 
Javier Vinuales
Join Date: May 2016
Posts: 13
Rep Power: 5
jvinuales is on a distinguished road
Hi everyone,

I am OpenFOAM newbie, so bear with me!

I am a bit confused about cyclicAMI and how to set it up... I have not been able to find some tutorials that replicate what I am trying to do.

So, I am studying 3D periodic porous structures. Previously, I had access to commercial software (STAR CCM+) and I will have a set up with a single unit cell with periodic conditions in all 3 directions (in the flow direction, a special type of periodic BC which is called "fully developed flow" that allows specifying certain mass flow rate through the boundary). This set up keeps the domain (and thus cell count) very low, which is important as I have to characterize many different geometries (100-1000) every time.

The objective is to replicate this set up in OpenFOAM (if possible). I was thinking cyclicAMI may be the best option, as creating periodic meshes can be challenging for complex geometries (as my case). I will be using simpleFOAM at the moment (with a modified version to account for heat transfer later on)

- Is it cyclicAMI the right choice?
- For the special case of the periodicity in the flow direction, can cyclicAMI be used? how can I specify certain flow through the boundary?
- Once I created the mesh, I just have to modify the following files:
- constant/polyMesh/boundary
- 0/U , 0/p , 0/T ...
Is this workflow correct? what will be correct set up in each file?

Thanks!

Javier
jvinuales is offline   Reply With Quote

Old   February 14, 2020, 00:39
Default
  #2
Member
 
Yogesh Bapat
Join Date: Oct 2010
Posts: 73
Rep Power: 11
ybapat is on a distinguished road
You can use cyclicAMI. But I think translation periodic will need additional implementation. It can be either pressure gradient specification or mass flow rate specification. You can use it for rotational periodic directly.
ybapat is offline   Reply With Quote

Old   February 14, 2020, 05:03
Default
  #3
New Member
 
Join Date: Mar 2017
Posts: 23
Rep Power: 4
.bastian is on a distinguished road
Quote:
Originally Posted by jvinuales View Post
[...]
- Is it cyclicAMI the right choice?
- For the special case of the periodicity in the flow direction, can cyclicAMI be used? how can I specify certain flow through the boundary?
[...]
Hello Javier.

Lets begin with some of your questions.
Generally there are two main options to set periodicity.
If you are able to generate a conformal mesh, cyclic would be the choice: User Guide: Cyclic
In case of non conformal meshes you may choose CyclicAMI oder GGI (foam-extend): User Guide: cyclicAMI
Conformal mesh means, that the nodes of the faces you want to connect are matching together perfectly.

As far i know, you can't specify a flow through an cyclic/cyclicAMI interface. Its only a connection of both sides.

It would be nice if you can give us a few more informations like:
- which OpenFOAM version do you want to use?
- how do you generate the mesh?

Greetings
bastian

Last edited by .bastian; February 14, 2020 at 07:53.
.bastian is offline   Reply With Quote

Old   February 14, 2020, 07:37
Default
  #4
New Member
 
Javier Vinuales
Join Date: May 2016
Posts: 13
Rep Power: 5
jvinuales is on a distinguished road
Thank you for your answers.

I thought I would go about this step by step:
- first, will try to set up cyclicAMI in the 2 directions perpendicular to the flow.
- second, I will try to implement periodicity in the flow direction.

The first case should be more straight-forward. I managed to set it up in 1 direction, and it ran without problems. However, the results seemed odd as not as much flow as expected was getting through the cyclicAMI boundary. Furthermore, if I added the second pair it will not run (file attached).

Regarding the second case, I saw that some flow rate can be forced through the boundary with fvOptions (momentumsource:meanVelocityForce), and hopefully works well with cyclicAMI. For the pressure, I saw jumpCyclicAMI, that could work for representing a jump in pressure from inlet to outlet. However, I am not sure about other fields such temperature and turbulence variables.

Javier

Last edited by jvinuales; February 19, 2020 at 11:24.
jvinuales is offline   Reply With Quote

Old   February 14, 2020, 07:46
Default
  #5
New Member
 
Javier Vinuales
Join Date: May 2016
Posts: 13
Rep Power: 5
jvinuales is on a distinguished road
Quote:
Originally Posted by .bastian View Post
Hello Javier.


It would be nice if you can give us a few more informations like:
- which OpenFOAM version do you want to use?
- how do you generate the mesh?
I am running openFOAM in a windows machine. I am currently working with 2 versions (have not decided yet what works better for me): BlueCFD with OpenFOAM 5.x and v1912 with an Ubuntu Bash.

In terms of meshing, currently using cf-mesh+ (with a trial)... also still trying to figure out what works better for me.
jvinuales is offline   Reply With Quote

Old   February 19, 2020, 08:02
Default
  #6
New Member
 
Javier Vinuales
Join Date: May 2016
Posts: 13
Rep Power: 5
jvinuales is on a distinguished road
I made some progress with this case.

I have the periodicity in all three directions, and the case run without problems.

I used cyclicAMI in all the directions, and add the following to fvOptions:

Code:
momentumSource
{
    type            meanVelocityForce;

    selectionMode   all;

    fields          (U);
    Ubar            (-0.6 0 0);
}

pRefCell	0;
pRefValue	0;
The problem is that the results are not very physical or realistic, as there is no pressure drop along the flow (obviously, as the pressure is mapped from one face to another).

Is there any boundary condition I can apply for the pressure that results in a physically realistic condition? Like an undefined constant offset?? or any other set up recommendations?

case:
https://drive.google.com/file/d/1R85...ew?usp=sharing

gyroid_p.JPG
gyroid_U.JPG
gyroid_U_zx.JPG
jvinuales is offline   Reply With Quote

Old   February 20, 2020, 05:44
Default
  #7
New Member
 
Javier Vinuales
Join Date: May 2016
Posts: 13
Rep Power: 5
jvinuales is on a distinguished road
I found the fixedJumpAMI boundary condition that could be applied in the flow direction:

0/p
Code:
    x1
	{
		type            fixedJumpAMI;
		patchType       cyclicAMI;
		jump            uniform 1;
		value           $internalField;
	}
    x2
    {
		type            fixedJumpAMI;
		patchType       cyclicAMI;
		value           $internalField;
    }
0/U
Code:
    x1
    {

        type		cyclicAMI;

    }
    x2
    {

        type		cyclicAMI;

    }
This, in theory, achieves the expected behaviour:

Gyroid_p.JPG
Gyroid_U.JPG

I will start trying to set up turbulence and temperature. Regarding turbulence, can I assume that the turbulence parameters are periodic (as U)? hence I can use cyclic?
jvinuales is offline   Reply With Quote

Old   February 23, 2020, 21:48
Default
  #8
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 120
Rep Power: 7
pete20r2 is on a distinguished road
I've done a few simulations almost exactly like this meanvelocityForce is a closed loop control method that applies a pressure gradient to the flow to sustain the desired flow rate. If you watch the logs there should be a printout of the current pressure drop the solver is using.

I've found this to be the most reliable and convergent method. Especially if you want to study the flow at particular flow rates rather than applying pressure drops and hoping to find a flow rate.

I used cyclic turbulence parameters and U in my study and p ends up being cyclic with a jump. T can be difficult because if it is cyclic it will blow up. Additionally, if the flow is compressible then the physical properties are dependant on T so a cyclic study is non-physical.

The other way I have achieved good results is using mappedPatch.
Inlet is set to mappedPatch type and condition is mapped.
Turbulence is mapped from outlet to inlet, outlets are zeroGradient.
U is mapped the same but with setAverage true; as is T.
p is the only field that does not get mapped. outlet uses the fixedMean condition and inlet uses zeroGradient.
Start the flow overdamped and then lower the damping after it's starred and you should see convergence.
You may also need to extend your domain to be 2,3, or 4 repetitions of the geometry.
pete20r2 is offline   Reply With Quote

Old   Yesterday, 06:48
Default
  #9
New Member
 
Javier Vinuales
Join Date: May 2016
Posts: 13
Rep Power: 5
jvinuales is on a distinguished road
Thanks for your answer! It really helps.

Quote:
Originally Posted by pete20r2 View Post
I've found this to be the most reliable and convergent method. Especially if you want to study the flow at particular flow rates rather than applying pressure drops and hoping to find a flow rate.
Yes, I found convergence is much better with meanVelocityForce than using a jump in pressure. As you point out, I also need to control the flow rate through the domain rather than the pressure jump, so it seems more logical as well. However, I do not understand what boundary condition should apply in p as the cyclicAMi will result in no gradient in pressure, meaning that the results are unphysical... am I missing something?

Quote:
Originally Posted by pete20r2 View Post
I used cyclic turbulence parameters and U in my study and p ends up being cyclic with a jump.
do you use cyclicAMI in 0/p? If I do so I get no gradient/jump

Quote:
Originally Posted by pete20r2 View Post
T can be difficult because if it is cyclic it will blow up. Additionally, if the flow is compressible then the physical properties are dependant on T so a cyclic study is non-physical.
I am using incompressible fluid, so I am not concern about compressibility. Also, I can live with non-temperature-dependant properties for this study. I wonder if a fixedJump in T, together with a fixed gradient in the wall would result in a const heat flux conditions... I need to investigate more.

Quote:
Originally Posted by pete20r2 View Post
The other way I have achieved good results is using mappedPatch.
I will give a try to this... do you still use meanVelocityForce to keep the flow going? or just the initial conditions?

Quote:
Originally Posted by pete20r2 View Post
Start the flow overdamped and then lower the damping after it's starred and you should see convergence.
I am not sure I fully understand what you mean with this statement?
jvinuales is offline   Reply With Quote

Reply

Tags
cyclic, cyclic ami, cyclicami, periodic bc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANSYS Meshing] Solution to periodic boundary problem SophieLee ANSYS Meshing & Geometry 1 June 28, 2017 02:51
cyclicAMI and interDyMFoam for periodic box kwardle OpenFOAM 1 March 11, 2014 14:40
correction of Grub after installing Windows XP and 8 immortality Lounge 20 January 5, 2014 18:41
How to set periodic boundaries with initial conditions? jiandai OpenFOAM 6 October 24, 2013 08:00
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 10:53


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