|
[Sponsors] |
Problem calling foamDictionary in docker from a python notebook |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 7, 2020, 08:52 |
Problem calling foamDictionary in docker from a python notebook
|
#1 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Dear Foamers,
I am trying to use the docker image under Windows (1912) and preparing a Jupyter notebook to manage the work. I issue docker commands using subprocesses because I did not have any luck with their Python SDK. Now I am getting familiar with foamDictionary by calling its commands from the notebook. It seems to work except for a special case where I get an error that I cannot decipher. A Docker command that works from the notebook: Code:
subprocess.run(docker exec containerName sh -c "\"source /opt/OpenFOAM/setImage_v1912.sh; cd case; foamDictionary system/controlDict -entry endTime -set 100\"") Code:
subprocess.run(docker exec containerName sh -c "\"source /opt/OpenFOAM/setImage_v1912.sh; cd case; foamDictionary 0/U -entry internalField -set \"uniform (0 0 0 )\"\"") Code:
/opt/OpenFOAM/OpenFOAM-v1912/etc/config.sh/functions: eval: line 67: syntax error near unexpected token `)' /opt/OpenFOAM/OpenFOAM-v1912/etc/config.sh/functions: eval: line 67: `. /opt/OpenFOAM/OpenFOAM-v1912/etc/config.sh/paraview 0 0 )' A clue could be in how Python issues the command to docker which most likely looks like: Code:
"source /opt/OpenFOAM/setImage_v1912.sh; cd case; foamDictionary 0/U -entry internalField -set "uniform (0 0 0 )"" I appreciate helpful pointers and grateful for a solution! Best regards, Hisham |
|
Tags |
docker, foamdictionary, jupyter, notebook, python |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compilation problem with "fvPatch::lookupPatchField" | Ya_Squall2010 | OpenFOAM Programming & Development | 9 | November 15, 2021 23:01 |
Installation problem - calling blockMesh - libblockMesh.so | aylalisa | OpenFOAM Installation | 5 | November 28, 2012 10:55 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 06:59 |
The problem of inner iteration when calling the subroutine | guoxj | CFX | 18 | October 23, 2010 21:37 |
OpenFoam-1.5 on Solaris -- compilation problem calling octreeDataPoint(.) constructor | cincaipatron | OpenFOAM Installation | 9 | January 11, 2010 07:37 |