CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Set the nonuniform boundary condition from external file (https://www.cfd-online.com/Forums/openfoam-pre-processing/148526-set-nonuniform-boundary-condition-external-file.html)

nwpukaka February 14, 2015 00:15

Set the nonuniform boundary condition from external file
 
Hello,

The data for my nonuniform boundary condition is calculated from external program, and saved in a .dat file. Is is possible to read this data when setting nonuniform boundary conditions, just like:

n0000
{
type fixedGradient;
gradient nonuniform List<scalar>
boundary.dat
}

Thank you in advance.
Kan

Mitchell Baum September 21, 2015 22:24

Hi Kan,
I wish to also implement a non-uniform BC from a CSV file, however as a beginner in OF, I am finding it difficult to find an example of this in laymen's terms. Have you made any progress on this?
Regards,
Mitchell

yongxiang October 6, 2015 05:09

Hi Mitchell,
I am also run into this kind of problem, do you have any idea now?
For my purpose, I want to prescribe a Blasius solution as my boundary condition. The data can be generated by a Matlab code, and export as an external data for OpenFOAM. Then compile a utility that interpolate and map the data onto the inflow patch. But, however, this would be time consuming, since I am also beginner of OF. Do you have any better idea now?
regards
Yongxiang

Antimony October 9, 2015 05:29

Hi,

This feature has been available in OF since version 2.1.

Here is the link describing how to go about it: http://www.openfoam.org/version2.1.0...conditions.php

If this doesn't suffice, perhaps you can look at swak4Foam as well.

Hope this helps.

Antimony

yongxiang October 12, 2015 05:02

Hi Antimony,
thank you very much for your quick reply. I've checked the page you suggested. And still I am not sure how should my data get prepared. For example, If I use TableFile, the indicated format for the data is:
(
(0.0 (1 2 3))
(1.0 (4 5 6))
);
There is no explanation of what the scalar and vector are. I suppose the scalar to be time, and the scalar to be Velocity.

For my purpose, I want to prescribe a profile, which means the coordinates are also involved. But in the above data format, no coordinates are mentioned. So Do you know what specific data format should be?
Regards
Yongxiang

Antimony October 12, 2015 05:33

Hi,

I guess the link that I shared was a common answer to the three queries on this thread, each of which was connected but are different.

Take note that the link refers particularly to time-dependent boundary conditions.

In your case, I would think something like the capabilities offered by swak4Foam would be more relevant. Here is a link to it: http://openfoamwiki.net/index.php/Contrib/swak4Foam

Hope this helps

Antimony

P.S: Here is another post that might be relevant: http://www.cfd-online.com/Forums/ope...tml#post568000 talking about timeVaryingMappedFixedValue


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