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

systemCall with simulation variables

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2014, 18:55
Default systemCall with simulation variables
  #1
Member
 
benoit paillard
Join Date: Mar 2010
Posts: 95
Rep Power: 13
bennn is on a distinguished road
Hi everyone,

I would like to use the function object systemcall to be able to update the 6DoF motion of my body.

I need to use the current timestep value in the bash command I call, and I cannot figure out how to do that.

The best workaround I found so far is to read the log or force text file and write a bash variable with the timestep value.... Which is really silly I think.

Thanks !!
bennn is offline   Reply With Quote

Old   June 2, 2014, 03:33
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,333
Rep Power: 33
olesen will become famous soon enougholesen will become famous soon enough
Quote:
Originally Posted by bennn View Post
Hi everyone,

I would like to use the function object systemcall to be able to update the 6DoF motion of my body.

I need to use the current timestep value in the bash command I call, and I cannot figure out how to do that.

The best workaround I found so far is to read the log or force text file and write a bash variable with the timestep value.... Which is really silly I think.

Thanks !!
I'd guess that the easiest would be to recompile your solver (okay) or recompile a modified version of system-call (better) that also exports the information you need via environment variables before the system-call is actually called. Maybe something like FOAM_TIMESTEP, or FOAM_ITERATION would be a good name.
olesen is offline   Reply With Quote

Reply

Tags
functionobjects, systemcall

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
a simulation with rotation and vibration liuzexiang CFX 34 September 16, 2013 09:12
Convergence of jet flow simulation MiraLisa FLUENT 0 August 15, 2013 05:44
constant variables in all processors , parallel simulation saba_saeb OpenFOAM Programming & Development 0 July 17, 2013 14:07
GUI crash and simulation engine still running RPJones FLOW-3D 2 November 9, 2010 09:18
Fluent 12.1 - time dependence of variables in transient simulation hanka FLUENT 6 October 18, 2010 16:43


All times are GMT -4. The time now is 02:14.