|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Join Date: Jun 2014
Location: Turkey
Posts: 58
Rep Power: 12 ![]() |
Hi everyone.
I would like to ask a "probably" very easy question. I am a little bit newbie at linux bash scripting. I have a center of mass point "p", which comes from another calculation. How can I use it in tansformPoints command? I tried these different ways below but it does not work... p="(0 0 0)" transformPoints -translate '($p)' p=\'\(\ 0\ 0\ 0\ \)\' transformPoints -translate $p trans='transformPoints'\ '-translate'\ \'\(0\ 0\ 0\)\' $trans I do not know should I post it at linux forums or openfoam forums. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 ![]() |
Have you sourced OpenFOAM bashrc before executing the bash script or inside the bash script?
Don't know the error type you get, yet the bash script should be informed regarding the OpenFOAM command 'transformPoints'.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Member
Join Date: Jun 2014
Location: Turkey
Posts: 58
Rep Power: 12 ![]() |
Quote:
Yes I did. The other commands at my script are working. Like blockMesh or checkMesh. The error I got is: "--> FOAM FATAL ERROR: Wrong number of arguments, expected 0 found 2 FOAM exiting" |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 ![]() |
Have a go, if possible:
Code:
#!/bin/sh cd ${0%/*} || exit 1 # Run from this directory vector="(0 0 20)" transformPoints -translate "$vector"
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
![]() |
![]() |
![]() |
![]() |
#5 | |
Member
Join Date: Jun 2014
Location: Turkey
Posts: 58
Rep Power: 12 ![]() |
Quote:
I tried lots of configurations but seems like I missed this one. Thanks again, have a nice day. |
||
![]() |
![]() |
![]() |
Tags |
bash, meshing, openfoam, scripting, transformpoints |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Batch scripts | Bdew8556 | OpenFOAM Running, Solving & CFD | 35 | September 21, 2020 03:27 |
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops | avinashjagdale | OpenFOAM Meshing & Mesh Conversion | 53 | March 8, 2019 09:42 |
bash script information | FluentStarter | STAR-CCM+ | 6 | January 31, 2017 11:17 |
CCM+ bash script output format | hebeldebel | STAR-CCM+ | 1 | February 20, 2014 07:38 |
run openfoam with bash script | Gosi | OpenFOAM | 2 | April 11, 2013 09:10 |