dump and restore

719 views
Skip to first unread message

qi li

unread,
May 17, 2021, 4:23:06 AM5/17/21
to basilisk-fr
Dear  all experts,
      I am a relative newer for Basilisk.I want to use dump and restore function.I browsed a lot of content about dump and restore in the forum.I use lid.c to test(The difference is that I adjusted Re to 10000
),but I didn't get the desired result.I dump when i=1000, so restore from i=1001.The relative code as follows:
/*
event snapshot (i=1000)
{
  dump (file ="dump");
}
*/
event init(i=0)
{
  restore(file="dump");
}
The problem is that only i and t are restored, and other parameters (such as energy)  start to run from 0.
(The four columns of data correspond to:
i  t   energy  du)
 保存.PNG续算.PNG  
   I am very confused about this question, and hope someone can help me.Appreciate!
sincerely
Qi

Message has been deleted
Message has been deleted

qi li

unread,
May 17, 2021, 9:57:47 AM5/17/21
to basilisk-fr
When I run bview2D dump, only p and un are displayed in the field .It seems that dump did not save all the information about the simulation

# t = 1.34, fields = { p un }
#         name:          min          avg       stddev          max
#            p:    -0.116065   0.00034101   0.00809508     0.697107
#           un:     -0.41381  1.46443e-06      0.07707      1.22525

limarea...@gmail.com

unread,
May 19, 2021, 8:26:01 AM5/19/21
to basilisk-fr
Hi Qi,

When I do

make lid.tst
bview2D dump

on the original code (lid.c), I get :

# t = 1.5, fields = { u.x u.y g.x g.y un }

#         name:          min          avg       stddev          max
#          u.x:    -0.322451  5.48887e-05     0.127615     0.876984
#          u.y:    -0.632296  4.31329e-05    0.0655225     0.172131
#          g.x:     -11.7382   -0.0323807     0.361201     0.741951
#          g.y:     -12.1068  -0.00635844     0.350282      2.55778
#           un:    -0.322451  5.48887e-05     0.127615     0.876984

What compilation instructions did you use and/or what are the differences between your code and the one on the website  ?

Regards,
Alex

qi li

unread,
May 19, 2021, 10:43:47 AM5/19/21
to basilisk-fr
Dear Alex,
Because I only need the mac solver, I deleted the content about the centered solver.My code file is in the attachment.I'm sorry I didn't describe my problem clearly.Just compile and run the code, you can get dump when i=1000.Thank you very much for your reply!
sincerely
Qi
lid.c

Stephane Popinet

unread,
May 19, 2021, 10:49:46 AM5/19/21
to basil...@googlegroups.com
Hi Qi,

The problem you have is that dump() does not save face fields, only
cell-centered fields. So it is not possible at the moment (I will
improve this in the future) to simply restore face fields.

What you could try is to dump a cell-centered velocity field and
re-initialize the face fields of the MAC solver from this restored
cell-centered velocity field.

cheers,

Stephane

qi li

unread,
May 19, 2021, 10:57:44 PM5/19/21
to basilisk-fr
Dear Stephane,
Thank you very much for your reply and your great work.I will try your advice.
Regards
Qi

Reply all
Reply to author
Forward
0 new messages