|
[Sponsors] |
September 22, 2019, 08:16 |
using transformPoints in a bash script
|
#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. |
|
September 22, 2019, 09:04 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
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 |
|
September 22, 2019, 10:10 |
|
#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" |
||
September 22, 2019, 10:30 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
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 |
|
September 22, 2019, 11:22 |
|
#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 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Batch scripts | Bdew8556 | OpenFOAM Running, Solving & CFD | 35 | September 21, 2020 04:27 |
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops | avinashjagdale | OpenFOAM Meshing & Mesh Conversion | 53 | March 8, 2019 10:42 |
bash script information | FluentStarter | STAR-CCM+ | 6 | January 31, 2017 12:17 |
CCM+ bash script output format | hebeldebel | STAR-CCM+ | 1 | February 20, 2014 08:38 |
run openfoam with bash script | Gosi | OpenFOAM | 2 | April 11, 2013 10:10 |