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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2014, 17:55
Default systemCall with simulation variables
  #1
Member
 
benoit paillard
Join Date: Mar 2010
Posts: 96
Rep Power: 16
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, 02:33
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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


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


All times are GMT -4. The time now is 08:05.