Feap installation with visual studio

If you ever require a FEM system for quick fem for educational or research purpose. Feap is one of the easiest to get started with.

Here’s a rundown with screenshots on how to build it with visual studio with Intel Fortran.

Hope this helps.

Step 0:

Download from:

http://projects.ce.berkeley.edu/feap/feappv/feappv41.zip

Project Page:

http://projects.ce.berkeley.edu/feap/feappv/

Two steps

  1. Build a library
  2. Build the program
  1. Select New Project

  1. Select New Project
    1. Select Library: Select Static Library
    2. Name library e.g. lib22

  1. Under the Projects tab select Add Existing Item
    1. Add all subroutines in directories: Elements, Plot, Program, User, and Windows (do not include Unix, Include, or Main).

Under the Projects tab select Properties

Select Fortran then General

b.) Set additional include path to point to the feappv include

directory (e.g. c:\users\xxx\feappv\ver22\include) and the appropriate

    directory for 32-bit or 64-bit pointers (e.g.

    c:\users\xxx\feappv\ver22\include\integer4 or

    c:\users\xxx\feappv\ver22\include\integer8)

Build library

Building the Main program

Open Visual Studio or if open new project

a.) Select QuickWin Application, select QuickWin option

(not standard graphics QuickWin)

b.) Name main program e.g. feappv

At top select Release build (as opposed to Debug)

3. Under the Projects tab select Add Existing Item

a.) Set show all files in window and add library (e.g. lib22)

Visual Studio normally places this in

c:\users\xxx\documents\visual studio\projects\lib22\lib22\release

b.) Add feappv.f from the subdirectory Main.

4. Under the Projects tab select Properties

a.) Select Fortran then General

b.) Set additional include path to point to the feappv include

directory (e.g. c:\users\xxx\feappv\ver22\include) and the appropriate

    directory for 32-bit or 64-bit pointers (e.g.

    c:\users\xxx\feappv\ver22\include\integer4 or

    c:\users\xxx\feappv\ver22\include\integer8)

Add the libraries and the library path

Build… If you get error like this, you have not included all forttan file sin the liberay include and come pback..



Advertisements

What is “uncertainty quantification”?

Quantifying Uncertainty in Subsurface Systems, a new book just published by the American Geophysical Union, explores what we know and don’t know about the extent underground resources, and how we can make decisions in the face of uncertainty.
 
Although the book explores how uncertainty quantification can enable optimal decisions in the exploration, appraisal, and development of subsurface resources, it covers many data scientific methods that allow representing geological variability with simple statistical tools.
 
This article include few of the questions one of the editor of this book covers, one that is particular covered in this blog on uncertainty quantification is listed below.
 
 
 
What is “uncertainty quantification”?
 
In the broadest sense, it is a measure of our lack of understanding. This is difficult: it is easier to list what we know than what we don’t know. The quantification part points to a scientific approach to the problem that involves axioms, definitions and rules. Uncertainty quantification is both prescriptive and normative: a set of rules on how to proceed are created based on mathematics and logic, in particular, probability theory and statistics. Within those rules, calculations are done that involve observed data as well as global understanding of the subsurface system created from experience. Thus, it allows making optimal decisions even if we cannot perfectly predict the outcome of the actions we take in the exploration, appraisal and development of subsurface resources.
 
See the table of contents of the book here 
 

Learning Fluid Simulation

Be it designing, analysis visualisation is a big part of engineering discipline. Such is it’s important that entire industries are based on providing physics based softwares.

But now we have a new toolkit to understand the complex behaviours of fluids and other. Neural networks are able to learn the patterns of smoke simulation etc without any pde’s. This is going to be a huge step in the industry.

Watch the video.

Can’t wait to see this technology to come to production.

Using HDF5 lib with Visual Studio

During October last year, my work involved using HDF library with FORTRAN and C and use them to store mounds of data other systems were generating.

The first step was to use the library with visual studio 2008 in windows. Companywide HDF5 had many users in Linux cluster but no formal implementation was available to use in visual studio. While that made the library available but building, a program using them in visual studio was a different matter. I faced couple of issues and with much googling and stack overflowing, solved them, here is the running note I took for one of the issue, just in case someone else is in the same situation.

Hope this helps.

1>libhdf5.lib(H5I.c.obj) : error LNK2001: unresolved external symbol _forceCRTManifestCUR

1>libhdf5.lib(H5.c.obj) : error LNK2001: unresolved external symbol _forceCRTManifestCUR

1>libhdf5.lib(H5D.c.obj) : error LNK2001: unresolved external symbol _forceCRTManifestCUR

1>libhdf5.lib(H5F.c.obj) : error LNK2001: unresolved external symbol _forceCRTManifestCUR

1>libhdf5.lib(H5S.c.obj) : error LNK2001: unresolved external symbol _forceCRTManifestCUR

From: https://social.msdn.microsoft.com/Forums/vstudio/en-US/af6796af-a1bf-4904-9923-15101956d882/linking-error-with-vc9-error-lnk2001-unresolved-external-symbol-forcecrtmanifestcur?forum=vcgeneral

  • The various header files associated with the visual C++ runtime embed a number of directives into the compiled code. This power used to be used for good: appropriate #pragma’s could ensure that the resulting .lib file automatically had a dependency on the correct runtime libraries.

    However, a kind of dependency ____ comes about when one tries to mix projects built with different build settings in the same version of dev studio, and becomes even worse when pre-built libs made by another version of Dev Studio are used.

    The best thing to do, frankly, would be to rebuild your .libs in the same version of Dev Studio. There are some project settings that can be used when building a .lib that can ‘sanitize it’ a bit and make it’s use more compatible with different versions of dev studio – libraries should generally be built with the multi threaded runtime selected (NOT the DLL runtime) and the option “Omit Default Library Names” selected.

    In this case, __forceCRTManifestCUR, is a result of a #pragma comment(linker, “/INCLUDE=__forceCRTManifestCUR”) directive in one of the c-runtime header files.

    You can work around this by simply including a like like this in your main.cpp file:

    int __forceCRTManifestCUR=0;

    Doing this will “defeat” an attempt by the headers to get a manifest dependency to the “current” version of the CRT dlls embedded – but don’t worry – the correct CRT manifest is already specified correctly using a different mechanism, so you can generally quite safely define this symbol (by declaring it as an int or anything really) without causing any problems for the project.

What in Uncertainty Quantification?

“If a man will begin with certainties, he shall end in doubts;
but if he will be content to begin with doubts, he shall end in certainties.” – F. Bacon – 1605.
The availability of powerful computational resources and general purpose numerical algorithms creates increasing opportunities to attempt simulations in complex systems. How accurate are the resulting predictions? Are the mathematical and physical models correct? Do we have sufficient information to define relevant operating conditions? In general, how can we establish error bars on the results?
 
error_bars
Uncertainty Quantification (UQ) aims at developing rigorous methods to characterize the impact of limited knowledge on quantities of interest. At the interface between physics, mathematics, probability and optimization, and although quite mature in the experimental community, UQ efforts are in their infancy in computational science.
Proud to be part of this. Hope to continue to work with it.