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

modifying XiFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 17, 2010, 12:24
Default modifying XiFoam
  #1
New Member
 
Carlos Trejo
Join Date: Mar 2010
Posts: 5
Rep Power: 7
CarlosT is on a distinguished road
Hi!

Im having some trouble trying to modify the XiFoam solver.

Im trying to fix a flame in a combustion chamber. For this, I want to fix the value of the b field throughout the simulation.

Im not a great expert but Id thought maybe including a new volScalarField, telling it to read and not to write would do the job:

Info<< "Reading field b\n" << endl;
volScalarField b
(
IOobject
(
"b",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);

besides this, I took the following equation out of bEqn.H


// Create b equation
// ~~~~~~~~~~~~~~~~~
fvScalarMatrix bEqn
(
fvm::ddt(rho, b)
+ mvConvection->fvmDiv(phi, b)
+ fvm::div(phiSt, b, "div(phiSt,b)")
- fvm::Sp(fvc::div(phiSt), b)
- fvm::laplacian(turbulence->alphaEff(), b)
);

but its not working.

I can compile the new solver with a failure warning
"error: 'bEqn' was not declared in this scope
createFields.H:31: warning: unused variable 'T'"

but when I run the simulation with it, the b field does not remain stable.

Does anyone have an idea what might be going wrong, or any hint in which direction to go?

Thanks a lot
CarlosT is offline   Reply With Quote

Old   May 17, 2010, 14:10
Default XiFoam breaks off
  #2
New Member
 
Carlos Trejo
Join Date: Mar 2010
Posts: 5
Rep Power: 7
CarlosT is on a distinguished road
Hi again!

Actually I realised what I was doing was dumb, Ive left everything as in the original solver except for the bEqn.H file, where Ive changed the b equation:

// Create b equation
// ~~~~~~~~~~~~~~~~~
fvScalarMatrix bEqn
(
fvm::ddt(rho, b)

);

so that it will remain constant.

Ive run the case (with quite fine meshing) but it breaks off pretty soon...

I suspect its aborting because of what I changed in the code (I got a floating point error), does anybody have any idea on how to solve this?

Thank you a lot!
CarlosT is offline   Reply With Quote

Old   May 17, 2010, 14:29
Default
  #3
New Member
 
Carlos Trejo
Join Date: Mar 2010
Posts: 5
Rep Power: 7
CarlosT is on a distinguished road
Hello!

Ive tried aswell modifying the bEqn in this way:

// Create b equation
// ~~~~~~~~~~~~~~~~~
fvScalarMatrix bEqn
(
fvm::ddt(b)

);

it calculates for a little longer before breaking up.

Anybody got a hint?

Thank you very much
CarlosT is offline   Reply With Quote

Old   May 18, 2010, 04:41
Default
  #4
New Member
 
Carlos Trejo
Join Date: Mar 2010
Posts: 5
Rep Power: 7
CarlosT is on a distinguished road
Anybody got a clue?

Thank you
CarlosT 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
Modifying the laplacian operator mlawson OpenFOAM Running, Solving & CFD 11 September 7, 2011 12:30
XiFoam partially premix combustion tavasoly OpenFOAM Running, Solving & CFD 0 July 1, 2008 11:01
XiFOAM H2Air combustion brgirgis OpenFOAM Running, Solving & CFD 0 February 11, 2008 18:17
Modifying Turbulence Model Constants Bean FLUENT 0 February 12, 2006 19:33
XiFoam question burningman OpenFOAM Running, Solving & CFD 0 November 15, 2005 07:04


All times are GMT -4. The time now is 05:23.