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

Cyclic 'U' and Non-cyclic 'Scalar' on cyclic boundary

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

Like Tree2Likes
  • 1 Post By piu58
  • 1 Post By piu58

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2021, 06:28
Question Cyclic 'U' and Non-cyclic 'Scalar' on cyclic boundary
  #1
New Member
 
Shengjie Lu
Join Date: Sep 2020
Location: Nanjing,China
Posts: 12
Rep Power: 4
hhu_lulu is on a distinguished road
Dear FOAMers:
I am using OpenFOAM 7.0 to simulate the scalar transport in curved open channel, with interFoam and smagorinsky LES model.
In order to get the fully developed flow field, I impose cyclic BC for U and p_rgh at INLET and OUTLET. For the variable scalar, I impose Dirichlet BC at INLET and Neumann BC at OUTLET. It turns out not working. OpenFOAM requires the same cyclic BC for scalar. BTW, the scalar is released in the form of point source near the INLET.
How could I realize the above request? Any ideas are appreciated.
Thanks in advance!

Here I post my boundary file, U file and scalar file:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    INLET
    {
        type            cyclic;
        inGroups        1(cyclic);
        nFaces          3600;
        startFace       10239600;
        matchTolerance  0.0001;
        transform       unknown;
        neighbourPatch  OUTLET;
    }
    OUTLET
    {
        type            cyclic;
        inGroups        1(cyclic);
        nFaces          3600;
        startFace       10243200;
        matchTolerance  0.0001;
        transform       unknown;
        neighbourPatch  INLET;
    }
    WALLS
    {
        type            wall;
        inGroups        1(wall);
        nFaces          163200;
        startFace       10246800;
    }
    ATMOSPHERE
    {
        type            patch;
        nFaces          86400;
        startFace       10410000;
    }
)
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    INLET
    {
        type            cyclic;
    }

    OUTLET
    {
        type            cyclic;
    }
	
    WALLS
    {
        type            noSlip;
    }

    ATMOSPHERE
    {
        type            pressureInletOutletVelocity;
	value           uniform (0 0 0);
    }
}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      scalar1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    INLET
    {
        type            fixedValue;
	value           uniform 0;
    }

    OUTLET
    {
        type            zeroGradient;
    }

    WALLS
    {
        type            zeroGradient;
    }

    ATMOSPHERE
    {
        type            inletOutlet;
	inletValue      uniform 0;
	value           uniform 0;
    }
}
hhu_lulu is offline   Reply With Quote

Old   July 29, 2021, 07:14
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 727
Rep Power: 13
piu58 is on a distinguished road
May be you can use the following appoach:

Calculate the flux (U and p) with your periodic b.c. but without the scaler. Uses scalaTransportFoam afterwards. You cannot get a transient result for the scalar, however.
hhu_lulu likes this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 29, 2021, 09:17
Default
  #3
New Member
 
Shengjie Lu
Join Date: Sep 2020
Location: Nanjing,China
Posts: 12
Rep Power: 4
hhu_lulu is on a distinguished road
Hi, Pilz, thanks for your reply!
Your idea sounds reasonable, I gonna adopt the advice and apply it in my simulation.
However, I am still wondering there are any simpler ways for cyclic cases.
hhu_lulu is offline   Reply With Quote

Old   July 29, 2021, 13:07
Default
  #4
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 727
Rep Power: 13
piu58 is on a distinguished road
It is always valuable de-coupling effects in a simulation. This way, scalarTransportFoam is easier not more complicated. And the results are more reliable in comparison ton al-in-all simulation.

Cyclic b.c. often arise problems and lead to nonphysical results. It may be you have to look for another approach anyway.
hhu_lulu likes this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)

Last edited by piu58; July 30, 2021 at 01:00.
piu58 is offline   Reply With Quote

Old   July 6, 2022, 00:06
Default Cyclic 'U' and Non-cyclic 'Scalar' on cyclic boundary
  #5
Senior Member
 
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 109
Rep Power: 14
kerim is on a distinguished road
Dear hhu lulu,
Were you able to solve your problem? I faced the same problem when I tried to simulate 2D periodic hills with passive scalar transport. Using scalarTransportFoam solver, as mentioned by piuy58, seems more perspective.
kerim is offline   Reply With Quote

Old   July 29, 2022, 13:23
Default
  #6
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Fuenlabrada
Posts: 307
Rep Power: 13
agustinvo is on a distinguished road
Have you tried to add a heat sink using fvOptions/fvModels? In the paste several channel flows with similar scalar conditions were performed.
agustinvo is offline   Reply With Quote

Old   July 31, 2022, 01:51
Default
  #7
Senior Member
 
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 109
Rep Power: 14
kerim is on a distinguished road
Quote:
Originally Posted by agustinvo View Post
Have you tried to add a heat sink using fvOptions/fvModels? In the paste several channel flows with similar scalar conditions were performed.
Would you like to give a link to above mentioned channel flows?
kerim is offline   Reply With Quote

Old   August 3, 2022, 01:23
Default
  #8
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Fuenlabrada
Posts: 307
Rep Power: 13
agustinvo is on a distinguished road
Quote:
Originally Posted by kerim View Post
Would you like to give a link to above mentioned channel flows?



I have been searching but I only found constant wall heat flux, I thought I saw something for fixed scalar value.


I have some ideas to deal with this problem

  • Compute the wall scalar flux so you get the amount of energy that comes in. Once you have it you can add a sink term in your scalar equation to decrease the scalar value in your domain. However the scalar profile is returned to the inlet.
  • There are some BC's called jumpCyclic and fixedJump that migth be interesting for you, however they apply an ofset isntead of reducing to a certain value your returned field. You can investigate these conditions and create a modified one for your purposes.
  • Going in the same direction, using mapped BC's for U you can move from cyclic to patch boundaries and you could use your actual BC's for the scalar.
I saw that your scalar BC's only have 0 values and zeroGradients. Unless you add a source of a BC with larger values you will see no changes.


Regards
agustinvo is offline   Reply With Quote

Old   August 15, 2022, 12:40
Default
  #9
New Member
 
Shengjie Lu
Join Date: Sep 2020
Location: Nanjing,China
Posts: 12
Rep Power: 4
hhu_lulu is on a distinguished road
Quote:
Originally Posted by kerim View Post
Dear hhu lulu,
Were you able to solve your problem? I faced the same problem when I tried to simulate 2D periodic hills with passive scalar transport. Using scalarTransportFoam solver, as mentioned by piuy58, seems more perspective.
Hi, Kerim:
Sorry for my slow reply.
I find a workaround with my issue. The periodic B.C. has still been used for the scalar in my case. To prevent the scalar from recycling, the scalarFixedValueConstraint has been used to set the value of scalar to 0 at the end of the computational domain. That is, the scalar is released from the source and it vanishes near the outlet, which would not influence the scalar transport in a single period.
I don't know whether this method matches your problem. Maybe you can elaborate on your cases. Thanks!
hhu_lulu is offline   Reply With Quote

Reply

Tags
cyclic bc, interfoam, non-cyclic bc, openfoam, scalar transport

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



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