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

reactingFoam boundary conditions

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

Like Tree6Likes
  • 1 Post By pas32
  • 1 Post By kalle
  • 1 Post By kalle
  • 1 Post By kalle
  • 1 Post By pas32
  • 1 Post By kalle

Reply
 
LinkBack Thread Tools Display Modes
Old   March 10, 2010, 12:58
Default reactingFoam boundary conditions
  #1
New Member
 
Join Date: Feb 2010
Posts: 6
Rep Power: 7
pas32 is on a distinguished road
Hi,

I'm simulating the combustion of hydrogen with a burner in atmospheric air and I have problems with the boundary conditions.

I did a 2D representation of the environment at the burner exit with a symmetry plan in the middle of the burner. Which boundary condition sould i use where the boundary is air? outlet or inletoutlet? Where do I define the temperature and pressure of the environment?

I am new with OpenFOAM and i hope someone can help.

Thank you
fuguang likes this.
pas32 is offline   Reply With Quote

Old   March 10, 2010, 22:21
Default
  #2
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 252
Rep Power: 12
kalle is on a distinguished road
Hi,

For pressure I would use:

airBC
{
type totalPressure;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
p0 uniform 100000;
value uniform 100000;
}

For Velocity I would use:

airBC
{
type fluxCorrectedVelocity;
phi phi;
rho rho;
value uniform (0 0 0);
}

And for other scalars I would use zeroGradient

Good Luck!
fuguang likes this.
kalle is offline   Reply With Quote

Old   March 11, 2010, 12:24
Default
  #3
New Member
 
Join Date: Feb 2010
Posts: 6
Rep Power: 7
pas32 is on a distinguished road
Thanks.

But what about the temperature? How do I indicate that the ambiant temperature at the boundary is 295K?
pas32 is offline   Reply With Quote

Old   March 11, 2010, 19:40
Default
  #4
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 252
Rep Power: 12
kalle is on a distinguished road
Well, you can always force scalars (T, Yi) to be like surrounding values (air at 295K), but if you get a piece of hot product gases or so at the outflow boundary, you might get divergence due to strong gradients. If you put initial conditions correctly, it is likely that values will remain good at the boundary.

Will you use both an atmospheric BC and a separate outlet BC where you think that the products will leave? I would use the above mentioned BC's at the whole 'outlet' i.e. not use a separate outflow BC together with an atmospheric BC.
fuguang likes this.
kalle is offline   Reply With Quote

Old   March 12, 2010, 15:15
Default
  #5
New Member
 
Join Date: Feb 2010
Posts: 6
Rep Power: 7
pas32 is on a distinguished road
I applied the atmospheric boundary like you mentionned to all the "outlet" for p and U and I left the rest with zero gradient. Unfortunately, when I ran the problem without combustion (just hydrogen entering in air), it looked like if the domain was closed because it filled with hydrogen and after 2 sec of simulation, the whole grid was filled with 100% hydrogen.
pas32 is offline   Reply With Quote

Old   March 13, 2010, 00:07
Default
  #6
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 252
Rep Power: 12
kalle is on a distinguished road
Hmm.. can you post your case?
kalle is offline   Reply With Quote

Old   March 15, 2010, 13:28
Default
  #7
New Member
 
Join Date: Feb 2010
Posts: 6
Rep Power: 7
pas32 is on a distinguished road
Here is my case. Sorry for the delay, I didn't have my files with me over the week-end.

Thanks
Attached Files
File Type: zip 0.zip (4.0 KB, 150 views)
File Type: zip chemkin.zip (71.3 KB, 115 views)
File Type: zip constant.zip (93.1 KB, 143 views)
File Type: zip system.zip (1.8 KB, 87 views)
pas32 is offline   Reply With Quote

Old   March 16, 2010, 01:56
Default
  #8
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 252
Rep Power: 12
kalle is on a distinguished road
Thanks...

I see. You get really strong recirculation at the inlet, and this gradually fills your domain with H2. This recirculation is present in the whole domain, and if you want to simulate an open flame, you should probably do something about this... .typically move away boundaries. You can also try to set the AIR_BAS patch as an inlet and specify some small velocity that will counteract this recirculation.

Anyway, I believe the problem with filling of the domain can be avoided by using the inletOutlet BC instead of zeroGradient for scalars. That BC acts as zeroGradient when fluid is leaving the domain, but allows you to specify scalar values when fluid is entering the domain... Hence, in the attachment, I specified that air should be entering when you have inflow at your atmospeheric boundary.... Later, when you let it burn, you may want to do this for T also.

Good luck
Kalle

p.s. massfraction O2 in standard air would be around 0.23
Attached Files
File Type: gz 0.tar.gz (1.2 KB, 120 views)
fuguang likes this.
kalle is offline   Reply With Quote

Old   March 29, 2010, 11:13
Default
  #9
New Member
 
Join Date: Feb 2010
Posts: 6
Rep Power: 7
pas32 is on a distinguished road
Hi,

Thanks for the information. It now seems to work properly without the combustion.

I did some tests with combustion and i'm having some problems. Maybe you can help.

With an inlet speed of fuel at 20 m/s (laminar flow), the combustion seems to be working. I tried to reduce the speed to 0.5 m/s to reproduce simulations from an article and it wasn't working. I increased to 10 m/s and after 0.13 sec, it wrote the following:

Solving chemistry
#0 Foam::error:rintStack(Foam::Ostream&) in "/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 Foam::ODEChemistryModel<Foam:siChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:erfectGas> > > >::derivatives(double, Foam::Field<double> const&, Foam::Field<double>&) const in "/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libchemistryModel.so"
#4 Foam::SIBS::SIMPR(Foam::ODE const&, double, Foam::Field<double> const&, Foam::Field<double> const&, Foam::Field<double> const&, Foam::SquareMatrix<double> const&, double, int, Foam::Field<double>&) const in "/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libODE.so"
#5 Foam::SIBS::solve(Foam::ODE const&, double&, Foam::Field<double>&, Foam::Field<double>&, double, Foam::Field<double> const&, double, double&, double&) const in "/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libODE.so"
#6 Foam::ODESolver::solve(Foam::ODE const&, double, double, Foam::Field<double>&, double, double&) const in "/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libODE.so"
#7 Foam:de<Foam:siChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:erfectGas> > > >::solve(Foam::Field<double>&, double, double, double, double) const in "/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libchemistryModel.so"
#8 Foam::ODEChemistryModel<Foam:siChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:erfectGas> > > >::solve(double, double) in "/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libchemistryModel.so"
#9 main in "/home/pouimette/OpenFOAM/pouimette-1.6/applications/bin/linux64GccDPOpt/reactingFoam"
#10 __libc_start_main in "/lib64/libc.so.6"
#11 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/pouimette/OpenFOAM/pouimette-1.6/applications/bin/linux64GccDPOpt/reactingFoam"
Floating point exception

Do you know what it means?

Thanks
Pascale
fuguang likes this.
pas32 is offline   Reply With Quote

Old   March 29, 2010, 22:59
Default
  #10
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 252
Rep Power: 12
kalle is on a distinguished road
The output suggests that there occurred an illegal operation (sigfpe) - typically divide by zero. I would guess it is related to the chemistry solver in this case. You can try to play around with different solvers in the 'chemistryProperties' file. You can also try setting the equilibriumRateLimiter on. To find out what is happening you can also closely monitor the solution just before the crash.

Someone else have any suggestions?

Kalle
fuguang likes this.
kalle is offline   Reply With Quote

Old   October 2, 2011, 17:07
Default
  #11
Senior Member
 
Gonzalo
Join Date: Mar 2011
Location: Argentina
Posts: 107
Rep Power: 7
gfoam is on a distinguished road
Can you post again the chemkin zip file (it may be damaged)? I am having the same problem with reactinFoam...I'm trying to run a case of gas mixture only to figure out how the diffusion progress in time. If somebody can help me I'm willing to upload the directories ASAP...THANKS!
gfoam is offline   Reply With Quote

Old   July 27, 2012, 04:58
Default
  #12
New Member
 
Pang
Join Date: Mar 2011
Location: Denmark
Posts: 25
Rep Power: 6
kmpang is on a distinguished road
Hi Foamers,

I don't really understand the implementation of 'fluxCorrectedVelocity' B/C. May I ask how does it work? Also, how is it different from 'zeroGradient' B/C?

Best regards,
Pang.
kmpang is offline   Reply With Quote

Old   January 7, 2014, 08:24
Default Hydrogen release case
  #13
Member
 
James
Join Date: Jul 2013
Posts: 37
Rep Power: 3
ni-openfoam-user is on a distinguished road
Dear colleagues,

I am new to OpenFOAM. I have completed the relevant tutorials and read through all the useful information that I can find.

I am currently starting to play and modify the tutorials to meet my goals.

I wish to start by modelling a simple generic 3D hydrogen release case, say from a simple pipe into the atmosphere.

Can anyone give me pointers about how to start modifying the tutorials to meet this goal? Any help would be greatly appreciated.

Many thanks,

James
ni-openfoam-user is offline   Reply With Quote

Old   January 8, 2014, 08:35
Default Hydrogen Release Case
  #14
Member
 
Jason Dale
Join Date: Mar 2009
Location: UK
Posts: 62
Rep Power: 8
jason is on a distinguished road
Hi James,

Here is a simplified test case from a long time ago which I just updated to the latest OF version. I would check the properties of the gases just to be sure.

The floor wall could quite easily be your pipe wall with a hole in it and you specify the release velocity.

The H2 concentration at the injection point you change in the '0' directories for the N2, O2 and H2 concentrations (0 to 1 = 0% to 100%)

You use the reactingFoam solver but turn off chemistry and combustion so you are only considering mixing in this example case.

Try playing around with variables such as the Courant number and also the mesh density (I would think the mesh has to be quite fine at the mixing interfaces to reduce numerical diffusion). In addition, you might want to experiment with the numerical schemes.

If it were me, before even thinking about combustion or chemistry I would get the case working correctly just for mixing ... then make it more complicated.

Regards

Jason
Attached Files
File Type: zip 0.zip (12.1 KB, 54 views)
File Type: zip constant.zip (78.3 KB, 52 views)
File Type: zip system.zip (4.9 KB, 35 views)
jason is offline   Reply With Quote

Old   February 12, 2014, 13:48
Default thermo.dat
  #15
Member
 
James
Join Date: Jul 2013
Posts: 37
Rep Power: 3
ni-openfoam-user is on a distinguished road
Jason,

Thanks again for sending me the case file, it is proving very usual for me.

I have an additional question if you don't mind.

Considering your post in the 'reactingFoam boundary conditions' thread: i.e. "The H2 concentration at the injection point you change in the '0' directories for the N2, O2 and H2 concentrations (0 to 1 = 0% to 100%)".

I understand that you can change the H2 concentration here at anything from 0 to 100% ( 0 -1).

However, if a change is made here does this change not also require a change to be made in the 'thermo.dat' file to reflect the new concentration of H2 being investigated? (considering combustion scenario)

Many thanks for taking the time to answer my queries.

Kind regards,

James
ni-openfoam-user is offline   Reply With Quote

Old   February 13, 2014, 05:01
Default
  #16
Member
 
Jason Dale
Join Date: Mar 2009
Location: UK
Posts: 62
Rep Power: 8
jason is on a distinguished road
Hi James,

Unfortunately I've never used reactingFoam for combustion (not my field).

But in thermo.dat you specify the coefficients for the chosen thermodynamic model (which is specified in the thermophysicalproperties file). In the example janaf was chosen so you have to specify the coefficient for this model.

I think you will find what you need to know here
http://www.openfoam.org/docs/user/thermophysical.php

Regards

Jason
jason is offline   Reply With Quote

Old   June 2, 2014, 13:23
Default thermo.dat 2
  #17
Member
 
James
Join Date: Jul 2013
Posts: 37
Rep Power: 3
ni-openfoam-user is on a distinguished road
Hi Jason,

Thanks again for sending the case file it has proved very useful.
I have been able to test it and modify it, and have completed a number of low velocity release test simulations.

I am now moving on to increasing the release velocity and decreasing the orifice diameter. I am specifically looking at a scenario with a 3
mm opening and a release velocity of approximately 1000 m/s.

As you can imagine this requires quite a small timestep and a refined mesh to solve.

My question is regarding the thermo.dat file. In the vicinity of the release a partial vacuum may be created, and therefore very small temperatures. These temperatures may be lower than the range specified in thermo.dat (i.e. lower than 200).

Q1. To modify thermo.dat, is it simply a case of lowering the lower temperature range?

Q2. How is this file created? And if required how can it be modified to incorporate such low temperatures? Where do the values for "highCpCoeffs" and "lowCpCoeffs" come from and how are they calculated? (I guess from Chemkin or similar, could you please expand)

Many thanks again for your previous reply and (hopefully) thanks for taking the time to answer my queries.

Kind reagrds,

James
ni-openfoam-user is offline   Reply With Quote

Old   July 7, 2014, 10:45
Default Updating older solvers to new version
  #18
Member
 
James
Join Date: Jul 2013
Posts: 37
Rep Power: 3
ni-openfoam-user is on a distinguished road
Jason,

I am attempting to use the solver "alternateSteadyReactingFoam" for my simulations. This solver was created using v1.5. I am trying to use it with version 2.2.

http://svn.code.sf.net/p/openfoam-ex...yReactingFoam/

You previously stated that you updated the test case which you previously provided from an old to the new version of OpenFOAM.

Could you please kindly comment on the steps required to update an old solver / case to the new version of OpenFOAM?

Many thanks,

James
ni-openfoam-user is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
symmetry boundary conditions in cfx lost.identity CFX 41 May 22, 2013 07:21
Impinging Jet Boundary Conditions Anindya Main CFD Forum 24 January 11, 2012 14:40
Problems with boundary conditions for a lowRekOmegaSST turbulence model cfdmarkus OpenFOAM Running, Solving & CFD 16 November 14, 2011 05:44
Pressure boundary conditions Lionel S. Main CFD Forum 1 August 24, 2007 18:03
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15


All times are GMT -4. The time now is 09:45.