-
Recent Posts
- Cfd module for FreeCAD can work with external mesh file
- export salome mesh to FeNICS mesh
- Coupling OpenFOAM with FeniCS for multiphysis simulation (OpenFOAM workshop 13 presentation)
- preCICE build and test on Ubuntu 16.04
- FreeCAD 0.17 + OpenFOAM CFD module now works on windows 10 WSL
- I have developed several multi-physics solver based on Fenics and GUI within FreeCAD CFD workbench
- Add visual studio command prompt to windows explorer context menu
- using cloud space as a private git repo
- BoundaryLayer setup for Gmsh 3D meshing
- from gmsh geo file to fenics mesh with subdomain and boundary facet exported
-
Categories
Recent Comments
Archives
- December 2018
- September 2018
- June 2018
- May 2018
- November 2017
- September 2017
- June 2017
- May 2017
- February 2017
- December 2016
- November 2016
- September 2016
- August 2016
- May 2016
- January 2016
- September 2015
- June 2015
- March 2015
- December 2014
- September 2014
- July 2014
- June 2014
- November 2013
- October 2013
- July 2013
- March 2013
- January 2013
- December 2012
- November 2012
- October 2012
- April 2012
- December 2011
- July 2011
- June 2011
- May 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
Meta
Author Archives: news
Cfd module for FreeCAD can work with external mesh file
http://www.iesensor.com/blog/wp-content/uploads/2018/12/FreeCAD_CFD_using_external_mesh.webm
Posted in Uncategorized
Comments Off on Cfd module for FreeCAD can work with external mesh file
export salome mesh to FeNICS mesh
Salome installation download Salome platform 8.5 binary for Ubuntu 16.04 (64bit) Salome-meca is the combination of salome and code_aster (FEA), it is also possible to manually add the Code_saturne plugin for CFD installation extract this compressed file to a position … Continue reading
Posted in Programming
Comments Off on export salome mesh to FeNICS mesh
Coupling OpenFOAM with FeniCS for multiphysis simulation (OpenFOAM workshop 13 presentation)
This is my presentation for OpenFOAM workshop 13 presentation, unfortunately, I can not attend the workshop in person. Link to my presentation PDF: OFW13-19-119__Coupling_OpenFOAM_with_FeniCS_for_multiphysis_simulation__QingfengXIA Outline of this presentation: 1. physics simulation automation 2. CFD module for FreeCAD (GUI for OpenFOAM) … Continue reading
Posted in Uncategorized
Comments Off on Coupling OpenFOAM with FeniCS for multiphysis simulation (OpenFOAM workshop 13 presentation)
preCICE build and test on Ubuntu 16.04
please read PDF version for better code highlighting preCICE build and test on Ubuntu 16.04
Posted in Uncategorized
Comments Off on preCICE build and test on Ubuntu 16.04
FreeCAD 0.17 + OpenFOAM CFD module now works on windows 10 WSL
after windows 10 2018 april update, it is possible to run my CFD module on FreeCAD 0.17 Limited by my time I can spend on this open source project, I will will make new feature in about half year, but … Continue reading
Posted in Uncategorized
Comments Off on FreeCAD 0.17 + OpenFOAM CFD module now works on windows 10 WSL
I have developed several multi-physics solver based on Fenics and GUI within FreeCAD CFD workbench
This is also announced in Fenics support forum Screenshot of FenicsSolver in FreeCAD Dear all, I have developed several multi-physics solver based on Fenics, it is hosted on github: https://github.com/qingfengxia/FenicsSolver This solver is data driven (json), instead of programming … Continue reading
Posted in Programming, Research
Comments Off on I have developed several multi-physics solver based on Fenics and GUI within FreeCAD CFD workbench
Add visual studio command prompt to windows explorer context menu
Recently relised visual studio build tool (with cmake support), enables building windows c++ project without GUI. It is essential to accelerate the testing of cross-platform program. It is convenient and decent to add Bash (WSL) and visual studio command line … Continue reading
Posted in Uncategorized
Comments Off on Add visual studio command prompt to windows explorer context menu
using cloud space as a private git repo
[answer from stackoverflow] It is absolutely possible – what you probably want to do is create a “bare” git repository in folder Y (git init –bare) and then add that file location as a remote:
1 2 |
git remote add Y file:///path/to/Y #example path: file:///media/sf_OneDrive/gitr<wbr />epo/FenicsSolver/ |
======= push and pull … Continue reading
Posted in Uncategorized
Comments Off on using cloud space as a private git repo
BoundaryLayer setup for Gmsh 3D meshing
Precise control of the thickness of the first cell normal to wall, is crucial for turbulence models like k-epsilon, k-omega. Before moving to turbulence flow simulation for CFD workbench of FreeCAD 2D meshing with boundary layer, tutorial <http://www.iesensor.com/blog/2017/05/24/gmsh_fenics_meshing/> 3D boundary … Continue reading
Posted in Uncategorized
Comments Off on BoundaryLayer setup for Gmsh 3D meshing
from gmsh geo file to fenics mesh with subdomain and boundary facet exported
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
from dolfin import * import os.path from subprocess import Popen, PIPE, check_output # https://fenicsproject.org/qa/9983/setting-boundary-conditions-for-meshes-generated-by-gmsh # generete mesh by: gmsh test.geo -3 # dolfin-convert -i gmsh test.msh test.xml geo_file_content = """ size = 1; //m meshThickness = size / 3; gridsize = size / 5; // All numbering counterclockwise from bottom-left corner Point(1) = {0, 0, 0, gridsize}; Point(2) = {0, size, 0, gridsize}; Point(3) = {size, size, 0, gridsize}; Point(4) = {size, 0, 0, gridsize}; Line(1) = {1, 2}; Line(2) = {2, 3}; Line(3) = {3, 4}; Line(4) = {4, 1}; Line Loop(4) = {1, 2, 3, 4}; Plane Surface(8) = {4}; Physical Line(12) = {1}; Physical Line(23) = {2}; Physical Line(34) = {3}; Physical Line(41) = {4}; Physical Surface(1) = {8}; // do not comment out this line //Transfinite Surface{8}; // fenics does not support recomine //Recombine Surface{8}; // boundary layer Field[4] = BoundaryLayer; Field[4].EdgesList = {1,3}; // FacesList for 3D Field[4].hfar = 10; Field[4].hwall_n = 0.015; Field[4].hwall_t = 0.01; Field[4].thickness = 0.02; Field[4].ratio = 1.0; BoundaryLayer Field = 4; Mesh.CharacteristicLengthFromCurvature = 1; Mesh.Algorithm = 8; // delannay=1 """ fname="test" with open(fname+".geo", 'w') as f: f.write(geo_file_content) cmd = 'gmsh {}.geo -3'.format(fname) print check_output([cmd], shell=True) # run in shell mode in case you are not run in terminal cmd = 'dolfin-convert -i gmsh {}.msh {}.xml'.format(fname, fname) Popen([cmd], stdout=PIPE, shell=True).communicate() mesh = Mesh(fname+".xml") if os.path.exists( fname+"_physical_region.xml"): subdomains = MeshFunction("size_t", mesh, fname+"_physical_region.xml") plot(subdomains) if os.path.exists( fname+"_facet_region.xml"): boundaries = MeshFunction("size_t", mesh, fname+"_facet_region.xml") plot(boundaries) plot(mesh) interactive() |
Posted in Programming, Research
Comments Off on from gmsh geo file to fenics mesh with subdomain and boundary facet exported
FreeCAD compatible Fenics mshr geometry building
Fenics geometry building API is based on CGAL, it can import CAD, but can not export CAD file like step. Here is a solution, not fully tested. This file may be further developed in github.
Posted in Uncategorized
Comments Off on FreeCAD compatible Fenics mshr geometry building
solved Fenics (2016.2) cpp code compiling error on ubuntu 16.04
for any expression in Expression for Fenics 2016.2( installed from PPA ) expr = “”” x[2]> {} ? {}:{}”””.format(disc_zmax, lambda_p, lambda_d) print(expr) K = Expression(expr, element=V.ufl_element()) # error in compiling instant error log: ” — The imported target “vtkRenderingPythonTkWidgets” references … Continue reading
Posted in Programming
Comments Off on solved Fenics (2016.2) cpp code compiling error on ubuntu 16.04
Cmake cheatsheet
#Cmake cheat sheet in markdown
Posted in Uncategorized
Comments Off on Cmake cheatsheet
c and cpp pitfalls, mixing signed and unsigned integer, implicit conversion
1. mixing unsigned and sign int is a bad idea first of all, remember: signed int types will be implicitly converted to unsigned if sizeof(signed int types) == sizeof(unsigned int types) Google C++ coding standard, say “do not use unsigned … Continue reading
Posted in Programming
Comments Off on c and cpp pitfalls, mixing signed and unsigned integer, implicit conversion
compile c++ codes using Visual C++ Build Tools from the command prompt
Introducing the Visual Studio Build Tools “If you have installed Microsoft Visual C++ Build Tools 2015 on Windows 10, open the Start menu and choose All apps. Scroll down and open the Visual C++ Build Tools folder. Choose Visual C++ … Continue reading
Posted in Programming
Comments Off on compile c++ codes using Visual C++ Build Tools from the command prompt
Mibox 2 install youtube and play to kodi (just as chromecast)
1. install shafa TV manager and/or ES file explorer to be enable install apk from USB/SD card http://www.shafa.com/articles/yWNpNK6erhB6Q4dO.html 2. install Kodi/XMBC apk from shafa’s file manager (in toolbox) on USB storage 3. install apk of youtube for Google TV, and … Continue reading
Posted in Uncategorized
Comments Off on Mibox 2 install youtube and play to kodi (just as chromecast)
Evaluation of OpenFOAM on bash on Ubuntu on windows 10
## installation After Anniversary Build (2016 Aug) for x65 windows 10, it is possible to evaluate this beta feature in developer mode without upgrade to claimed unstable insider version. see detailed tutorial: To install ubuntu on windows 10 from power … Continue reading
Posted in Uncategorized
Comments Off on Evaluation of OpenFOAM on bash on Ubuntu on windows 10
disable windows input method hotkey
UPDATE: it seems the following methods still fails, as restart pc or windows update will invalidated the setting =========== Avoid the annoying hotkey to trigger the IME shape/punctation in Chinese for half/full see tutorial: http://superuser.com/questions/327479/ctrl-space-always-toggles-chinese-ime-windows-7 In addition to disapble Ctrl-Space, … Continue reading
Posted in Uncategorized
Comments Off on disable windows input method hotkey
Toshiba L650 laptop disassembling
I got a 5 year old laptop, it does not boot, no screen show, no beeping. So I need to disassemble and check. Generally, this laptop is easy to repalce harddisk or memory on the back. And the dissabling is … Continue reading
Posted in Uncategorized
Comments Off on Toshiba L650 laptop disassembling
Introduction to Industrial IO (sensor framework for Linux)
introduciton to Industrial IO overview of industrial IO. In short, SPI and I2C sensor framework for Linux sensor categories: “ADC, DAC, light, accel(erometer), gyro, magnetometer, humidity, temperature, amplifier, frequency, orientation, health”, etc merged to mainline kernel 3.14, used by beagleBone, … Continue reading