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

foamDictionary with topoSetDict

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

Like Tree1Likes
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2021, 07:29
Question foamDictionary with topoSetDict
  #1
New Member
 
Sarath
Join Date: Mar 2017
Location: Spain
Posts: 21
Rep Power: 7
sk11 is on a distinguished road
Hello All,
How can we use foamDictionary with topoSetDict and access the keywords inside actions() ?

I understand that 'actions' is a list of dictionaries. Is there any way to access/modify the keywords inside the dictionary actions?

I tried,
Code:
foamDictionary system/topoSetDict -entry actions.entry0 -value
and it seems the list of dictionaries inside the entry action cannot be accessed via entry0.

But with the dictionary constant/polyMesh/boundary which has similar structure as topoSetDict, foamDictionary works without any problem. Can anyone here help me understand this?
Thanks in advance
sk11 is offline   Reply With Quote

Old   December 2, 2021, 05:06
Default
  #2
New Member
 
Marius
Join Date: Aug 2020
Location: Germany
Posts: 7
Rep Power: 3
Muerio is on a distinguished road
Hi,

I'm currently looking into this exact problem.

The main difference I see when comparing the boundary file to topoSetDict:
boundary contains a list of labeled subdicts whereas topoSetDict contains the actions keyword containing a list of unlabeled subdicts.

foamDictionary uses labels to reference the entries, therefore you can't reference an individual entry in the actions list

My current solution is using a bash script to generate or modify the complete entry I want to assign to actions as a string and then setting it with
Code:
foamDictionary -entry actions -set"($ACTIONS)" system/topoSetDict
Muerio is offline   Reply With Quote

Old   December 21, 2021, 11:57
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,486
Rep Power: 35
olesen will become famous soon enougholesen will become famous soon enough
Quote:
Originally Posted by Muerio View Post
Hi,

I'm currently looking into this exact problem.

The main difference I see when comparing the boundary file to topoSetDict:
boundary contains a list of labeled subdicts whereas topoSetDict contains the actions keyword containing a list of unlabeled subdicts.

This is correct, but already added in some initial work to support named dictionary entries as a first step to supporting 'actions' as a set of dictionaries instead. Needs more work, but this similar to why the "functions" entry (for functionObjects) changed from "functions ( ... )" to "functions { ... }" - to allow dictionary manipulation. Just hasn't been enough pressure to change topoSetDict as well.
Muerio likes this.
olesen is offline   Reply With Quote

Reply

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
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." lethu OpenFOAM Meshing & Mesh Conversion 1 June 3, 2020 07:49
Problem in topoSetDict (Unique Error) Raza Javed OpenFOAM Running, Solving & CFD 3 May 4, 2019 02:34
[OpenFOAM.com] OpenFOAMv1806 with amd aocc 1.2 / 1.3 compiler cfdx OpenFOAM Installation 10 February 27, 2019 04:59
Fatal error: invalid wall function specification kcc49 OpenFOAM Running, Solving & CFD 13 September 26, 2018 04:07
chtMultiRegionSimpleFoam: crash on parallel run student666 OpenFOAM Running, Solving & CFD 3 April 20, 2017 11:05


All times are GMT -4. The time now is 21:25.