CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Two dynamic meshes, one solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2023, 03:51
Default Two dynamic meshes, one solver
  #1
New Member
 
Luke Hirl
Join Date: Jul 2023
Location: Gießen
Posts: 16
Rep Power: 2
Luke99 is on a distinguished road
I am currently trying to modify interfoam. I would like to solve some equations on one dynamic mesh and the rest one the other and transfer the data with the help of the meshToMesh functionality.


In interfoam the dynamic mesh is declared by


Code:
autoPtr<dynamicFvMesh> meshPtr(dynamicFvMesh::New(args, runTime));
dynamicFvMesh& mesh = meshPtr();

If I want to create a second mesh in the same way by just changing mesh to FLmesh for example, wmake throws the following error:
"FLmesh was not declared in this scope"


this also happens if you try to do that in the way proposed in this Thread:

Data exchange for internal field values between two different mesh
or if you just rename mesh to something else.


So i guess i have to declare FLmesh somewhere before the main loop, but I don't know where.


Further I am unsure if I can actually declare/initialize the second mesh in the same way or if I need to change the arguments that are used in the meshPtr or if it is enough to just rename meshPtr to meshPtr2 for example.


If anyone needs a code to look at you can find it attached as a zip-File down below. It is an EHD solver with which I am trying to simulate Electrosprays. however the liquid is contacted somewhere back in the feeding of it and the capillary is a nonconducting resin so the electric field results mainly from the accumulated charges at the surface/interface of the liquid. As the resin has a low relative permitivity the electric field will behave differently if I include the permitivity and the region of the resin. Therfore I wanted to solve the Electric and Thermal(mainly joule heating in liquid) on a seperate mesh compared to the liquid calculations.
Attached Files
File Type: zip custInterSolidFoam.zip (54.2 KB, 0 views)
Luke99 is offline   Reply With Quote

Old   September 11, 2023, 10:40
Default
  #2
New Member
 
Luke Hirl
Join Date: Jul 2023
Location: Gießen
Posts: 16
Rep Power: 2
Luke99 is on a distinguished road
Solution for at least one dynamic mesh and other static meshes can be found here if anyone is interested. Should also work for multiple dynamic ones, have not tested it though.
Luke99 is offline   Reply With Quote

Reply

Tags
dynamic mesh, ehd


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
viscosity udf don't use correct temperature and strain rate rezvani Fluent UDF and Scheme Programming 8 May 27, 2021 05:40
Hybrid discretisation - blend factor gcoopermax CFX 5 September 23, 2016 08:05
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
question about dynamic meshes zhhwoo FLUENT 0 August 2, 2006 22:36


All times are GMT -4. The time now is 17:54.