CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

How to create string-name with variable

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2020, 21:45
Default How to create string-name with variable
  #1
Member
 
Deutschland
Join Date: Jun 2020
Location: https://t.me/pump_upp
Posts: 43
Rep Power: 6
schwaral is on a distinguished road
Send a message via ICQ to schwaral Send a message via AIM to schwaral Send a message via Yahoo to schwaral
Hi all,
I have the following problem.

I want to write the interpolate-data (.ip) after every timestep. So I wanted to do this by using excecute-command and calling a journal file. However fluent automatically overwrites the old .ip file. So is there any possibility to include for example the simulation time in the string of the name?

I want something like this:

(define MYFILENAME (rpgetvar 'flow-time))
(ti-menu-load-string "file/interpolate/write-data MYFILENAME yes yes ")

Or is this simply not possible? Maybe you have a better solution. I am not an expert in scheme... totally the opposite unfortunately.
schwaral is offline   Reply With Quote

Old   October 29, 2020, 08:06
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you may try something like this:

Code:
(ti-menu-load-string (format #f "file/interpolate/write-data my_case_~a yes yes \n" (rpgetvar 'flow-time)))
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply


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
Using createPatch and cyclicAMI in FOAM Extend to create periodicbox manuc OpenFOAM Running, Solving & CFD 1 April 12, 2022 12:36
Meshing a Sphere Ajay FLUENT 10 September 3, 2016 15:18
OpenFoam-1.6-ext Allwmake compilation error - one last barrier Pat84 OpenFOAM Installation 15 July 25, 2012 22:49
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 05:35
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 22:21.