|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 17 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 21 ![]() |
Try 1.5.x and see if that solves your problem.
H |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,594
Rep Power: 38 ![]() ![]() |
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()); |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 17 ![]() |
Thanks for the help. Mark is right. His solution solves the problem.
Best regards, Maka. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |