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

modifying XiFoam

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

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

I´m having some trouble trying to modify the XiFoam solver.

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

I´m not a great expert but I´d 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 it´s 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, 15:10
Default XiFoam breaks off
  #2
New Member
 
Carlos Trejo
Join Date: Mar 2010
Posts: 5
Rep Power: 16
CarlosT is on a distinguished road
Hi again!

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

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

);

so that it will remain constant.

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

I suspect it´s 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, 15:29
Default
  #3
New Member
 
Carlos Trejo
Join Date: Mar 2010
Posts: 5
Rep Power: 16
CarlosT is on a distinguished road
Hello!

I´ve 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, 05:41
Default
  #4
New Member
 
Carlos Trejo
Join Date: Mar 2010
Posts: 5
Rep Power: 16
CarlosT is on a distinguished road
Anybody got a clue?

Thank you
CarlosT is offline   Reply With Quote

Reply

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
Modifying the laplacian operator mlawson OpenFOAM Running, Solving & CFD 22 July 16, 2018 05:56
XiFoam partially premix combustion tavasoly OpenFOAM Running, Solving & CFD 0 July 1, 2008 12: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 04:18.