|
Project Information
Featured
Downloads
Links
|
Table of contents
OverviewDelFEM is a project aiming to provide handy finite element analysis environment for non-expert users. This project include 2-dimensional modeling, meshing and finite element analysis(FEA) components. The FEA supports various type of analysis including fluid, solid ,thermal and their coupling. Users can run FEA simulation through simple object oriented C++ problem description. Wiki
Features
Gallerly
Videos
more movies are in http://www.youtube.com/user/umet55#g/u Coding Example(Non static analysis of St.Venant-Kirchhoff material)Header #include "delfem/cad_obj2d.h" #include "delfem/mesher2d.h" #include "delfem/field.h" #include "delfem/field_world.h" #include "delfem/drawer_field_face.h" #include "delfem/drawer_field_edge.h" #include "delfem/eqnsys_solid.h" Problem Setting Cad::CCadObj2D cad_2d;
{ // set model shape
std::vector<Com::CVector2D> vec_ary;
vec_ary.push_back( Com::CVector2D(0.0,0.0) );
vec_ary.push_back( Com::CVector2D(5.0,0.0) );
vec_ary.push_back( Com::CVector2D(5.0,1.0) );
vec_ary.push_back( Com::CVector2D(0.0,1.0) );
cad_2d.AddPolygon( vec_ary );
}
Msh::CMesher2D mesh2d(cad_2d,0.1); // build mesh with elem lengh = 0.1 from shape
Fem::Field::CFemField world;
const unsigned int id_base = world.AddMesh( mesh2d ); // set mesh into fem field
const CIDConvEAMshCad conv = world.GetIDConverter(id_base); // get ID converter
// set field to equation
Fem::Eqn::CEqnSystem_Solid2d solid;
solid.UpdateDomain_Field(id_base, world);
solid.SetSaveStiffMat(false);
solid.SetStationary(false);
// set material parameter
solid.SetYoungPoisson(10.0,0.3,true);
solid.SetGeometricalNonlinear(true);
solid.SetGravitation(0.0,0.0);
solid.SetTimeIntegrationParameter(dt,0.7);
unsigned int id_field_bc0 = solid.AddFixElemAry(conv.GetIdEA_fromCad(2,Cad::EDGE),world);
unsigned int id_field_bc1 = solid.AddFixElemAry(conv.GetIdEA_fromCad(4,Cad::EDGE),world);
FieldValueSetter fvs(id_field_bc0,world);
world.SetMathExp("sin(t*PI*2*0.1)", 1,Fem::Field::VALUE, world);
// set drawer array
std::vector<CDrawer*> drawer_ary;
id_field_disp = solid.GetIdField_Disp();
drawer_ary.PushBack( new View::CDrawerFace(id_field_disp,false,world) );
drawer_ary.PushBack( new View::CDrawerEdge(id_field_disp,false,world) );
drawer_ary.PushBack( new View::CDrawerEdge(id_field_disp,true ,world) );OpenGL drawing function cur_time += dt; // update current time fvs.Execute(cur_time,world); // update the value of boundary condition solid.Solve(world); // Solve FEM drawer_ary.Update(world); // update drawer drawer_ary.Draw(); // OpenGL drawing ライセンス形態なるべく沢山の人に有限要素法を"理解して"使ってもらることを目指して,オープンソフトウェアでの開発を行っています. "DelFEMはLGPLライセンスversion3に基づいて配布しています" できること
しなければならないこと
その他,オープンソースのメリットについては以下に詳しくまとまっています. 何故、オープンソースなのか? : http://www.jp.redhat.com/opensource/os_jp.html LGPLについて,詳しくは以下を参考にしてください. GNU 劣等一般公衆利用許諾契約書 : http://www.opensource.jp/lesser/lgpl.ja.html How to build?build with Visual Studioライブラリ単体でビルドするのではなく,プログラムと一緒にビルドするような仕様になっています.インクルードファイルのディレクトリをVisualStudioに設定してください.例えばVsualC++6.0では[ビルド]メニューバー >> [オプション]メニュー >> [ディレクトリ]タブ >> [インクルードファイル]コンボボックス でDelFEM/includeの場所を指定して下さい.開発プロジェクトに 静的ライブラリ(DelFEM/lib/stlib)をインポートして,依存関係を設定して下さい.詳しいやり方はサンプルプログラム(DelFEM/test_glut/)にならって下さい 開発者がMacに乗り換えたために,Visual Studioのプロジェクトファイルは用意していません.ご了承下さい. build with MinGW
以上の作業は,コマンドプロンプトでコマンドを打つ替りにバッチファイル DelFEM/make_with_mingw.batを実行しても実現されます. Build with Mac XCodeXCodeを用いたデモプログラムを纏めたプロジェクトファイルが/test_glut/tests.xcodeprojにあります. XCodeを用いたDelFEMの静的ライブラリは/lib/xcodelib_coreにあります.これをリンクして使用してください. Build DemoDelFEM/test_glut/にデモがあります. デモをコンパイルするにはFreeGLUTが必要です. 以下を参考にインストールして下さい. http://www.transmissionzero.co.uk/software/freeglut-devel/ Updatesver 1.2.3 :二次元 CADでの形状のインタラクティブな編集デモと,初歩的な三次元CADのデモを公開.二次元CADに初歩的な3次Bezier関数の機能を追加 ver 1.2.2 : CFieldValueSetterクラスの追加,CCadObj2Dへの形状処理結果の取得クラスの追加など様々なリファクタリングを行いより使いやすくしました. ver 1.2.1 : Qtを用いたGUIつきのデモを追加しました. ver 1.2.0 : 剛体解析,剛体と弾性体の連成機能,非圧縮性超弾性体の解析,MacのXCodeでの開発環境を追加しました Acknowledgements支援IPA未踏ユース2008年度上半期の支援をうけて作られています. 「インタラクティブなUI備えた統合型設計解析ソフトウェアの開発」: http://www.ipa.go.jp/jinzai/mitou/2008/2008_1/youth/gaiyou/t-02.html 使わせていただいたソース以下のソースを使わせていただいています. "Uglyfont" Soji Yamakawaさん作 : http://homepage3.nifty.com/ysflight/uglyfont/uglyfontj.html どうもありがとうございます! 貢献してくれた方々PENGUINITIS様: http://www.geocities.jp/penguinitis2002/ 各種環境でのビルド,開発環境の構築方法,インタラクティブな3D梁の変形デモなどなどについてWebページを作って教えて頂きました. malibu-bulldog様: http://d.hatena.ne.jp/malibu-bulldog/ Ubuntuでのビルドについて教えて頂きました. その他,色々な人からアドバイスを頂いたり助けてもらいました.どうもありがとうございます! |