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

New Model of Turbulence with Porosity Source Term

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2017, 06:25
Default New Model of Turbulence with Porosity Source Term
  #1
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:

Quote:
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
Aborted
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:

Quote:
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;
else
return Zero;


}
And in the k equation:

Quote:
tmp<fvScalarMatrix> kEqn
(
fvm::ddt(k_)
+ 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, 14:25
Default
  #2
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hi,


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

Reply

Tags
code, compilation, porosity, poroussimplefoam, turbuelence model


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


All times are GMT -4. The time now is 11:49.