2023年6月17日星期六

ICEM model stent and aneurysm

 always forget so I think i better put a mark here 

The aneursym and stent has to meshed separately 


I need some advice. As part of my research our lab focuses on virtual stenting and coiling in patient specific aneurysms. We have traditionally used ICEM CFD to mesh the aneurysm geometry and deployed stent geometry but the problem is it is difficult to resolve the stent geometry without creating a crazy amount of elements. We volume mesh both the aneurysm and stent geometry, then import the mesh into Star-CD, then delete the "shell" elements that represent the stent so we can perform CFD. Can anyone think of a better way of doing this?? Does ICEM CFD have some type of Embedded mesh technique or Immersed Boundary that can be used to resolve the stent meshing issue? Another problem is that since the stent is quite small compared to the parent vessel, ICEM creates dozens of "CREATED MATERIAL" that I believe represent the small volume gaps between the stent geometry. I've tried importing the volume mesh into CFX, but finding and deleting these "shell" elements like we do in Star-CD is not as cut and dry. Is there an easy way in CFX to distinguish between "shell" and the volume elements so the deletion of the stent is easier??

Sorry for the long response but help is appreciated!

https://www.cfd-online.com/Forums/ansys-meshing/110204-aneurysm-stent-meshing.html


after that we can merget them together 

https://www.cfd-online.com/Forums/ansys-meshing/124609-mesh-body-inside-body.html

2023年6月3日星期六

solve module cannot found problem.

Shit, I stuck in a environment path for so many days but finally crack through it. 


after sudo gedit .~bashrc, you put a souce to it.


but what the ass

 you also need to  make the module you want is under the directory path 

e.g. home/ass/


copy the  module there but not under anaconda....hey man you dude!

 

update 22/12

the tiGAR-master should be rename as tIGAR, so inside still have another tIGAR, so the whole directory have to be maintained. 

haha I finally can run the karmensky code 

step by step

 

first 

use gmsh 4.4.1 mesh the geo with step in surface.step

then it will generate gmsh

then use python chamelon.py to generate .xdmf and h5, 

then create a folder 

 fluid-solid problem parameters
p = parser.add_argument_group("fluid-solid problem")
p.add_argument("--mesh-folder",dest="MESH_FOLDER",
               default="./mesh-M0/",
               help="Folder that contains the fluid-solid mesh and markers.")
p.add_argument("--mesh-filename",dest="MESH_FILENAME",
               default="aorta_mesh.xdmf",
               help="Filename of the fluid-solid mesh.")
p.add_argument("--subdomains-filename",dest="SUBDOMAINS_FILENAME",
               default="aorta_subdomains.xdmf",
               help="Filename of the fluid-solid subdomains markers.")
p.add_argument("--boundaries-filename",dest="BOUNDARIES_FILENAME",
               default="aorta_boundaries.xdmf",
               help="Filename of the fluid-solid boundary markers.")
p.add_argument("--markers-string",dest="MARKERS_STRING",default="markers",
               help="Mesh physical group marker string.")
p.add_argument("--polynomial-degree",dest="POLYNOMIAL_DEGREE",
               type=int,default=1,
               help="Fluid-solid problem polynomial degree.")      

 

https://fenics.readthedocs.io/projects/ffc/en/latest/installation.html#id9  


https://stackoverflow.com/questions/74585622/pyfirmata-gives-error-module-inspect-has-no-attribute-getargspec

so got that error chane the visitor.py under coffee to inspect.getfullargspec

Python3.11 Removed: The getargspec() function, deprecated since Python 3.0; use inspect.signature() or inspect.getfullargspec() instead. May 2 at 5:05

2023年5月27日星期六

随便写写 (1)

 我又生病了,最近病毒施虐,倒霉的我又感冒了。 


不过看了一部好电影,每次想起就会生出勇气。 明天会更好。 、


电影名是月球奇幻旅

https://www.youtube.com/watch?v=rY_-jzVziLY


父亲希望你去欧米茄星,我们也希望你能去,因为那也是我们的愿望,希望你能代我们实现!

曾经我也是全村的希望,村里的小孩只有我上了大学,我要成为大学的教授,去帮同年的小伙伴实现成功的愿望,用我的眼睛,去帮大家看世界。不过前路如何艰难,我也要坚持下去。加油kiwi.

冯仑说:伟大都是熬出来的。为什么用熬?因为普通人承受不了的委屈你得承受,普通人需要别人理解安慰励,但你没有,普通人用对抗消极指责来发泄情绪,但你必须看到爱和光,在任何事情上学会转化消化,普通人需要一个肩膀在脆弱的时候靠一靠,而你就是别人依靠的肩膀

 


2021年8月14日星期六

geomagic

 Spent one hour on repair geometry in the geomagic, 


rule of thumb

1. flip to the same normal before moving the imported item 

2. then connect them using bridget


3. easy 

2021年4月21日星期三

tensorflow error

 https://github.com/tensorflow/tensorflow/issues/35403#


using a tf.Tensor as a Python bool is not allowed in Graph execution. Use Eager execution or decorate this function with 


I solve it by just using Can you please try with !pip install tensorflow-gpu==2.1-rc2and see if the error still persists. I am not seeing any issue with TF 2.1.Thanks!

2021年4月19日星期一

compiling netflow

 Have some problem on compiling netflow, so I think the error resulted by 


https://stackoverflow.com/questions/10727568/cannot-convert-parameter-1-from-const-char-to-lpcwstr


n your project, it sounds like all of these macros are referencing the -W versions. This is controlled by the UNICODE preprocessor macro (which is defined if you choose the "Use Unicode Character Set" project option in Visual Studio). (Some of Microsoft's C and C++ run time library functions also have ANSI and wide versions. Which one you get is selected by the similarly-named _UNICODE macro that is also defined by that Visual Studio project setting.)

Typically, both of the -A and -W functions exist in the libraries and are available, even if your application is compiled for Unicode. (There are exceptions; some newer functions are available only in "wide" versions.)

If you have a char * that contains text in the proper ANSI code page, you can call the -A version explicitly (e.g., SetWindowTextA). The -A versions are typically wrappers that make wide character copies of the string parameters and pass control to the -W versions.

An alternative is to make your own wide character copies of the strings. You can do this with MultiByteToWideChar. Calling it can be tricky, because you have to manage the buffers. If you can get away with calling the -A version directly, that's generally simpler and already tested. But if your char * string is using UTF-8 or any encoding other than the user's current ANSI code page, you should do the conversion yourself


change Unicode fixed the problem 

2021年4月15日星期四

tensorflow issue

 stuck in tensorflow for few days for PINN. 

One of thing to get rid of placeholder is upgrade tensorflow

import tensorflow.compat.v1 as tf

tf.disable_v2_behavior() 

#tf.compat.v1.disable_eager_execution()



https://stackoverflow.com/questions/55870127/module-tensorflow-has-no-attribute-contrib


https://stackoverflow.com/questions/30429491/how-to-use-cmakedefine-preprocessor-directive-properly


cannot find header, need to make first 


find to fix the rendering error when install vtk  add word like const

https://stackoverflow.com/questions/19816139/expression-having-type-const-comparevptrs-would-lose-some-const-volatile-quali


stop at here 

File "C:\Users\Chiwei\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 481, in _disallow_in_graph_mode

    " this function with @tf.function.".format(task))


OperatorNotAllowedInGraphError: using a `tf.Tensor` as a Python `bool` is not allowed in Graph execution. Use Eager execution or decorate this function with @tf.function.


suspect is the save function and gpu plot will come back later.