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

dynamicRefineFvMesh with simpleFoam crash

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2017, 10:51
Default dynamicRefineFvMesh with simpleFoam crash
  #1
New Member
 
Jeroen
Join Date: Oct 2016
Posts: 21
Rep Power: 9
verboomj is on a distinguished road
Hello,

For the purpose of my solver, I want to refine the mesh at a certain edge, that is found by my topology optimization. This can be seen in the attached figure.

After some research, dynamicRefineFvMesh seems to be the 'go to' class. I've implemented the mesh.update() command in my simplFoam loop, similar to the pimpleDyMFoam implementation:

Code:
        fvc::makeAbsolute(phi, U);

        Info<< "Time = " << runTime.timeName() << nl << endl;
        

        magAlphaGrad = mag(fvc::grad(alpha));
        
        counter += 1;
        if(counter>activateVolume)
        {
        mesh.update();
        }
It compiles and appears to work, but when I run a case it crashes at the moment it wants to refine the mesh.

Code:
Time = 2

Selected 468 cells for refinement out of 120000.
Refined from 120000 to 123276 cells.
Selected 0 split points out of a possible 468.
We're sorry, but the application crashed and safe stack tracing isn't available in this current implementation of blueCFD-Core patches for OpenFOAM.
The dynamicMeshDict file is rather standard as compared to exisiting tutorials for this dynamicRefineFvMesh.

Any ideas where I should look, regarding this crash?
Attached Images
File Type: png alphaSignGrad.PNG (35.8 KB, 31 views)
verboomj is offline   Reply With Quote

Old   December 31, 2017, 13:23
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings verboomj,

I'm really late to give an answer to you on this, but I do have two suggestions for you:
  1. If possible, upgrade to blueCFD-Core 2017, which provides stack tracing, so that you can then see why it crashed, instead of giving a cryptic message.
  2. Old-school debugging is always an option, namely to use calls to "Info" to help isolate the location of the problem in the source code. For example:
    Code:
    Info << "Got here 01" << endl;
    
    //...
    
    Info << "Got here 02" << endl;
    And so on.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 12, 2020, 13:16
Default
  #3
New Member
 
Join Date: Jun 2019
Posts: 20
Rep Power: 6
Cambridge is on a distinguished road
Quote:
Originally Posted by verboomj View Post
Hello,

For the purpose of my solver, I want to refine the mesh at a certain edge, that is found by my topology optimization. This can be seen in the attached figure.

After some research, dynamicRefineFvMesh seems to be the 'go to' class. I've implemented the mesh.update() command in my simplFoam loop, similar to the pimpleDyMFoam implementation:

Code:
        fvc::makeAbsolute(phi, U);

        Info<< "Time = " << runTime.timeName() << nl << endl;
        

        magAlphaGrad = mag(fvc::grad(alpha));
        
        counter += 1;
        if(counter>activateVolume)
        {
        mesh.update();
        }
It compiles and appears to work, but when I run a case it crashes at the moment it wants to refine the mesh.

Code:
Time = 2

Selected 468 cells for refinement out of 120000.
Refined from 120000 to 123276 cells.
Selected 0 split points out of a possible 468.
We're sorry, but the application crashed and safe stack tracing isn't available in this current implementation of blueCFD-Core patches for OpenFOAM.
The dynamicMeshDict file is rather standard as compared to exisiting tutorials for this dynamicRefineFvMesh.

Any ideas where I should look, regarding this crash?
Hi verboomj

I am new in topology optimization of fluid and thermal by using OpenFOAM, could you please share any basic codes or tutorials of this? It would better for me to start to replicate some cases. Thank you so much.

regards
Cambridge is offline   Reply With Quote

Reply


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
simpleFoam crash fast! izna OpenFOAM Running, Solving & CFD 28 February 3, 2017 13:24
SimpleFoam crash at first loop alvariten OpenFOAM Running, Solving & CFD 5 August 17, 2015 07:17
Simulation crash with dynamicRefineFvMesh and kOmegaSST - OF 2.3.x nathanael OpenFOAM Running, Solving & CFD 4 June 29, 2014 17:02
[blockMesh] Grading leads to simpleFoam crash yanyanh OpenFOAM Meshing & Mesh Conversion 3 March 2, 2014 11:08
simpleFoam crash -> How to solve tH3f0rC3 OpenFOAM 4 May 12, 2011 07:07


All times are GMT -4. The time now is 11:55.