
[Sponsors] 
February 19, 2013, 18:57 
problem with a solution in time dependent domain

#1 
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 136
Rep Power: 9 
Dear OFoamers,
I am working on some problem with time dependent domain. Namely one of the borders of the domain is changing with time. I was able to make my mesh time dependent and it works fine, but I encountered some other difficulty which I cant understand/solve. Namely, after mesh is changed, solution behaves wrong. Some energy is added to the system. It happens only during first change of the domain. Consecutive changes do not show this strange behavior any more (solution behaves as it should) You ca see it on the animation here: http://youtu.be/wIexKK2vQ8 from time 0  0.5 everything is ok for t =0.5 there is change of the domain geometry from time 0.5  1 we can see this "strange" behaviour, some extra energy is added and blue patch is moving (in fact it should not) at time t = 1 there is change of the geometry again, but now (and later as well) everything seems to be ok (no extra/phantom energy is added). Summing up, there is some problem after first change of the mesh. Equation I am solving is just: HTML Code:
fvScalarMatrix omEqn ( dimDt*fvm::ddt(om) + dimG*fvm::div(phi, om)  fvm::laplacian(dimensionedScalar("1",dimensionSet(0, 2, 0, 0, 0),1), om) ); omEqn.solve(); HTML Code:
fvScalarMatrix omEqn ( dimDt*fvm::ddt(om)  fvm::laplacian(dimensionedScalar("1",dimensionSet(0, 2, 0, 0, 0),1), om) ); omEqn.solve(); Thanks ZMM 

February 20, 2013, 18:23 

#2 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,531
Blog Entries: 39
Rep Power: 97 
Hi ZMM,
Disclaimer: I'm not an expert on this! I'll share as much as I know, but keep in mind that I might have some terminology confused and/or I might be mistaken . A few possibilities come to mind:
But there are at least a few details you haven't mentioned, which would make it easier to diagnose:
edit: after viewing the video a few times... it might be strange, but the solution you've got seems physical enough to me! Because you had large step change in the geometry, which could easily bump anything away from the wall ! Best regards, Bruno
__________________
Last edited by wyldckat; February 20, 2013 at 18:28. Reason: see "edit:" 

February 20, 2013, 18:56 

#3  
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 136
Rep Power: 9 
Hi Bruno,
checkMesh returns mesh OK. It is simple 2D geometry, as you can see on the movie, so there is no troubles with topology. I am not sure about flux correction, I added some commands (after pimpleDyMFoam), but it seems that they do not affect results. But truly speaking I do not understand this issue to much. I have the same strange behavior even for simple heat equations, where velocity is not needed. Answering your questions: 1. I am running in serial model. 2. My mesh is modified by changing one of the boundaries during time integration. My solver is based on icoStructFoam. Operation on mesh looks as follows: Code:
forAll(fluidMesh,fluidI) { disp[fluidI].component(1) = 0.0; } fvc::makeAbsolute(phi, U); for (int ii=0; ii<=2; ii++) { volVectorField::GeometricBoundaryField &meshDisplacement= const_cast<volVectorField&>(mesh.objectRegistry::lookupObject<volVectorField>("cellDisplacement")).boundaryField(); vectorField &mDisp=refCast<vectorField>(meshDisplacement[ss]); forAll(fluidMesh,fluidI) { vector here=fluidMesh.faceCentres()[fluidI]; vector old = oldPoints[fluidI]; disp[fluidI].component(1) = disp[fluidI].component(1)0.1*(old.component(1)  ds2[fluidI]); //Info<<here.component(1)<<" "<< ds[fluidI]<<" "<<fabs(here.component(1)  ds[fluidI])<<endl; disp[fluidI].component(0) = 0.0; disp[fluidI].component(2) = 0.0; // vector neu = neu + disp; vector move=disp[fluidI]; mDisp[fluidI]=move; } mesh.movePoints(motionPtr>newPoints()); mesh.update(); #include "correctPhi_cuette.H" fvc::makeRelative(phi, U); } commands: Code:
fvc::makeAbsolute(phi, U); #include "correctPhi_cuette.H" fvc::makeRelative(phi, U); 2. I am using dynamic meshing. dynamicMeshDict looks as follows: Code:
twoDMotion yes; dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; diffusivity uniform; Quote:
1. in case of just diffusion equation, it should get weaker, not stronger... 2. If I rerun starting from time at which geometry is changed (time = 0.5), solution behaves well. So it seems that there is some dynamic response after mesh is changed, which seems to be incorrect... Thanks again for your time. Ziemo Last edited by ziemowitzima; February 20, 2013 at 19:03. Reason: some typos 

February 21, 2013, 13:02 

#4 
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 136
Rep Power: 9 
Dear Bruno,
Please see animation at: http://youtu.be/mVWLc1LkjtQ where I am solving heat equation only: Code:
fvScalarMatrix omEqn ( dimDt*fvm::ddt(om)  fvm::laplacian(dimensionedScalar("1",dimensionSet(0, 2, 0, 0, 0),1), om) ); omEqn.solve(); I am keeping the same BC all the time: on the upper, left and right boundary there is Dirichlet BC: om = 0, on the bottom boundary there is Drichlet as well, but as function of space: om(at bottom boundary) = f(s). You can see its shape/values e.g. on the frame for time = 0. Its max absolute value is 13.86... In my opinion solution is not correct after mesh is updated, because I would expect that during the solution "om" field should get weaker, and max value should be the one which is on the boundary. Anyway my goal is to start calculations "from the beginning" after mesh is changed. Namely I do not want to have any dynamics response because of changed domain during time integration. Best regards Ziemo Last edited by ziemowitzima; February 21, 2013 at 13:05. Reason: to improve formatting 

March 12, 2013, 22:43 

#5 
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 136
Rep Power: 9 
Hi Bruno,
I am still "fighting" with this problem. But in fact, it seems, that I need something simple. I need only to change my mesh (as I am sucesfuly doing) and I want to start my calculations "from the beginning" with the new mesh. The problem I have is some "memory" (mesh change response) which is passed to my solution after mesh is updated. I do not need this "memory". Is there any way to update mesh, but cancel this "mesh change response" ?? Thanks and best ZMM 

March 18, 2013, 17:25 

#6 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,531
Blog Entries: 39
Rep Power: 97 
Hi ZMM,
Sorry for the late reply, but this is a bit out of my skilllevel Nonetheless, I only very vaguely know of a few things that might help you:
Best regards, Bruno
__________________
Last edited by wyldckat; March 18, 2013 at 17:25. Reason: rephrased a bit the emphasis on the last sentence... 

March 21, 2013, 17:55 

#7  
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 136
Rep Power: 9 
Hi,
Thanks for your reply and help ! In my dynamicMeshDict I have: Code:
twoDMotion yes; dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; diffusivity uniform; I am not sure what it is: Quote:
I am not sure if my "case" would be of any help. I created my own solver to calculate some equations/problem arising from asymptotic simplification of high Re cuette flow. In short there are three advectiondiffusion equations which need to be solved on the domain which is changing as a result of a solution of one of these equations. For now I switched to my own code in curvelinear coordinates. It works fine, but I would like to use OpenFOAM as well. Best Last edited by ziemowitzima; March 21, 2013 at 17:56. Reason: typo 

March 24, 2013, 13:23 

#8 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,531
Blog Entries: 39
Rep Power: 97 
Hi ZMM,
The forces function object needs at least the "U" and "p" fields to work. If you do not use the "p" field, then you'll need to create a variant of the forces function object, since you'll need to calculate the force some other way than relying on "U" and "p". As for flux correction... see the tutorial file "./multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict", entry "correctFluxes". Best regards, Bruno
__________________


Tags 
added energy, dynamic mesh, time changing mesh 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
same geometry,structured and unstructured mesh,different behaviour.  sharonyue  OpenFOAM Running, Solving & CFD  13  January 2, 2013 23:40 
AMI speed performance  danny123  OpenFOAM  19  October 24, 2012 07:44 
plot over time  fferroni  OpenFOAM PostProcessing  7  June 8, 2012 07:56 
IcoFoam parallel woes  msrinath80  OpenFOAM Running, Solving & CFD  9  July 22, 2007 02:58 
Doubt on Implicit Methods  analyse In India  Main CFD Forum  10  March 9, 2007 04:01 