# Bad parallelization. Has this ever happened to you??? :O

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Search this Thread Display Modes
 November 23, 2019, 14:40 Bad parallelization. Has this ever happened to you??? :O #1 New Member   Join Date: Sep 2019 Posts: 18 Rep Power: 5 Hi, I was trying to solve the problem of a magnetically confined conductive fluid in a periodic cylinder. The results for a serial simulation gives resonable results... But when I run the simulation for 2 processors one can distinguish 2 zones in the cylinder (one per processor). If I am using 3 one can distinguish 3 zones. Same for 4. I suppose that there is a problem in the comunication between the cells at the boundaries of each processors zone. I am using scotch method. I tried (it did not work): Change the method to simple. Add a correctBoundaryConditions() in the equation for B in mhdFoam. I suppose that the problem is in the solver that I am using (a mhdFoam slightly modified). mhdFoam works well with parallelization. But when one wants to add a external magnetic field one has to modify the equation for B (with , is the same for all t).Induction equation in mhdFoam looks like: Code:  while (bpiso.correct()) { fvVectorMatrix BEqn // the magnetic induction equation, calculates the magnetic field taking into account the influence of the velocity. ( fvm::ddt(B) + fvm::div(phi, B) - fvm::laplacian(DB, B) - fvc::div(phiB, U) ); BEqn.solve(); phiB = fvc::flux(B);//phiB is calculated at faces. while (bpiso.correctNonOrthogonal()) { fvScalarMatrix pBEqn //A Poisson equation is derived for the fictitious magnetic pressure pB and solved ( fvm::laplacian(pB) == fvc::div(phiB) ); pBEqn.solve(); if (bpiso.finalNonOrthogonalIter()) //The variable distribution is then employed to correct the phiB values { phiB -= pBEqn.flux(); } }// The loop exits after the prescribed iterations stated in the fvSolution file. #include "magneticFieldErr.H" //print magnetic field divergence deviation from null value } My induction equation in modified mhdFoam looks like Code:  #include "readBFixed.H" while (bpiso.correct()) { fvVectorMatrix BVbleEqn ( fvm::ddt(BVble) + fvm::div(phi,BVble) + fvc::div(phi,BFixed) - fvc::div(phiBVble,U) - fvc::div(phiBFixed,U) - fvm::laplacian(lambda,BVble) - fvc::laplacian(lambda,BFixed) ); BVbleEqn.solve(); phiBVble = fvc::flux(BVble); while (bpiso.correctNonOrthogonal()) { fvScalarMatrix pBVbleEqn ( fvm::laplacian(pBVble) == fvc::div(phiBVble) ); pBVbleEqn.solve(); if (bpiso.finalNonOrthogonalIter()) { phiBVble -= pBVbleEqn.flux(); } } #include "magneticFieldErr.H" BVble.correctBoundaryConditions(); } B=BVble+BFixed; phiB = fvc::flux(B); Maybe the problem is to sum B=BVble+BFixed in this way?? 3p.png 2p.png

 November 28, 2019, 08:58 #2 New Member   Join Date: Sep 2019 Posts: 18 Rep Power: 5 I tried the same case with the OF series solver for MHD. I used the same configuration and the same magnetic field profile but without an external magnetic field source at t> 0, that is, it is an MHD decay. The result has been the same as with the modified solver. I have tried the same thing in a box with periodic conditions on the sides and I have not seen anything unusual. It seems that the quality of the parallelization in OF depends on how simple the mesh is. If it is a bit complicated it seems that parallelization does not work so well. If this is true is an OF internal issue and I cannot do anything. Am I right?

 November 28, 2019, 16:49 #3 Senior Member     Herpes Free Engineer Join Date: Sep 2019 Location: The Home Under The Ground with the Lost Boys Posts: 932 Rep Power: 11 yes you can. submit an issue ticket in gitlab repo. __________________ The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror

 November 29, 2019, 12:22 #4 New Member   Join Date: Sep 2019 Posts: 18 Rep Power: 5 Hi HPE, Thanks for answering. I do not understand what you mean

 November 29, 2019, 12:43 #5 Senior Member     Herpes Free Engineer Join Date: Sep 2019 Location: The Home Under The Ground with the Lost Boys Posts: 932 Rep Power: 11 My apologies. I wrote that while I was in bed. >> If this is true is an OF internal issue and I cannot do anything. I meant that if you think that there is an internal issue in OF, you can submit a bug ticket in gitlab repository, so that the developers can have a look at the issue, and evaluate it for you. __________________ The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror

 Tags mhdfoam, parallelization, scotch, simple method

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post [snappyHexMesh] Add Layers in snappyHexMesh shchepan OpenFOAM Meshing & Mesh Conversion 24 May 14, 2020 12:29 sam.ho OpenFOAM Installation 35 April 5, 2014 15:31 [ANSYS Meshing] Very thin plate (0.1mm) ICEM CFD bad meshing msormania ANSYS Meshing & Geometry 1 April 30, 2012 07:45 kiski OpenFOAM Installation 20 March 22, 2012 12:45 Martin J Main CFD Forum 8 August 14, 2003 23:19

All times are GMT -4. The time now is 00:09.

 Contact Us - CFD Online - Privacy Statement - Top