CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > ANSYS Meshing & Geometry

[ANSYS Meshing] How to force meshing to create a mesh in .msh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2016, 03:05
Default How to force meshing to create a mesh in .msh
  #1
New Member
 
jan bono
Join Date: Feb 2016
Posts: 11
Rep Power: 10
potofus is on a distinguished road
Hello everyone

My goal is to make a parametric study of a geometry, and mesh this geometry whatever the configuration.
In the end i MUST have a .msh file without connecting my mesh to a Fluent module (i could but i will consume computing time)

In meshing i set my preference to "CFD" and prefered solver "fluent" but in the end i have a .mshdb and not a .msh file

How can i force meshing or workbench to give me a .msh file for each configuration ?

Many thanks in advance

jan
potofus is offline   Reply With Quote

Old   February 24, 2016, 23:25
Default
  #2
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
export is as .msh file?
Kapi is offline   Reply With Quote

Old   February 25, 2016, 02:41
Default
  #3
New Member
 
jan bono
Join Date: Feb 2016
Posts: 11
Rep Power: 10
potofus is on a distinguished road
my loop (geometry => mesh => parameter => geometry) is generating autmatically .mshdb files and not .msh as i would like. Should it be ?
potofus is offline   Reply With Quote

Old   February 26, 2016, 00:14
Default
  #4
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
post your script please!
Kapi is offline   Reply With Quote

Old   February 26, 2016, 08:45
Default
  #5
New Member
 
jan bono
Join Date: Feb 2016
Posts: 11
Rep Power: 10
potofus is on a distinguished road
here it is i connected my mesh to a fluent but i don't need the fluent result, and it is slowing the process. My goal is to make the same without fluent and have in the end a mesh with .msh extension and not .mshdb

thank you
Attached Images
File Type: png prjct.png (14.4 KB, 43 views)
potofus is offline   Reply With Quote

Old   February 28, 2016, 16:36
Default
  #6
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
just double - click on your mesh, generate the mesh and then go to File>Export and export it as .msh file.
Kapi is offline   Reply With Quote

Old   March 7, 2016, 08:43
Default
  #7
New Member
 
jan bono
Join Date: Feb 2016
Posts: 11
Rep Power: 10
potofus is on a distinguished road
Thank you for your answer Kapi, but i am afraid i did not make myself clear :

Indeed a manual action in the Export menu can be a solution, but i want to find another solution that will avoid the manual solution for each design point considering i have more than 50 design point ( so manually can be long, and i may do 50 other DP for another geometry)

So to avoid this i found a temporary solution => connect my mesh to Fluent , it "forces" Meshing to create a .msh instead of a .mshdb , but Fluent draws computation time uselessely considering i don't want any output from fluent, just my .msh

Hence my question can i have a .msh without using Fluent AND the manual action File=>Export

Sorry if i was imprecise, and again thank you for your time
potofus is offline   Reply With Quote

Old   March 7, 2016, 17:07
Default
  #8
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
Hi Jan,

you have to create a "try.wbjn" file and run it for that.
something of this sort:
Code:
mshPath=  r"C:\Users\......\try.msh"
# encoding: utf-8
SetScriptVersion(Version="16.0")
template1 = GetTemplate(TemplateName="Mesh")
system1 = template1.CreateSystem()
mesh1 = system1.GetContainer(ComponentName="Mesh")
mesh1.Edit()
script = open('mymesh.js', 'r')
mesh1.SendCommand(Command=script.read())
script.close();
mshPath = mshPath.replace('\\', '\\\\')
command2Send = """DS = WB.AppletList.Applet("DSApplet").App;
var meshBranch = DS.Tree.FirstActiveBranch.MeshControlGroup;
var filename = "%s";
DS.Script.doFileExport(filename);""" %(mshPath)
mesh1.SendCommand(Command = command2Send)
mesh1.Exit()
The only problem I see how you will give command to run it.
to run this file you have to create ".bat" file and give command to run the above file.
something like this:
Code:
"C:\Program Files\ANSYS Inc\v160\Framework\bin\Win64\RunWB2.exe" -I -R try.wbjn
so you have to create bat file, and run wbjn file to export your mesh as .msh file.

if you are creating mesh very often , I would suggest take path of doing scripting and automate your process.

Hope it helps

Cheers
KAPI
Kapi is offline   Reply With Quote

Old   March 8, 2016, 03:30
Default
  #9
New Member
 
jan bono
Join Date: Feb 2016
Posts: 11
Rep Power: 10
potofus is on a distinguished road
thanks a lot Kapi !
i am trying this and i am coming back to you
potofus is offline   Reply With Quote

Old   August 20, 2021, 02:43
Default
  #10
New Member
 
coyote
Join Date: Aug 2021
Posts: 10
Rep Power: 4
coyote is on a distinguished road
Did you achieve to do this ? I am trying to do the same thing and can't seem to save the file, or at least I cannot find it in my computer...Could you please help me ?
coyote is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation tommymoose ANSYS Meshing & Geometry 48 April 15, 2013 04:24
Actuator disk model audrich FLUENT 0 September 21, 2009 07:06
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


All times are GMT -4. The time now is 16:22.