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

Dictionary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2009, 07:24
Default Hi! When I use a statement
  #1
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
Hi!

When I use a statement like:
const LESmodel& sgsModel = mesh_.lookupObject<lesmodel>(dict_.name());

where dict_ referes to a dictionary that is passed as input (turbulentProperties).

then I run,

solver .. 001

I get the error:

word::stripInvalid() called for string ..001constantturbulenceProperties

It seems that name() member function of dictionary removes the "/" and that is causing a problem. How can I recover only "turbulenceProperties" of the name?

This V1.3. Thanks.

Best regards,
Maka
maka is offline   Reply With Quote

Old   February 17, 2009, 07:44
Default Try 1.5.x and see if that solv
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Try 1.5.x and see if that solves your problem.

H
henry is offline   Reply With Quote

Old   February 17, 2009, 07:58
Default The real problem is that you a
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
The real problem is that you are using the dictionary name() method, which returns a full-qualified fileName and not a word.

Try using the fileName::name() method to retrieve the last part of a path.
ie, try this:
const LESmodel& sgsModel = mesh_.lookupObject<lesmodel>(dict_.name().name());
olesen is offline   Reply With Quote

Old   February 18, 2009, 10:26
Default Thanks for the help. Mark is r
  #4
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
Thanks for the help. Mark is right. His solution solves the problem.
Best regards,
Maka.
maka is offline   Reply With Quote

Reply


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
RadialModel is undefined in dictionary mahaputra OpenFOAM Running, Solving & CFD 1 February 9, 2009 00:16
[swak4Foam] FunkySetFields dictionary gschaider OpenFOAM Community Contributions 14 December 3, 2008 21:13
[mesh manipulation] RotateMesh Dictionary File titio OpenFOAM Meshing & Mesh Conversion 2 March 12, 2008 10:15
Dictionary of fluid mechanics Lam Main CFD Forum 1 April 26, 2007 10:18
Reading a numbered selfmade dictionary fra76 OpenFOAM Running, Solving & CFD 0 April 19, 2006 10:05


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