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

chtMultiRegionFoam with multiple liquid regions

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

Like Tree1Likes
  • 1 Post By tonnykz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2019, 13:54
Default chtMultiRegionFoam with multiple liquid regions
  #1
Member
 
Join Date: Oct 2016
Posts: 31
Rep Power: 8
tonnykz is on a distinguished road
Hello everyone,

I am using OF6 for my research project, aims of which to model gas-water interaction involving heat transfer, chemical kinetics, mass transport. But currently stuck with multiple problems:

1. Gas doesn't drag water. Tried various BC between regions.
2. Chemical species can't diffuse into neighbor region.
3. Can't have inter-region chemical reactions.
4. Pressure and velocity diverging. What bothers me most.

Simulation domain is gas flowing from left side (inlet) to right above water (not moving in the beginning) which is on solid. Dimensions of whole domain are 60mm x 30 mm x 0.1 mm. Schematics and case files are included.

Any help/hints/advises will be appreciated, thanks in advance!

initial fields for gas region:

T:
dimensions [ 0 0 0 1 0 0 0 ];

internalField uniform 300;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet_gas
{
type fixedValue;
value uniform 315;
}
outlet_gas
{
type zeroGradient;
value $internalField;

}
atmosphere_gas
{
type zeroGradient;
value $internalField;

}
gas_to_liquid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;

}
}


p_rgh

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

internalField uniform 1e5;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet_gas
{
type fixedFluxPressure;
value $internalField;

}
outlet_gas
{
type fixedValue;
value $internalField;
}
atmosphere_gas
{
type fixedFluxPressure;
value $internalField;
}
gas_to_liquid
{
type fixedFluxPressure;
value $internalField;
}
}


U:
dimensions [ 0 1 -1 0 0 0 0 ];

internalField uniform (0 0 0);

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet_gas
{
type fixedValue;
value uniform (0.1 0 0);
}
outlet_gas
{
type zeroGradient;
}

atmosphere_gas
{
type zeroGradient;
}
gas_to_liquid
{
type zeroGradient;
}
}

initial fields for liquid region:


T:

dimensions [ 0 0 0 1 0 0 0 ];

internalField uniform 300;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"


inlet_liquid
{
type fixedValue;
value uniform 315;
}
outlet_liquid
{
type zeroGradient;
value $internalField;
}
liquid_to_solid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
}

liquid_to_gas
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;

}
}


p_rgh:

dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 0;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet_liquid
{
type fixedFluxPressure;
value $internalField;
}

outlet_liquid
{
type fixedValue;
value $internalField;
}

liquid_to_gas
{
type fixedFluxPressure;
value $internalField;
}

liquid_to_solid
{
type fixedFluxPressure;
value $internalField;
}
}


U:
dimensions [ 0 1 -1 0 0 0 0 ];

internalField uniform (0 0 0);

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet_liquid
{
type zeroGradient;
}
outlet_liquid
{
type zeroGradient;
}
liquid_to_solid
{
type noSlip;
}

liquid_to_gas
{
type zeroGradient;
}
}


Initial fields for solid region:


T:
dimensions [ 0 0 0 1 0 0 0 ];

internalField uniform 300;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet_solid
{
type zeroGradient;
value $internalField;
}
bottom_solid
{
type zeroGradient;
value $internalField;
}
outlet_solid
{
type zeroGradient;
value $internalField;
}
solid_to_liquid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod solidThermo;
}
}


p:

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

internalField uniform 1e5;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

".*"
{
type calculated;
value $internalField;
}
}

Attached Images
File Type: png schematics.png (31.5 KB, 99 views)
Attached Files
File Type: zip 3domain2DcaseZeroGradNoLiquidInletChemistryTwoRegions.zip (49.6 KB, 16 views)
ramakant likes this.
tonnykz is offline   Reply With Quote

Old   March 6, 2019, 13:44
Default
  #2
Senior Member
 
Join Date: Oct 2017
Posts: 103
Rep Power: 7
Krapf is on a distinguished road
Hi tonnykz,

I don't know if you've already read it but according to zarox it is not possible to simulate a multiphase flow with chtMultioRegionFoam: chtMultiRegionFoam

Kind regards,
Krapf
Krapf is offline   Reply With Quote

Old   March 6, 2019, 13:58
Default
  #3
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 9
Robin.Kamenicky is on a distinguished road
Hi tonnykz,,

as Krapf wrote. The solver is not intended to solve multiphase flows.
It splits mesh for regions and in each region it is capable to solve different equations. The interface is then modelled through BCs not through interfacial terms in equations.

You might want to have a look on reactingEulerFoams, depends what you need.

Kind regards,
Robin
Robin.Kamenicky is offline   Reply With Quote

Old   March 6, 2019, 14:16
Default
  #4
Member
 
Join Date: Oct 2016
Posts: 31
Rep Power: 8
tonnykz is on a distinguished road
Hello Krapf,

Thank You for reply,


I decided to use since I am not interested in interface change and apart from that I saw thread by Hanzo chtMultiRegionFoam BC for fluid-fluid zones where he implemented new BC like temperatureCoupledBaffleMixed for species. So, I decided to try this solver as it also includes heat transfer. But unfortunately, Hanzo has not responded ever since and hasn't post update on how he did it, therefore no more information about it could be found.



Thank You,
Best regards,
Tonny
tonnykz is offline   Reply With Quote

Old   March 6, 2019, 14:23
Default
  #5
Member
 
Join Date: Oct 2016
Posts: 31
Rep Power: 8
tonnykz is on a distinguished road
Hi Robin,
Thank You for reply,
I have chosen this solver since I am not interested in interface change, and make this simulation using VoF method costs much more time.
Quote:
It splits mesh for regions and in each region it is capable to solve different equations. The interface is then modelled through BCs not through interfacial terms in equations.
Currently I am working on writing new BCs for U, Yk to couple gas and liquid regions, but don't know whether it is a good idea. Haven't tried that before.
Quote:
You might want to have a look on reactingEulerFoams, depends what you need
Is it applicable to my problem formulation? And does it have chemical species diffusion in between regions and inter-region reactions?
Thank You,
Best regards,
Tonny
tonnykz is offline   Reply With Quote

Old   March 7, 2019, 14:50
Default
  #6
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 9
Robin.Kamenicky is on a distinguished road
Hi tonnykz,

following is the official desctription of reactingTwoPhaseEulerFoam:
Quote:
Solver for a system of 2 compressible fluid phases with a common pressure, but otherwise separate properties. The type of phase model is run time selectable and can optionally represent multiple species and in-phase reactions. The phase system is also run time selectable and can optionally represent different types of momentun, heat and mass transfer.
.

I think it could be sufficient for the following aim:
Quote:
aims of which to model gas-water interaction involving heat transfer, chemical kinetics, mass transport.
Kind regards,
Robin
Robin.Kamenicky is offline   Reply With Quote

Old   March 8, 2019, 09:39
Default
  #7
Member
 
Join Date: Oct 2016
Posts: 31
Rep Power: 8
tonnykz is on a distinguished road
Hello Robin,
Thank You for clarification, I will try it and let know about progress.
Best regards,
Tonny
tonnykz is offline   Reply With Quote

Old   March 11, 2019, 11:13
Default reactingTwoPhaseEulerFoam
  #8
Member
 
Join Date: Oct 2016
Posts: 31
Rep Power: 8
tonnykz is on a distinguished road
Hello to everyone,
As I said, I've tried applying reactingTwoPhaseEulerFoam to my case.

Modifications that I've made:
1) change geometry: excluded solid domain. Now liquid domain's height 10 mm and gas's 20 mm, while length remains same - 60 mm.
2) at this point I don't have chemical reactions.
But simulation diverging at third time step t = 0.03 s.


PIMPLE: Iteration 1
MULES: Solving for alpha.steam
MULES: Solving for alpha.steam
MULES: Solving for alpha.steam
alpha.steam volume fraction = 0.4959900296 Min(alpha1) = -57.57036107 Max(alpha1) = 78.20529841
Constructing face momentum equations
smoothSolver: Solving for h.steam, Initial residual = 0.02737435625, Final residual = 7.886884174e-07, No Iterations 20
smoothSolver: Solving for h.water, Initial residual = 0.008927510441, Final residual = 6.327847728e-07, No Iterations 11
Tf.steamAndWater: min = 360.0000043, mean = 360.0001302, max = 360.000178
smoothSolver: Solving for h.steam, Initial residual = 0.01814847285, Final residual = 6.196783916e-07, No Iterations 13
smoothSolver: Solving for h.water, Initial residual = 0.003639868939, Final residual = 4.713818604e-07, No Iterations 8
Tf.steamAndWater: min = 360.0000033, mean = 360.0001451, max = 360.0001926
DICPCG: Solving for p_rgh, Initial residual = 0.5926777255, Final residual = 9.915302058e-11, No Iterations 260
PIMPLE: Iteration 2
MULES: Solving for alpha.steam
MULES: Solving for alpha.steam
MULES: Solving for alpha.steam
alpha.steam volume fraction = 0.4861251009 Min(alpha1) = -141.5085592 Max(alpha1) = 99.13525313
Constructing face momentum equations
smoothSolver: Solving for h.steam, Initial residual = 0.02540020537, Final residual = 7.71330917e-06, No Iterations 20
smoothSolver: Solving for h.water, Initial residual = 0.007364477663, Final residual = 9.600822058e-07, No Iterations 8
Tf.steamAndWater: min = 359.9998773, mean = 360.0000458, max = 360.0001188
smoothSolver: Solving for h.steam, Initial residual = 0.01435858391, Final residual = 4.783433796e-05, No Iterations 20
smoothSolver: Solving for h.water, Initial residual = 0.002994983006, Final residual = 5.254473361e-07, No Iterations 9
Tf.steamAndWater: min = 359.9998613, mean = 360.0000377, max = 360.0001171
DICPCG: Solving for p_rgh, Initial residual = 0.8018057247, Final residual = 9.624347795e-11, No Iterations 265
PIMPLE: Iteration 3
MULES: Solving for alpha.steam
MULES: Solving for alpha.steam
MULES: Solving for alpha.steam
alpha.steam volume fraction = -0.3844310874 Min(alpha1) = -24599.5686 Max(alpha1) = 404.225113
Constructing face momentum equations
smoothSolver: Solving for h.steam, Initial residual = 0.6095341785, Final residual = 0.1219274346, No Iterations 20
smoothSolver: Solving for h.water, Initial residual = 0.3146140983, Final residual = 7.804889189e-07, No Iterations 13
Tf.steamAndWater: min = 359.998542, mean = 359.9997038, max = 360.0000552
smoothSolver: Solving for h.steam, Initial residual = 0.1930388577, Final residual = 0.029662743, No Iterations 20
smoothSolver: Solving for h.water, Initial residual = 0.3553816041, Final residual = 6.251953444e-05, No Iterations 20
[1]
[1]
[1] --> FOAM FATAL ERROR:
[1] Negative initial temperature T0: -95.97217169
[1]
[1] From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const) const [with Thermo = Foam::hRefConstThermo<Foam:erfectGas<Foam::speci e> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hRefConstThermo<Foam:: perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>]
[1] in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54.
[1]
FOAM parallel run aborting
[1]
[1] #0 Foam::error:rintStack(Foam::Ostream&)Tf.steamAnd Water: min = 359.9981167, mean = 359.9996088, max = 360.0000074
at ??:?
[1] #1 Foam::error::abort() at ??:?
[1] #2 Foam::heRhoThermo<Foam::rhoThermo, Foam:ureMixture<Foam::constTransport<Foam::speci es::thermo<Foam::hRefConstThermo<Foam:erfectGas< Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:?
[1] #3 Foam::heRhoThermo<Foam::rhoThermo, Foam:ureMixture<Foam::constTransport<Foam::speci es::thermo<Foam::hRefConstThermo<Foam:erfectGas< Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:?
[1] #4 Foam:haseSystem::correctThermo() at ??:?
[1] #5 Foam::TwoResistanceHeatTransferPhaseSystem<Foam::M omentumTransferPhaseSystem<Foam::twoPhaseSystem> >::correctThermo() at ??:?
[1] #6 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam"
[1] #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #8 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam"
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 1 in communicator MPI COMMUNICATOR 3 SPLIT FROM 0
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.


I have attached case files, and any hints & suggestions are appreciated. I do not know whether should I move this into separate thread.


Thank You, Will keep posted,
Best regards,
Tonnykz
Attached Files
File Type: zip 2domain2Dcase.zip (16.1 KB, 7 views)
tonnykz is offline   Reply With Quote

Old   March 11, 2019, 12:32
Default
  #9
Member
 
Join Date: Oct 2016
Posts: 31
Rep Power: 8
tonnykz is on a distinguished road
I have several assumption why it is not working that I have to check:
1) Since I have gas inlet on top of water my mesh consists of two blocks corresponding to water and gas regions. Top one - gas, bottom - liquid. Maybe that causes divergence.
2) I haven't correctly defined initial BCs, setFields and fvOptions for alpha field.
tonnykz is offline   Reply With Quote

Reply

Tags
chemical reactions, chemistry, chtmultiregionfoam, multi region

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
Error by creating interfaces for Multiple Regions Heat Transfer Sakuyalex STAR-CCM+ 3 March 22, 2018 05:16
Error creating multiple regions with chtmultiregionfoam Jagirhussan OpenFOAM Running, Solving & CFD 0 July 19, 2016 02:25
Error creating multiple regions with chtmultiregionfoam Jagirhussan OpenFOAM 0 July 9, 2016 19:25
Merge multiple regions to use simpleFoam arnaud6 OpenFOAM Pre-Processing 6 June 24, 2015 03:48
[snappyHexMesh] Using snappyHexMesh for multiple enclosed regions richard_vega OpenFOAM Meshing & Mesh Conversion 0 November 13, 2014 15:28


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