|
[Sponsors] |
How to set as input parameter in Fluent a variable existing outside it? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 3, 2015, 11:25 |
How to set as input parameter in Fluent a variable existing outside it?
|
#1 |
New Member
Adrien
Join Date: Dec 2014
Posts: 2
Rep Power: 0 |
Hy everyone,
I'm trying to couple some output of a Matlab code with Fluent. Let me explain myself : i'd like to set as input parameter for the Fluent solver, a variable ( scalar) that come from matlab code. Is there any way to impose the location (path) of my variable ( saved from the matlab code) in the parameter set, so that i don't have to enter its value manually? For example, i've a variable named a.txt , and i want to set it as an input parameter through the parameter set interface, how can i do? Thanks for your help ! |
|
March 3, 2015, 12:10 |
|
#2 |
Senior Member
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 14 |
Hm, hopefully someone else here can cook up something more elegant, but this should do the trick.
Is there a reason you need to use Fluent parameters in particular? It will probably be easiest to do this with a scheme variable. Here's some unsanitary code that defines a variable "param" and reads the first value in "a.txt" into it. Code:
(rp-var-define 'param 0.0 'real #f) (define p (open-input-file "a.txt")) (rpsetvar 'param (read p)) (close-input-port p) Code:
(rpgetvar 'param) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Paraview 3.98 - errors when saving geometry file | pajot | ParaView | 1 | September 28, 2013 11:45 |
Fluent 14 journal script to set fluid parameters | jhome | ANSYS | 0 | April 30, 2012 05:26 |
Error when input new parameter in Fluent | micro11sl | FLUENT | 0 | July 1, 2011 07:42 |
Install problem in linux | navaladi | OpenFOAM Installation | 11 | July 17, 2008 03:24 |
Problem installing on 64bit with ver13 | jonititan | OpenFOAM Installation | 0 | April 28, 2006 06:45 |