Hello, we have a CFD code written in MATLAB and we wanna save the calculations at a specific node to a text file like ANSYS FLUENT..Any suggestions please?
If you want to store information on the entire fields (node or cell-center), you can set up an export under calculation activities, and select ASCII. You can write the parameters you want every timestep or every X timesteps. If you want to have more control, like only writing in a specific region (which does not overlap with your cell or boundary zones), or if you want to execute some calculations such as averaging inside FLUENT, you can als use a UDF. But in my experience, using the calculation activity option to export and conducting subsequent filtering and post-processing is often the most straightforward.
In FLUENT, File--> Export-->Solution data-->File type ASCII-->choose any variable on the right side panel with option to extract data on any face/surface in the computational domain. X & Y coordinates of the mesh will be automatically exported along with any chosen variable: Export any parameter you want from File\export\solution data. (file type : ASCII and delimiter should be space).
In MATLAB, open the ASCII file (with extension .txt) using fscanf function with specific format and number of columns in a script. The exported data will be suitably vectorized for further analysis (Open file in MATLAB (drag and drop the file into Matlab workspace or use uiopen ('file address',1)).
Hello, thanks for the replies, I have to assure that I do not wanna do this in FLUENT, I just mentioned it to give an example, the code is written in MATLAB and the question is what is the exact formula needed to export the results at a specific node every time step?
This is what I want :) For example, I want to get a txt file has the time vs temperature after finishing running the CFD code, I only get the last result (the last time step vs the last temperature) so how can we let the software write each result in the same txt file?