|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
Hi,
I have an application where the flow is entirely determined by wall motion, similar to an IC engine. First I run a dry-run solving only for the mesh motion, and remesh when the quality becomes too poor. I get a series of meshes that are then read in CFX when I compute the flow. I use the configuration/remeshing tab for this, with an external command that locates the correct mesh and replace the current mesh (as described in 33.2.2.1. User Defined Remeshing cfx_pre.pdf). My monitor for domain volume show the expected result (continuous smooth curve), but my monitor points for velocity inside the domain drop to zero for the time step after the mesh is replaced (time step 90 in figure). It is like the solution is not interpolated from time step 89 to 90. Relevant CEL: SIMULATION CONTROL: &replace CONFIGURATION CONTROL: CONFIGURATION: Configuration 1 Flow Name = Flow Analysis 1 ACTIVATION CONTROL: CONTROL CONDITION: Activation Condition 1 Option = Start of Simulation END END REMESH: Remesh 1 Activation Condition List = Interrupt Condition 1 External Command = ../read_mesh.sh Location = FLUID1 Option = User Defined Replacement Mesh File = cfxmesh.cfx5 END END END END Interrupt Condition 1 is true when time step = 89, i.e. one time step before my velocity drops. Do I need another configuration that starts when Configuration 1 end? I tried that by adding another configuration which had the setting ‘Initial values = Configuration 1 results’, but I could not get it to run. Im not even sure why I would need that. Any ideas on why the velocity drops to zero and how I should proceed? ![]() |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,917
Rep Power: 145 ![]() ![]() ![]() ![]() |
You will probably need to talk to the CFX developers for this one.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
|
This behavior seems normal to me (Glenn please correct me, if I am wrong) since due to change in setup residuals first goes up and then come to required level in next few iterations.
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 21 ![]() |
FAR: He is posting flow conditions not resisduals. Those should be continous if the solver is behaving correctly.
One thing I think about: Are you prescribing fixed wall motion or is it a function of the flow? In past releases of CFX (prior to the 6DOF implementation), I put in my own motion equations and had to do remeshes during solution. In my intial attempts, I got behavior like you are showing. It occured becuase I wasnt conserving momentum of my moving solid across the remesh. If you are moving your wall based on flow interaction (and not using the 6-DOF but your own built in F=ma CELs) then you need to account for the momentum across the remesh. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
Yes, I am showing velocity and not residuals. The wall motion is known beforehand and prescribed using specified mesh displacement when doing the dry-run to obtain the meshes. Then when computing the flow I use a Fortran routine to obtain intermediate meshes for every time step. That only works when the mesh topology is the same, so I trigger a key frame remesh to stop the solver and (hopefully) interpolate the flow onto the new mesh topology. I though that the momentum would carry over the mesh reload step, but maybe it doesnt? That would explain the loss in velocity.
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
Update: I got it to work. The problem was that I triggered the remesh one time step too early and that the solution was interpolated onto a mesh that didnt have any mesh motion. I had to recode my Fortran code a bit, but now it seems to work as intended.
|
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 21 ![]() |
Hi Lance,
i am simulating a moving mesh case and have to use Remeshing when the mesh gets distorted too much. I want to do Remeshing with Keyframe meshes as you did in your case. For that purpose I have created the meshes at different instants and want to import them at particular time during the CFX run (using Interruption Control and Configuration). But in the Configuration tab of CFX i don't know what is the external command? CFX guide says "The External Command is typically a shell script or batch file". Can you please tell me how to write this External Command? Can you please attach some example. remesh.jpg Replacement file is mesh file (.msh file, i export the meshes in fluent format in ICEM) which will be read in the CFX during the simulation, isn't it? If the mesh is generated in millimeters, then do i need to scale the mesh during the export as it will be automatically read by the solver during the run? Normally if mesh is made in millimeters then i select Units to "mm" during the import in CFX, but in this case meshes have to be imported automatically |
|
![]() |
![]() |
![]() |
![]() |
#8 | |||
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
Quote:
For me, this looks something like at timestep 10, copy ../meshfolder/cfxmesh.cfx5.10 to ./cfxmesh.cfx5 at timestep 20, copy ../meshfolder/cfxmesh.cfx5.20 to ./cfxmesh.cfx5 at timestep 30, copy ../meshfolder/cfxmesh.cfx5.30 to ./cfxmesh.cfx5 Quote:
Quote:
|
||||
![]() |
![]() |
![]() |
![]() |
#9 | |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 21 ![]() |
Quote:
For each new instant you used a separate shell script to replace old mesh with new mesh? If your script is not confidential can you share it? I have never used it, so don't know about its syntax. BTW i am working on Windows PC, so still shell script will be required? Where did you get the information regarding the shell script to replace the old mesh with new mesh because in CFX guide not much is available, isn't it? |
||
![]() |
![]() |
![]() |
![]() |
#10 | ||
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
Quote:
Quote:
Code:
#!/bin/bash #get current directory currdir=`pwd` #get monitor data cfx5mondata -dir $currdir >file.atstep #get ATSTEP from monitor data file string=$(sed -n '$p' file.atstep) arrIN=(${string//,/ }) ATSTEP=${arrIN[0]} #file to copy #copy ../meshes/cfxmesh.cfx5.ATSTEP to ./cfxmesh.cfx5 cfxname="../meshes/cfxmesh.cfx5."$ATSTEP cp $cfxname "$currdir/cfxmesh.cfx5" |
|||
![]() |
![]() |
![]() |
![]() |
#11 | |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 21 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#12 | |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
Quote:
cfx5mesh.cfx5.10 is the mesh for time step 10 cfx5mesh.cfx5.20 is the mesh for time step 20 and so on... when ATSTEP = 10, cfx5.$ATSTEP will resolve to cfx5.10 in my script. |
||
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 21 ![]() |
thanks for the quick reply. I didn't know that the mesh file can be named by adding something after the extension type.
|
|
![]() |
![]() |
![]() |
![]() |
#14 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 21 ![]() |
For Windows i have to write a batch file which will perform the required tasks. Do you have idea where i can find information regarding batch files in CFX guides?
|
|
![]() |
![]() |
![]() |
![]() |
#15 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
I doubt you will find much info in the CFX manuals. But since this is not really CFX-specific a simple web search on 'windows batch file' will probably help you.
|
|
![]() |
![]() |
![]() |
![]() |
#16 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 21 ![]() |
Instread of using 'User defined' option for Remeshing i choose to go with ICEM CFD replay but for each instant i created new geometry myself and for each instant i recorded a reply file. But during the solution when the first remeshing starts, it did remeshing but the the solution stops with an error "ANSYS CFX Solver input file does not exist".
I checked the "30_remesh.out" (first remeshing starts at 30th timestep) and it conatins this error: "Batch run of "C:\Users\u1dp_hy\Desktop\e-Level\Pump\Pump_New_Remesh_008.dir\meshUpdate.pre" failed due to the following errors: -- WARNING -- This results file contains multiple meshes. The latest mesh will be loaded, which will be the deformed mesh for a case that includes Mesh Deformation. If the original undeformed mesh is required, you should load the case file (.cfx) or the CFX-Solver input file (.def) instead. -- ERROR -- The mesh cannot be reloaded as the file '30_newmesh_01.mesh' does not exist. But actually '30_newmesh_01.mesh' do get created in the folder along with '30_newmesh_01.mesh.log'. Is this 'mesh.log' file creating some problem? Did you also face such problem? Do you have any idea what this is about and how it can be fixed? Attching the .out file of Remesh. 30_remesh.txt Last edited by cfd seeker; November 16, 2018 at 10:38. |
|
![]() |
![]() |
![]() |
![]() |
#17 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
The warning is probably nothing to care about. The error on the other hand...
Are you sure about the spelling? Should it be 30_newmesh_01.mesh or 30_newmesh_01.msh ? |
|
![]() |
![]() |
![]() |
![]() |
#18 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 21 ![]() |
I didn't understand your spelling point. This is the error what I am getting. Remeshing failed and CFX wrote "30_remesh.out" in the directory (attached as a .txt file in the previous post) and i read the error from this "30_remesh.out" file.
|
|
![]() |
![]() |
![]() |
![]() |
#19 | |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23 ![]() |
Quote:
You seem to produce a file with extension .mesh (for some reason) but if CFX expects a .msh file it will never work. |
||
![]() |
![]() |
![]() |
![]() |
#20 | |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 21 ![]() |
Quote:
Remeshing.jpg For each instant where simulation will stop, i have created a separate .tin and separate .rpl file. |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Remeshing issue due to solid contact | Jrmy | FLUENT | 4 | October 18, 2018 17:34 |
Convert DFT of pressure in rotating frame to stationary frame | CFD-123 | FLUENT | 0 | February 12, 2015 18:51 |
ICEM CFD Replay Remeshing | EvaS | CFX | 1 | December 19, 2012 20:30 |
Rotating Reference Frame Pressure Gradient | clac | FLUENT | 0 | August 22, 2012 19:20 |
Question about N-S eqs. in body fixed noninertial reference frame | doctorWho | Main CFD Forum | 0 | July 12, 2011 19:07 |