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

autoPtr<incompressible::RASModel>

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2010, 14:48
Default autoPtr<incompressible::RASModel>
  #1
New Member
 
Nadeem
Join Date: Mar 2009
Location: München, Bavarian, Deutschland
Posts: 24
Rep Power: 17
ubaid is on a distinguished road
Hello everybody,
I am trying to declare RASModel outside main function but its giving me some errors.

I compiled the code, there were no errors but i run the code then i get following error.

-->Foam FATAL ERROR
lookup of RASProperties from object Registry region0 successful but it is not a RASModel, it is a dictionary.

How can i get rid of this fatal error. I am trying but still failed to get rid of it.

What I did is the following.

autoPtr<incompressible::RASModel> RASModel
(
incompressible::RASModel::New(U,phi,laminarTranspo rt)
);

This is the same way as done in buoyanBoussinesqSimpleFoam. What I am doing is that i am trying to initialize it in some class.

Thanks in advance.

Best Regards,
ubaid is offline   Reply With Quote

Old   October 19, 2010, 03:36
Default
  #2
Member
 
Join Date: Nov 2009
Location: Germany
Posts: 96
Rep Power: 17
val46 is on a distinguished road
Hi,

I have no experience with your problem but just found this:

Code:
autoPtr<incompressible::RASModel> turbulence
            (
                incompressible::RASModel::New(U, phi, laminarTransport)
            );
Maybe this helps.


Regards,
Toni
val46 is offline   Reply With Quote

Old   October 19, 2010, 09:23
Default
  #3
Senior Member
 
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17
herbert is on a distinguished road
Quote:
Originally Posted by val46 View Post
Code:
autoPtr<incompressible::RASModel> turbulence
            (
                incompressible::RASModel::New(U, phi, laminarTransport)
            );
That's exactly the answer. "RASModel" is the name of a class and can therefor not be used as name of the variable (here the name is "turbulence").

Regards,
Stefan
herbert is offline   Reply With Quote

Old   October 19, 2010, 09:46
Default
  #4
Member
 
Join Date: Nov 2009
Location: Germany
Posts: 96
Rep Power: 17
val46 is on a distinguished road
Hi Stefan,

but then how is it possible I found the following code in yPlusRAS.C ?

Code:
singlePhaseTransportModel laminarTransport(U, phi);

    autoPtr<incompressible::RASModel> RASModel
    (
        incompressible::RASModel::New(U, phi, laminarTransport)
    );

Regards,
Toni
val46 is offline   Reply With Quote

Reply

Tags
autoptr, fatalerror, rasmodel


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



All times are GMT -4. The time now is 18:41.