CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Blog Entries

Register Blogs Members List Search Today's Posts Mark Forums Read

Old

Memory protection in OpenFOAM / combinig with FORTRAN

Posted September 20, 2014 at 10:27 by pfhan

combine the interFoam solver with an external solver written in FORTRAN
openfoam call fortran subroutines example

Quote:
Originally Posted by botp View Post
I am trying to combine the interFoam solver with an external solver written in FORTRAN. I had no problem combining the FORTRAN code with C++, but there seems to be something "OpenFOAM specific" corrupting the data of the FORTRAN solver. My best guess is that the automatic memory handling in OpenFOAM, unintended is freeing the memory of the FORTRAN
...
New Member
Posted in Uncategorized
Views 636 Comments 0 pfhan is offline Edit Tags
Old

How to loop over cell faces

Posted September 17, 2014 at 11:09 by pfhan

How to loop over cell faces qoute

Quote:
Originally Posted by fumiya View Post
Hi Marshak,

I think it is better to start another thread for being easy to search later.
Regarding your question, the following is my sample code:

Code:
scalar sumA = 0.0; //Sum of areas of all faces of a cell
const cell& cFaces = mesh.cells()[yourCellIndex];

forAll(cFaces, i)
{
    sumA += mag(mesh.Sf()[cFaces[i]]); //cFaces[i]: face label of a cell
}

scalar Length = mesh.V()[yourCellIndex]/sumA;
...
New Member
Posted in Uncategorized
Views 591 Comments 0 pfhan is offline Edit Tags
Old

Step-by-step SU2 clean parallel Installation (Part 1/3)

Posted July 27, 2014 at 21:31 by pdp.aero
Updated October 3, 2015 at 02:29 by pdp.aero

Long story short, my system has been infected by a malicious. Couldn't remove it, so decided to format the disk and start over fresh. After, I decided to open a blog and share everything that I did for installing the SU2 suite step by step. What you are going to read is step-by-step instruction for installing the SU2 suite after having a clean OS installation. Therefore, there is no precompiled library, packages or third-party software.

All the instruction provided here is based...
Attached Thumbnails
Click image for larger version

Name:	brokenfanvent.jpg
Views:	193
Size:	91.0 KB
ID:	238  
Member
Posted in Uncategorized
Views 3242 Comments 0 pdp.aero is offline Edit Tags
Old

Step-by-step SU2 clean parallel Installation (Part 3/3)

Posted July 27, 2014 at 21:15 by pdp.aero
Updated October 4, 2015 at 12:28 by pdp.aero (Updating to recent version)

For the past

In this section, we are going to install the SU2 2.0.2, pretty old version comparing to current version 3.2.0, and then SU2 2.0.10, after we will finally install the SU2 3.0.0. Again, download the tar file, put the source in a right place, and unpack it. Before building these versions we will need the stands-alone metis.

Metis 4.0.3

Download the tar file from here, put it in your SU2 2.0.2 trunk, then unpack the tar file and direct there....
Member
Posted in Uncategorized
Views 2175 Comments 0 pdp.aero is offline Edit Tags
Old
Rating: 2 votes, 5.00 average.

Step-by-step SU2 clean parallel Installation (Part 2/3)

Posted July 27, 2014 at 21:12 by pdp.aero
Updated October 3, 2015 at 04:51 by pdp.aero (Updating to recent version 3.2.9)

Step 4: Scipy 0.11.0

First, we need be sure about the f2py, which is a requirement. Enter the below command and make sure you have it. You might find it in /usr/local/bin/f2py.
Code:
whereis f2py
In previous step, we checked that numpy is added to python 2.6.6 site package. Now we can go forward and build scipy. Download the source from here, unpack and follow the below commands in your desired directory.

Code:
sudo python setup.py build
sudo python setup.py
...
Member
Posted in Uncategorized
Views 2368 Comments 3 pdp.aero is offline Edit Tags

All times are GMT -4. The time now is 18:31.