CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

New Model of Turbulence with Porosity Source Term

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

LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2017, 05:25
Default New Model of Turbulence with Porosity Source Term
New Member
Chus Mat
Join Date: Feb 2017
Posts: 12
Rep Power: 9
chusma is on a distinguished road
Hello everyone,

I am trying to include a source term in the k-epsilon model. The source term is related with the porosity applying the Darcy-Forchheimer Law.

I have created a Field called Darcy which my program will read. With that field I calculate other two terms.

There are not compilation errors, however when I launch porousSimpleFoam the following error occurs:

new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
Despite I have not created any new pointer to the functions the error still appearing.

Somebody could help me with this? I will appreciate any help.

Here is how I define the functions in my code:

tmp<volScalarField> kEpsilonFurow :: permeability()//New
volScalarField permeability_("permeability", porosity()/Darcy_);

return permeability_;

tmp<volScalarField> kEpsilonFurow :: porosity()//New

volScalarField porosity_("porosity", sqrt(1/(0.00450799*Darcy_ +1 )));

return porosity_;

tmp <volScalarField> kEpsilonFurow ::Gk()//New

volScalarField Gk("Gk", Ck_*k_*porosity()/sqrt(permeability())* sqrt(U_ & U_) );
volScalarField Zero("Zero", 0.0*k_);
if (Darcy_ > Zero)
return Gk;
return Zero;

And in the k equation:

tmp<fvScalarMatrix> kEqn
+ fvm::div(phi_, k_)
- fvm::laplacian(DkEff(), k_)
G + Gk()

- fvm::Sp(epsilon_/k_, k_)
chusma is offline   Reply With Quote

Old   February 11, 2021, 13:25
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 313
Rep Power: 15
agustinvo is on a distinguished road

I know it's been a while, but did you find an answer to this issue? I'm facing a similar problem. I have a function which returns a tmp field, but if I create the field inside the function I get also this error message when running.
agustinvo is offline   Reply With Quote


code, compilation, porosity, poroussimplefoam, turbuelence model

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
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 08:06
[] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 17:34
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08

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